Foren

Upload Image problem

dayah dayah, geändert vor 18 Jahren.

Upload Image problem

New Member Beiträge: 2 Beitrittsdatum: 16.02.06 Neueste Beiträge
Can somebody help me..<br /><br />i&#39;ve got this error msg :<br /><br />An unexpected system error occurred.<br /><br />org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.liferay.portlet.imagegallery.service.persistence.IGImageHBM]; SQL [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Unique constraint violation: in statement [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is java.sql.SQLException: Unique constraint violation: in statement [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]<br /><br />How to i solve it.. because i can&#39;t upload image...<br /><br />please help...
José Oliver Segura, geändert vor 18 Jahren.

Upload Image problem

Junior Member Beiträge: 73 Beitrittsdatum: 01.08.05 Neueste Beiträge
<br />Can somebody help me..<br /><br />i&#39;ve got this error msg :<br /><br />An unexpected system error occurred.<br /><br />org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.liferay.portlet.imagegallery.service.persistence.IGImageHBM]; SQL [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Unique constraint violation: in statement [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is java.sql.SQLException: Unique constraint violation: in statement [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]<br /><br />How to i solve it.. because i can&#39;t upload image...<br /><br />please help...<br />
<br /><br />I don&#39;t know exactly the solution, but it seems that you are trying to insert a duplicate &quot;unique&quot; field, maybe some identifier or others. I suggest you to take a look to the DB creation scripts or created DB table -IGImage- to check which are the fields that have a &quot;unique&quot; constraint. That could help to see the real problem.<br /><br />Just to check: are you trying to insert an image with the same name that other that already exists in the same folder? I don&#39;t know which are the fields that compose the PK of the table, but maybe it is just composed by the file name or file name + folder name (plus company ID)?<br />
dayah dayah, geändert vor 18 Jahren.

Upload Image problem

New Member Beiträge: 2 Beitrittsdatum: 16.02.06 Neueste Beiträge
<br />I don&#39;t know exactly the solution, but it seems that you are trying to insert a duplicate &quot;unique&quot; field, maybe some identifier or others. I suggest you to take a look to the DB creation scripts or created DB table -IGImage- to check which are the fields that have a &quot;unique&quot; constraint. That could help to see the real problem.<br /><br />Just to check: are you trying to insert an image with the same name that other that already exists in the same folder? I don&#39;t know which are the fields that compose the PK of the table, but maybe it is just composed by the file name or file name + folder name (plus company ID)?<br />
<br /><br />i&#39;m not sure how this prob. occur..<br />actually i have upload some pic before...<br />when i want to add some more pictures this problem arise..<br />the image name that i&#39;m trying to upload is not same with other that already exist in <br />same folder.. however i&#39;m not so sure if the image name is already exist in other<br />folders.<br /><br />im use liferay-portal-pro-3.6.0-tomcat.zip<br />where can i check created DB table.. ?<br /><br />
José Oliver Segura, geändert vor 18 Jahren.

Upload Image problem

Junior Member Beiträge: 73 Beitrittsdatum: 01.08.05 Neueste Beiträge
<br />i&#39;m not sure how this prob. occur..<br />actually i have upload some pic before...<br />when i want to add some more pictures this problem arise..<br />the image name that i&#39;m trying to upload is not same with other that already exist in <br />same folder.. however i&#39;m not so sure if the image name is already exist in other<br />folders.<br /><br />im use liferay-portal-pro-3.6.0-tomcat.zip<br />where can i check created DB table.. ?<br />
<br /><br />just download the sources and look for .sql files, that are the db creation scripts<br /><br />good luck,<br />jose
thumbnail
Rajiv Terwadkar, geändert vor 18 Jahren.

Upload Image problem

Regular Member Beiträge: 219 Beitrittsdatum: 28.09.05 Neueste Beiträge
<br />Can somebody help me..<br /><br />i&#39;ve got this error msg :<br /><br />An unexpected system error occurred.<br /><br />org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.liferay.portlet.imagegallery.service.persistence.IGImageHBM]; SQL [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Unique constraint violation: in statement [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is java.sql.SQLException: Unique constraint violation: in statement [insert into IGImage (userId, createDate, modifiedDate, folderId, description, height, width, size_, imageId, companyId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]<br /><br />How to i solve it.. because i can&#39;t upload image...<br /><br />please help...<br />
<br />Hello dayah,<br />From the above error its very clear that its a unique key problem, If you are trying to upload the same image then try replacing it or get the imageId and delete that specific one. If you can debug while uploading that will give you exact imageId and you will be able to tract it and if required delete it.<br /> <br />
Manuel Salvatori, geändert vor 16 Jahren.

RE: Upload Image problemorry, how can i get a new I

Junior Member Beiträge: 57 Beitrittsdatum: 29.01.08 Neueste Beiträge
Sorry how can i get a new ImageID? I'm using the image folder to store my photos but i need to generate a clear ID for each image, and i don't know if i could generate same problem.

Ty
Manuel