开发者

HSQLDB is working on Windows but throws exceptions on Linux

This is really annoying: my java web-appl开发者_JAVA技巧ication deployed on Windows Tomcat runs perfectly. When application is deployed to Linux HSQLDB starts throwing exeptions about bad SQL grammar and syntax of elementary SQL statements. Like "DROP TABLE Test IF EXISTS" "IF EXISTS" is an error or "double" type is not supported. I tested with hsql 2.1.0 and hsql 1.8.1 - same errors.

My brain is in real stackoverflow. Am I struggling with a known issue?

P.S. After further investigation it shows that my web-application of Linux suddenly switches to DBCP of Tomcat instead of using DBCP in the WEB-INF/lib


HSQLDB does not run differently in Linux. It is possible that an earlier version Jar is in Tomcat's classpath in Linux. In this situation, classes from the early jar may be picked up.

It is possible to add a test to your app to detect the existence of early version Jars.

For example DatabaseMetaData#getDriverVersion() will report the version of the jar.


I appologize for the question. The cause of the problem had nothing to do with HSQL database. The datasource was created using Spring and I was using th same name for teh datasource bean in two different places.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜