[opencms-dev] SqlException while publishing

Massimiliano massyc at mclink.it
Fri Sep 24 18:35:48 CEST 2004


I'm experiencing a problem when publish new resources in opencms VFS.

During the publishing process of a fresh created resource, I don't
receive any error message from the back office, but the little flag near
the resource, instead to disappear, change color from red to gray.
At the same time a critical error caused by an SqlException is printed
in the opencms log file.

The same procedure on an already existing resource works fine.

The site will be in production at the end of october and now we're
populating openCms with the contents that will be available on the site.

I can restore data from a backup made before I see the problem for the
first time, but I would like to understand the reason of the exception
and how to avoid that it happens again in the future when the site will
be in production.

Opencms version is 5.0.0 and the VFS contains a lot of documents that
will grow significantly in the future.
At the moment the opencms database size is around 500 MB.

Below you can find the error message found in the opencms.log file and
the mySql statement that caused the exception (I take it from the mySql
query log file).

Thanks in advance and sorry for my poor english.

Massimiliano Carra.

---
Critical message in opencms.log file is the following:

[24.09.2004 17:33:26] <opencms_critical>
[130176/106125/24051][com.opencms.file.CmsObject.publishProject()/1]
Project:1356 Time:Fri Sep 24 17:33:26 CEST 2004
[24.09.2004 17:33:26] <opencms_critical>
[130176/106124/24052][com.opencms.file.CmsObject.publishProject()/1]
User: [User]:Admin , Id=2 , flags=0 , type=0 :the admin-user
[24.09.2004 17:33:26] <opencms_critical>
[130176/106120/24056][com.opencms.file.CmsObject.publishProject()/1]
Exception: com.opencms.core.CmsException: 4 Sql exception. Detailed
error: [com.opencms.file.mySql.CmsDbAccess] Invalid argument value:
Duplicate entry '5512' for key 1.
root cause was java.sql.SQLException: Invalid argument value: Duplicate
entry '5512' for key 1
[24.09.2004 17:33:26] <opencms_info>
[130176/106117/24059][com.opencms.file.CmsObject.publishProject()/2]
Project:1356 Time:Fri Sep 24 17:33:26 CEST 2004
[24.09.2004 17:33:26] <opencms_info>
[130176/106116/24060][com.opencms.file.CmsObject.publishProject()/2]
User: [User]:Admin , Id=2 , flags=0 , type=0 :the admin-user
[24.09.2004 17:33:26] <opencms_info>
[130176/106115/24061][com.opencms.file.CmsObject.publishProject()/2]
Vector was null or empty

Statement that causes the Exception:

INSERT INTO CMS_ONLINE_RESOURCES (RESOURCE_ID, PARENT_ID, RESOURCE_NAME,
RESOURCE_TYPE, RESOURCE_FLAGS, USER_ID, GROUP_ID, PROJECT_ID, FILE_ID,
ACCESS_FLAGS, STATE, LOCKED_BY, LAUNCHER_TYPE, LAUNCHER_CLASSNAME,
DATE_CREATED, DATE_LASTMODIFIED, RESOURCE_SIZE,
RESOURCE_LASTMODIFIED_BY) VALUES
(5512,8,'/default/vfs/system/galleries/download/ciao/',0,0,2,2,1,-1,511,2,-1,-1,'UNKNOWN','2004-09-24
17:33:08','2004-09-24 17:33:09',0,2)






-- 

Il Sopra e il Sotto sono concetti relativi...
relativi alla lotta che bisogna fare per sovvertirli

(Subcomandante Marcos)



More information about the opencms-dev mailing list