The first time I try to insert a blob using a prepared statement, I
got this exception:
Caused by: org.h2.jdbc.JdbcSQLException: Error General :
"java.lang.ClassNotFoundException: org.h2.store.fs.FileSystemZip"
General error: "java.lang.ClassNotFoundException:
org.h2.store.fs.FileSystemZip" [50000-130]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:317)
at org.h2.message.DbException.get(DbException.java:157)
at org.h2.message.DbException.convert(DbException.java:285)
at
org.h2.store.fs.FileSystem.registerDefaultServices(FileSystem.java:58)
at org.h2.store.fs.FileSystem.getInstance(FileSystem.java:36)
at org.h2.util.IOUtils.listFiles(IOUtils.java:577)
at org.h2.value.ValueLob.getFileList(ValueLob.java:324)
at org.h2.value.ValueLob.getNewObjectId(ValueLob.java:252)
at org.h2.value.ValueLob.initLarge(ValueLob.java:384)
at org.h2.value.ValueLob.createFromStream(ValueLob.java:395)
at org.h2.value.ValueLob.createBlob(ValueLob.java:367)
at org.h2.jdbc.JdbcConnection.createBlob(JdbcConnection.java:1637)
at
org.h2.jdbc.JdbcPreparedStatement.setBinaryStream(JdbcPreparedStatement.java:844)
at
org.h2.jdbc.JdbcPreparedStatement.setBinaryStream(JdbcPreparedStatement.java:865)
at
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setBinaryStream(DelegatingPreparedStatement.java:154)
at dinamica.Db.saveBlob(Db.java:530)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.h2.store.fs.FileSystemZip
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
org.h2.store.fs.FileSystem.registerDefaultServices(FileSystem.java:56)
... 31 more
After this exception, if I retry then the insert proceeds OK, as well
as subsequent inserts. I am using the latest H2 version in TCP server
mode, also using same version JDBC driver. Client is a Tomcat webapp,
only one user using the webapp.
I can successfully execute other queries before the exception, and
also verified that it is a problem related to the first prepared
statement that tries to insert a blob on a given connection. If I
restart tomcat without restarting the database server, the exception
occurs again, just for the first time.
Regards,
Martin
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.