java - JPA Hibernate HSQLDB - VARBINARY() field and error attempting to select -
i found similar question @ hsqldb: duplicate column name, unsupported internal operation: type, invalid character cast, there no intelligible answer. looked @ http://old.nabble.com/unsupported-internal-operation%3a-statementdmql-td27427172.html reports issue bug in hsqldb, should fixed in version using (2.2). so, here's details of problem:
i have entity stores byte[] data in varbinary(128) field inside of hsqldb. table created successfully, when try select table, following stack trace:
java.sql.sqlexception: java.lang.runtimeexception: unsupported internal operation: type java.lang.runtimeexception: unsupported internal operation: type @ org.hsqldb.jdbc.util.sqlexception(unknown source) @ org.hsqldb.jdbc.util.sqlexception(unknown source) @ org.hsqldb.jdbc.jdbcpreparedstatement.fetchresult(unknown source) @ org.hsqldb.jdbc.jdbcpreparedstatement.executequery(unknown source) @ com.mchange.v2.c3p0.impl.newproxypreparedstatement.executequery(newproxypreparedstatement.java:76) @ org.hibernate.jdbc.abstractbatcher.getresultset(abstractbatcher.java:208) @ org.hibernate.loader.loader.getresultset(loader.java:1953) @ org.hibernate.loader.loader.doquery(loader.java:802) @ org.hibernate.loader.loader.doqueryandinitializenonlazycollections(loader.java:274) @ org.hibernate.loader.loader.dolist(loader.java:2533) @ org.hibernate.loader.loader.listignorequerycache(loader.java:2276) @ org.hibernate.loader.loader.list(loader.java:2271) @ org.hibernate.loader.hql.queryloader.list(queryloader.java:452) @ org.hibernate.hql.ast.querytranslatorimpl.list(querytranslatorimpl.java:363) @ org.hibernate.engine.query.hqlqueryplan.performlist(hqlqueryplan.java:196) @ org.hibernate.impl.sessionimpl.list(sessionimpl.java:1268) @ org.hibernate.impl.queryimpl.list(queryimpl.java:102) @ org.hibernate.ejb.queryimpl.getsingleresult(queryimpl.java:274) @ com.dns.recursive.ipcache.data.cachewrapper.findentry(cachewrapper.java:206) @ com.dns.recursive.ipcache.net.tcpworker.run(tcpworker.java:114) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603) @ java.lang.thread.run(thread.java:636) caused by: org.hsqldb.hsqlexception: java.lang.runtimeexception: unsupported internal operation: type @ org.hsqldb.error.error.error(unknown source) @ org.hsqldb.result.result.newerrorresult(unknown source) @ org.hsqldb.statementdmql.execute(unknown source) @ org.hsqldb.session.executecompiledstatement(unknown source) @ org.hsqldb.session.execute(unknown source) ... 21 more caused by: java.lang.runtimeexception: unsupported internal operation: type @ org.hsqldb.error.error.runtimeerror(unknown source) @ org.hsqldb.types.type.subtract(unknown source) @ org.hsqldb.expressionarithmetic.getvalue(unknown source) @ org.hsqldb.expressionorderby.getvalue(unknown source) @ org.hsqldb.queryspecification.buildresult(unknown source) @ org.hsqldb.queryspecification.getsingleresult(unknown source) @ org.hsqldb.queryspecification.getresult(unknown source) @ org.hsqldb.statementquery.getresult(unknown source) ... 24 more
i use in figuring out cause of this. in advance!!
unsupported internal operation generic error reports class in error occured. low-level line of defence against errors. sql error caught , reported before type of error occurs. in case not caught. other exception reports same error string may totally unrelated.
you need report create table statement , select statement runs against it.
the stack trace indicates there order clause includes order - b or b not numbers.
Comments
Post a Comment