[opencms-dev] SQL UPDATE Syntax error for CMS_TASK in OpenCMS setup wizard
Preece, Kaz
kpreece at dodo.com.au
Sun Jan 1 23:38:11 CET 2006
Hi,
During the OpenCMS wizard setup I received a critical error. I have
identified the problem here, but dont know how to resolve it.
My implementation of MYSQL require single quotes around DATETIME values in
update statements. As you can see from the error log below (line 20:), the
setup wizard does not use single quotes for DATETIME values as required when
attempting to update the CMS_TASK table with initial records.
My general environment is as follows;
OpenCms, version 6.0.3
MYSQL 4.1.16
XML Parser: Xerces-J 2.7.1
Servlet engine: Apache Tomcat/5.0
Operating system: Linux 2.6.14-1.1653_FC4
JDK version: 1.4.2
What are my options here
a) configure mysql to accept non single quote DATETIME values?
b) use different mysql or OpenCms?
c) edit all update statements in OpenCms?
d) Is this a parser issue?
------------Start error log----------------------
56:
55: Shutdown completed, total uptime was 01:17:27.
54: Shutting down OpenCms, version 6.0.3 in web application "OpenCms"
53:
52:
51: at .__clone (/lib/obsolete/linuxthreads/libc-2.3.5.so)
50: at .GC_start_routine (/usr/lib/libgcj.so.6.0.0)
49: at org.OpenCms.setup.CmsSetupWorkplaceImportThread.run() (Unknown
Source)
48: at org.OpenCms.setup.CmsSetupWorkplaceImportThread.kill() (Unknown
Source)
47: at org.OpenCms.main.CmsShell.exit() (Unknown Source)
46: at java.lang.Object.getClass() (/usr/lib/libgcj.so.6.0.0)
45: java.lang.NullPointerException
44: at .__clone (/lib/obsolete/linuxthreads/libc-2.3.5.so)
43: at .GC_start_routine (/usr/lib/libgcj.so.6.0.0)
42: at org.OpenCms.setup.CmsSetupWorkplaceImportThread.run() (Unknown
Source)
41: at org.OpenCms.main.CmsShell.start(java.io.FileInputStream) (Unknown
Source)
40: at org.OpenCms.main.CmsShell.executeCommands(java.io.FileInputStream)
(Unknown Source)
39: at org.OpenCms.main.CmsShell.printPrompt() (Unknown Source)
38: java.lang.NullPointerException
37: ...12 more
36: at
org.OpenCms.db.generic.CmsWorkflowDriver.writeTask(org.OpenCms.db.CmsDbConte
xt, org.OpenCms.workflow.CmsTask) (Unknown Source)
35: at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate()
(Unknown Source)
34: at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate()
(Unknown Source)
33: at com.mysql.jdbc.PreparedStatement.executeUpdate() (Unknown Source)
32: at com.mysql.jdbc.PreparedStatement.executeUpdate(byte[][],
java.io.InputStream[], boolean[], int[], boolean[]) (Unknown Source)
31: at com.mysql.jdbc.Connection.execSQL(java.lang.String, int,
com.mysql.jdbc.Buffer, int, boolean, boolean, java.lang.String) (Unknown
Source)
30: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(com.mysql.jdbc.Buffer, int,
com.mysql.jdbc.Connection, int, boolean, java.lang.String) (Unknown Source)
29: at com.mysql.jdbc.MysqlIO.sendCommand(int, java.lang.String,
com.mysql.jdbc.Buffer) (Unknown Source)
28: at com.mysql.jdbc.MysqlIO.checkErrorPacket(int) (Unknown Source)
27: Caused by: java.sql.SQLException: Syntax error or access violation
message from server: "You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near '20:37:45,WAKEUPTIME=2005-12-31 20:37:45,TIMEOUT=2005-12-31
20:37:45,ENDTIME=null' at line 1"
26: ...8 more
25: at
org.OpenCms.db.CmsDriverManager.newInstance(org.OpenCms.configuration.CmsCon
figurationManager, org.OpenCms.db.CmsSecurityManager,
org.OpenCms.db.I_CmsDbContextFactory) (Unknown Source)
24: at
org.OpenCms.db.CmsDriverManager.init(org.OpenCms.configuration.CmsConfigurat
ionManager, java.util.Map, org.OpenCms.db.I_CmsVfsDriver,
org.OpenCms.db.I_CmsUserDriver, org.OpenCms.db.I_CmsProjectDriver,
org.OpenCms.db.I_CmsWorkflowDriver, org.OpenCms.db.I_CmsBackupDriver)
(Unknown Source)
23: at
org.OpenCms.db.generic.CmsProjectDriver.fillDefaults(org.OpenCms.db.CmsDbCon
text) (Unknown Source)
22: at
org.OpenCms.db.generic.CmsWorkflowDriver.createTask(org.OpenCms.db.CmsDbCont
ext, int, int, int, org.OpenCms.util.CmsUUID, org.OpenCms.util.CmsUUID,
org.OpenCms.util.CmsUUID, java.lang.String, java.sql.Timestamp,
java.sql.Timestamp, int) (Unknown Source)
21: at
org.OpenCms.db.generic.CmsWorkflowDriver.writeTask(org.OpenCms.db.CmsDbConte
xt, org.OpenCms.workflow.CmsTask) (Unknown Source)
20: Caused by: org.OpenCms.db.CmsDbSqlException: An SQL error occurred when
executing the following query: com.mysql.jdbc.PreparedStatement at 2d061d11:
UPDATE CMS_TASK SET
NAME='Online',STATE=2,TASKTYPEREF=1,ROOT=0,PARENT=0,INITIATORUSERREF='c300ba
5c-01e8-3727-b305-5dcc9ccae1ee',ROLEREF='5f81f1a1-1f7d-3af6-b188-3bac3da5458
0',AGENTUSERREF='c300ba5c-01e8-3727-b305-5dcc9ccae1ee',ORIGINALUSERREF='c300
ba5c-01e8-3727-b305-5dcc9ccae1ee',STARTTIME=2005-12-31
20:37:45,WAKEUPTIME=2005-12-31 20:37:45,TIMEOUT=2005-12-31
20:37:45,ENDTIME=null,PERCENTAGE=0,PERMISSION='30308',PRIORITYREF=2,ESCALATI
ONTYPEREF=0,HTMLLINK='../taskforms/adhoc.asp',MILESTONEREF=0,AUTOFINISH=1
WHERE ID=1.
19: at .__clone (/lib/obsolete/linuxthreads/libc-2.3.5.so)
18: at .GC_start_routine (/usr/lib/libgcj.so.6.0.0)
17: at org.OpenCms.setup.CmsSetupWorkplaceImportThread.run() (Unknown
Source)
16: at org.OpenCms.main.CmsShell.CmsShell(java.lang.String,
java.lang.String, java.lang.String, java.lang.String,
org.OpenCms.main.I_CmsShellCommands) (Unknown Source)
15: at
org.OpenCms.main.OpenCmsCore.upgradeRunlevel(org.apache.commons.collections.
ExtendedProperties) (Unknown Source)
14: at
org.OpenCms.main.OpenCmsCore.initConfiguration(org.apache.commons.collection
s.ExtendedProperties) (Unknown Source)
13: at
org.OpenCms.db.CmsSecurityManager.newInstance(org.OpenCms.configuration.CmsC
onfigurationManager, org.OpenCms.db.I_CmsDbContextFactory) (Unknown Source)
12: at
org.OpenCms.db.CmsSecurityManager.init(org.OpenCms.configuration.CmsConfigur
ationManager, org.OpenCms.db.I_CmsDbContextFactory) (Unknown Source)
11: at
org.OpenCms.db.CmsDriverManager.newInstance(org.OpenCms.configuration.CmsCon
figurationManager, org.OpenCms.db.CmsSecurityManager,
org.OpenCms.db.I_CmsDbContextFactory) (Unknown Source)
10: org.OpenCms.main.CmsInitException: Critical error while loading driver
manager.
9: --------------------
8: Giving up, unable to start OpenCms.
7: Critical error while loading driver manager.
6: The following critical error occured:
------------End error log----------------------
TIA
Roy
More information about the opencms-dev
mailing list