You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on 39794d5 on develop (post 6.1) and I can easily reproduce on my laptop a problem with an SQL query in GuestbookResponseServiceBean.
jakarta.servlet.ServletException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 4.0.1.payara-p1.v202304041433): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: trailing junk after numeric literal at or near "3a"
Position: 69
Error Code: 0
Call: select count(o.id) from GuestbookResponse o where o.dataset_id = 3and eventtype != 'AccessRequest'
Query: DataReadQuery(sql="select count(o.id) from GuestbookResponse o where o.dataset_id = 3and eventtype != 'AccessRequest'")
Steps to reproduce:
Create a dataset via API. I've been using mvn test -Dtest=FilesIT#testAddTinyFile.
Log in and look for the draft
Click on the draft
BOOM, the error above
Screenshots:
Here's the fix we need (an extra space on line 931:
- query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.dataset_id = " + datasetId+ "and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'"); + query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.dataset_id = " + datasetId+ " and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
I thought I'd be able to reproduce the problem on https://beta.dataverse.org which is running the same commit, but I can't seem to. I'm using Docker locally but it shouldn't matter. The SQL statment definitely needs a space. In my example, dataset id 3 is being glommed onto and as 3and.
The text was updated successfully, but these errors were encountered:
I'm on 39794d5 on develop (post 6.1) and I can easily reproduce on my laptop a problem with an SQL query in GuestbookResponseServiceBean.
Steps to reproduce:
mvn test -Dtest=FilesIT#testAddTinyFile
.Screenshots:
![Screenshot 2024-01-12 at 12 23 36 PM](https://private-user-images.githubusercontent.com/21006/296316781-d375ae77-dfdf-48f6-984d-0f8910c4d7d7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg0MTY5MjksIm5iZiI6MTcxODQxNjYyOSwicGF0aCI6Ii8yMTAwNi8yOTYzMTY3ODEtZDM3NWFlNzctZGZkZi00OGY2LTk4NGQtMGY4OTEwYzRkN2Q3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE1VDAxNTcwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2ZGI5YzM4YmI1OWE1YjA1MTM2ZDAzZmYxY2QzZDg1MmJjNTdlM2U2NWFiY2JiNzE3N2EyZmYxYzEwNDk0NGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5_mu_vlPYXiFf0GNXRtZZEVDuoCYaGOwVbkC511ww5A)
![Screenshot 2024-01-12 at 12 23 41 PM](https://private-user-images.githubusercontent.com/21006/296316783-aee2d71f-c7a1-4eb0-a0eb-4b8071c60fd2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg0MTY5MjksIm5iZiI6MTcxODQxNjYyOSwicGF0aCI6Ii8yMTAwNi8yOTYzMTY3ODMtYWVlMmQ3MWYtYzdhMS00ZWIwLWEwZWItNGI4MDcxYzYwZmQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE1VDAxNTcwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxNGE0YTExNDA1NjhlMzc1NWFiMzA2ZDI4N2QwMDA1YThiOGE2M2ExOWQzYjA4YmY4ZmEzNjM3Y2Q1N2Y1MDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3ASG8N9EbjWiK6P9LgLU8LmjvWYBHkqb_wD8qUyhQ3I)
Here's the fix we need (an extra space on line 931:
- query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.dataset_id = " + datasetId+ "and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
+ query = em.createNativeQuery("select count(o.id) from GuestbookResponse o where o.dataset_id = " + datasetId+ " and eventtype != '" + GuestbookResponse.ACCESS_REQUEST +"'");
I thought I'd be able to reproduce the problem on https://beta.dataverse.org which is running the same commit, but I can't seem to. I'm using Docker locally but it shouldn't matter. The SQL statment definitely needs a space. In my example, dataset id 3 is being glommed onto and as
3and
.The text was updated successfully, but these errors were encountered: