[opencms-dev] CmsDbSqlException

Claus Priisholm cpr at codedroids.com
Wed Jun 9 09:55:51 CEST 2010


I am not sure where the problem occurs, but when upgrading involved 
products to fairly new ones (like MySQL 5.1, Java 6 and  OpenCms 7.x) I 
find it necessary to enable testOnBorrow and the related testQuery in 
opencms.properties to avoid unexpected problems.

Konstantin Ott wrote:
> Hello list,
> 
> since a few days we find in the opencms log file SQL Exceptions. It 
> seems to happen when publishing a file.
> It is not reproducable and the SELECT is ok. There is a lot of load on 
> the system and there is a lot of changing content. But the problem only 
> appeared 2 times last week.
> OpenCMS seems to loose a connection every now and then. Some time ago we 
> switched the system from Suse-Mysql5.0.51 to Debian-Mysql 5.1.45.
> I don't know if its the reason.
> Has anybody got an idea?
> 
> greetings
> Konstantin Ott
> 
> 
> 
> 
> 
> org.opencms.db.CmsDbSqlException: An SQL error occurred when executing 
> the following query: com.mysql.jdbc.PreparedStatement at f22345d: SELECT 
> CMS_OFFLINE_CONTENTS.FILE_CONTENT FROM CMS_OFFLINE_CONTENTS WHERE 
> CMS_OFFLINE_CONTENTS.RESOURCE_ID='99a69fba-bd41-11dc-9d14-69bdd7447ccc'.
>          at 
> org.opencms.db.generic.CmsVfsDriver.readContent(CmsVfsDriver.java:1468)
>          at 
> org.opencms.ocee.cache.CmsVfsCache.readContent(CmsVfsCache.java:469)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1068)
>          at 
> org.opencms.ocee.cache.CmsProjectCache.publishFileContent(CmsProjectCache.java:385)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishChangedFile(CmsProjectDriver.java:2760)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:964)
>          at 
> org.opencms.ocee.cache.CmsProjectCache.publishFile(CmsProjectCache.java:361)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1455)
>          at 
> org.opencms.ocee.cache.CmsProjectCache.publishProject(CmsProjectCache.java:421)
>          at 
> org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5221)
>          at 
> org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:199)
> Caused by: com.mysql.jdbc.CommunicationsException: Communications link 
> failure due to underlying exception:
> 
> ** BEGIN NESTED EXCEPTION **
> 
> java.lang.ArrayIndexOutOfBoundsException
> 
> STACKTRACE:
> 
> java.lang.ArrayIndexOutOfBoundsException
>          at java.lang.System.arraycopy(Native Method)
>          at 
> com.mysql.jdbc.CompressedInputStream.read(CompressedInputStream.java:281)
>          at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1994)
>          at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2464)
>          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2916)
>          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
>          at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1360)
>          at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2358)
>          at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:451)
>          at 
> com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2076)
>          at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1451)
>          at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1787)
>          at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
>          at 
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
>          at 
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1448)
>          at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
>          at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
>          at 
> org.opencms.db.generic.CmsVfsDriver.readContent(CmsVfsDriver.java:1453)
>          at 
> org.opencms.ocee.cache.CmsVfsCache.readContent(CmsVfsCache.java:469)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1068)
>          at 
> org.opencms.ocee.cache.CmsProjectCache.publishFileContent(CmsProjectCache.java:385)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishChangedFile(CmsProjectDriver.java:2760)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:964)
>          at 
> org.opencms.ocee.cache.CmsProjectCache.publishFile(CmsProjectCache.java:361)
>          at 
> org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1455)
>          at 
> org.opencms.ocee.cache.CmsProjectCache.publishProject(CmsProjectCache.java:421)
>          at 
> org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5221)
>          at 
> org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:199)
> 
> 
> ** END NESTED EXCEPTION **
> 
> 
> 
> Last packet sent to the server was 2 ms ago.
>          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2922)
>          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
>          at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1360)
>          at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2358)
>          at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:451)
>          at 
> com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2076)
>          at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1451)
>          at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1787)
>          at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
>          at 
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
>          at 
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1448)
>          at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
>          at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
>          at 
> org.opencms.db.generic.CmsVfsDriver.readContent(CmsVfsDriver.java:1453)
> 

-- 
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
-- 
Javadocs and other OpenCms stuff: 
http://www.codedroids.com/community/opencms



More information about the opencms-dev mailing list