java.sql.SQLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Re: I can't add M2 Project
    via by Christian Schlaefcke,
  • Re: I can't add M2 Project
    via by Christian Schlaefcke,
  • Re: I can't add M2 Project
    via by Trygve Laugstøl,
  • Adding DataSource
    via oreports by juniriola
    ,
  • Adding DataSource
    via oreports by juniriola
    ,
  • HSQLDB Problems
    via wsabi4axis by mikeoliveraz
    ,
  • Given the following mappings: <class name="eg.entitynames.A"> <id name="id"> <generator class="uuid"/> </id> <property name="commonProperty" type="string"/> </class> <joined-subclass name="eg.entitynames.B" extends="eg.entitynames.A" entity-name="BA"> <key column="A"/> <dynamic-component name="values"> <property name="field0" type="string"/> <property name="field1" type="string"/> </dynamic-component> </joined-subclass> <joined-subclass name="eg.entitynames.B" extends="BA" entity-name="BB"> <key column="BB"/> <dynamic-component name="values"> <property name="field2" type="string"/> <property name="field3" type="string"/> </dynamic-component> </joined-subclass> And the following class definitions: public class A { private Serializable id; private Integer version; private String commonProperty; public A() { super(); } public Serializable getId() { return this.id; } void setId(Serializable id) { this.id = id; } public Integer getVersion() { return this.version; } void setVersion(Integer version) { this.version = version; } public String getCommonProperty() { return this.commonProperty; } public void setCommonProperty(String commonProperty) { this.commonProperty = commonProperty; } @Override public boolean equals(Object obj) { if (!(obj instanceof A)) return false; A that = (A) obj; return new EqualsBuilder() .append(this.id, that.id) .append(this.commonProperty, that.commonProperty) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder() .append(this.id) .append(this.commonProperty) .toHashCode(); } } public class B extends A { private Map<String,Object> values; public Map<String, Object> getValues() { if (this.values == null) this.values = new HashMap<String,Object>(); return this.values; } void setValues(Map<String, Object> values) { this.values = values; } @Override public boolean equals(Object obj) { if (!(obj instanceof B)) return false; B that = (B) obj; return new EqualsBuilder() .appendSuper(super.equals(obj)) .append(this.values, that.values) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder() .appendSuper(super.hashCode()) .append(this.values) .toHashCode(); } } the following hql will work from BA as b where b.values.field1 = 'value1' from BB as b where b.values.field1 = 'value1' from BB where field3 = 'value5' but the follow hql produces the following stack trace from BB as b where b.values.field3 = 'value5' Stack Trace: org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:70) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:1560) at org.hibernate.loader.Loader.list(Loader.java:1540) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:791) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) at eg.entitynames.InheritedDynamicComponentBugTest.testInherentenceFromDynamicParent(InheritedDynamicComponentBugTest.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194) Caused by: java.sql.SQLException: Column not found: BB0_1_.FIELD3 in statement [select bb0_.BB as id, bb0_2_.commonProperty as commonPr2_0_, bb0_1_.field0 as field2_1_, bb0_1_.field1 as field3_1_, bb0_.field2 as field2_2_, bb0_.field3 as field3_2_ from BB bb0_ inner join BA bb0_1_ on bb0_.BB=bb0_1_.A inner join A bb0_2_ on bb0_.BB=bb0_2_.id where bb0_1_.field3='value5'] at org.hsqldb.jdbc.jdbcUtil.throwError(Unknown Source) at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:383) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:321) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:86) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1125) at org.hibernate.loader.Loader.doQuery(Loader.java:369) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210) at org.hibernate.loader.Loader.doList(Loader.java:1557) ... 21 more Log Output: INFO - Hibernate 3.0.2 INFO - hibernate.properties not found INFO - using CGLIB reflection optimizer INFO - using JDK 1.4 java.sql.Timestamp handling INFO - Mapping class: eg.entitynames.A -> A INFO - Mapping joined-subclass: BA -> BA INFO - Mapping joined-subclass: BB -> BB INFO - Using dialect: org.hibernate.dialect.HSQLDialect INFO - processing extends queue INFO - processing collection mappings INFO - processing association property references INFO - processing foreign key constraints INFO - processing extends queue INFO - processing collection mappings INFO - processing association property references INFO - processing foreign key constraints INFO - Running hbm2ddl schema export INFO - exporting generated schema to database INFO - Using Hibernate built-in connection pool (not for production use!) INFO - Hibernate connection pool size: 20 INFO - autocommit mode: false INFO - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:. INFO - connection properties: {user=sa, password=****} alter table BA drop constraint FK83F7C8935ED alter table BB drop constraint FK840147F drop table A if exists drop table BA if exists drop table BB if exists create table A ( id varbinary(255) not null, commonProperty varchar(255), primary key (id) ) create table BA ( A varbinary(255) not null, field0 varchar(255), field1 varchar(255), primary key (A) ) create table BB ( BB varbinary(255) not null, field2 varchar(255), field3 varchar(255), primary key (BB) ) alter table BA add constraint FK83F7C8935ED foreign key (A) references A alter table BB add constraint FK840147F foreign key (BB) references BA INFO - schema export complete INFO - cleaning up connection pool: jdbc:hsqldb:. INFO - processing extends queue INFO - processing collection mappings INFO - processing association property references INFO - processing foreign key constraints INFO - Using Hibernate built-in connection pool (not for production use!) INFO - Hibernate connection pool size: 20 INFO - autocommit mode: false INFO - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:. INFO - connection properties: {user=sa, password=****} INFO - RDBMS: HSQL Database Engine, version: 1.7.2 INFO - JDBC driver: HSQL Database Engine Driver, version: 1.7.2 INFO - Using dialect: org.hibernate.dialect.HSQLDialect INFO - JDBC batch size: 15 INFO - JDBC batch updates for versioned data: disabled INFO - Scrollable result sets: enabled INFO - JDBC3 getGeneratedKeys(): disabled INFO - Aggressive release : disabled INFO - Default batch fetch size: 1 INFO - Generate SQL with comments: disabled INFO - Order SQL updates by primary key: disabled INFO - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory INFO - Using ASTQueryTranslatorFactory INFO - Query language substitutions: {} INFO - Using default transaction strategy (direct JDBC transactions) INFO - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) INFO - Automatic flush during beforeCompletion(): disabled INFO - Automatic session close at end of transaction: disabled INFO - Second-level cache: enabled INFO - Query cache: disabled INFO - Cache provider: org.hibernate.cache.EhCacheProvider INFO - Optimize cache for minimal puts: disabled INFO - Structured second-level cache entries: enabled INFO - Statistics: disabled INFO - Deleted entity synthetic identifier rollback: disabled INFO - Default entity-mode: pojo INFO - building session factory WARN - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/wdemoss/projects/threewide/common/dev/lib/spring/ehcache-1.1.jar!/ehcache-failsafe.xml INFO - Not binding factory to JNDI, no JNDI name configured INFO - Checking 0 named queries INFO - cleaning up connection pool: jdbc:hsqldb:. WARN - SQL Error: -28, SQLState: S0022 ERROR - Column not found: BB0_1_.FIELD3 in statement [select bb0_.BB as id, bb0_2_.commonProperty as commonPr2_0_, bb0_1_.field0 as field2_1_, bb0_1_.field1 as field3_1_, bb0_.field2 as field2_2_, bb0_.field3 as field3_2_ from BB bb0_ inner join BA bb0_1_ on bb0_.BB=bb0_1_.A inner join A bb0_2_ on bb0_.BB=bb0_2_.id where bb0_1_.field3='value5'] WARN - SQL Error: -28, SQLState: S0022 ERROR - Column not found: BB0_1_.FIELD3 in statement [select bb0_.BB as id, bb0_2_.commonProperty as commonPr2_0_, bb0_1_.field0 as field2_1_, bb0_1_.field1 as field3_1_, bb0_.field2 as field2_2_, bb0_.field3 as field3_2_ from BB bb0_ inner join BA bb0_1_ on bb0_.BB=bb0_1_.A inner join A bb0_2_ on bb0_.BB=bb0_2_.id where bb0_1_.field3='value5']
    via by William F. DeMoss II,
  • Error on install.db.schema with hsql
    via xplanner by klinge
    ,
    • java.sql.SQLException: Table not found: SEQUENCE_TABLE in statement [SELECT NEXT_VAL FROM SEQUENCE_TABLE WHERE SEQUENCE_NAME=?] at org.hsqldb.jdbc.jdbcUtil.throwError(Unknown Source) at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) at org.jpox.store.table.SequenceTable.getNextVal(SequenceTable.java:155) at org.jpox.poid.SequenceTablePoidGenerator.reserveBlock(SequenceTablePoidGenerator.java:74) at org.jpox.poid.PoidManager.obtainPoidBlock(PoidManager.java:85) at org.jpox.poid.PoidManager.getPoidBlock(PoidManager.java:181) at org.jpox.poid.PoidManager.getPoid(PoidManager.java:54) at org.jpox.store.StoreManager.getNextOID(StoreManager.java:1301) at org.jpox.store.table.JDOBaseTable.newOID(JDOBaseTable.java:134) at org.jpox.store.StoreManager.newObjectID(StoreManager.java:1099) at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:375) at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:839) at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:860) at org.apache.maven.continuum.project.ContinuumJPoxStore.addContinuumProject(ContinuumJPoxStore.java:173) at org.apache.maven.continuum.store.ModelloJPoxContinuumStore.addProject(ModelloJPoxContinuumStore.java:100) at org.apache.maven.continuum.core.DefaultContinuumCore.addProjectAndCheckOutSources(DefaultContinuumCore.java:767) at org.apache.maven.continuum.core.DefaultContinuumCore.addProjectsFromUrl(DefaultContinuumCore.java:209) at org.apache.maven.continuum.core.DefaultContinuumCore.addProjectsFromUrl(DefaultContinuumCore.java:175) at org.apache.maven.continuum.DefaultContinuum.addMavenTwoProject(DefaultContinuum.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:255) at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:553) at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:54) at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:577) at ognl.ASTMethod.getValueBody(ASTMethod.java:84) at ognl.SimpleNode.getValue(SimpleNode.java:129) at ognl.Ognl.getValue(Ognl.java:335) at ognl.Ognl.getValue(Ognl.java:380) at ognl.Ognl.getValue(Ognl.java:359) at org.codehaus.plexus.formica.action.CallMethod.uponSuccessfulValidation(CallMethod.java:21) at org.codehaus.plexus.formica.action.AbstractEntityAction.execute(AbstractEntityAction.java:100) at org.codehaus.plexus.action.web.ActionValve.invoke(ActionValve.java:73) at org.codehaus.plexus.summit.pipeline.SummitPipeline.invoke(SummitPipeline.java:45) at org.codehaus.plexus.summit.Summit.doGet(Summit.java:37) at org.codehaus.plexus.summit.Summit.doPost(Summit.java:91) at javax.servlet.http.HttpServlet.service(HttpServlet.java:615) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    4 more bugmates