These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: tables not being created
PostPosted: Wed Feb 01, 2006 1:52 pm 
Newbie

Joined: Tue Dec 13, 2005 12:16 pm
Posts: 6
Hi,

It seems that hibernate is not creating tables. Error is:

11:59:00,168 ERROR JDBCExceptionReporter:72 - Table not found in statement [insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)]

Things were fine before I started using the <component> tag.

Thanks for any tips.
--
Nick


Hibernate version: 3.1

Mapping documents:

<hibernate-mapping>

<class name="com.ws.Profile" table="PROFILES">
<id name="id" column="PROFILE_ID">
<generator class="native"/>
</id>

<property name="name"/>

<property name="description"/>

<property name="sex" type="character"/>

<set name="scores" table="ProfileScores" order-by="Scores.attribute">
<key column="PROFILE_ID"/>
<many-to-many column="SCORE_ID"
unique="true"
class="com.ws.Profile$Score"/>
</set>

<component name="searchCriteria" class="com.ws.SearchCriteria">
<property name="searchSex" type="character"/>

<set name="criteria" table="Criterias" order-by="Criterias.attribute">
<key column="PROFILE_ID"/>
<many-to-many column="CRITERIA_ID"
unique="true"
class="com.ws.SearchCriteria$Criteria"/>
</set>
</component>

</class>

</hibernate-mapping>

<hibernate-mapping>

<class name="com.ws.Profile$Score" table="SCORES">
<id name="id" column="SCORE_ID">
<generator class="native"/>
</id>

<property name="attribute"/>
<property name="value" type="integer"/>


</class>

</hibernate-mapping>

<hibernate-mapping>

<class name="com.ws.SearchCriteria$Criteria" table="CRITERIAS">
<id name="id" column="CRITERIA_ID">
<generator class="native"/>
</id>

<property name="attribute"/>
<property name="low" type="integer"/>
<property name="high" type="integer"/>

</class>

</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():

org.hibernate.Session hSession =
HibernateUtil.getSessionFactory().getCurrentSession();

hSession.beginTransaction();

if (this.scores != null) {
for (java.util.Iterator i = this.scores.iterator(); i.hasNext();) {
hSession.save(i.next());
}
}

this.searchCriteria.persist(hSession);
hSession.save(this);

hSession.getTransaction().commit();

Full stack trace of any exception that occurs:

below

Name and version of the database you are using:

hsqldb 1.8

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


1:58:53,068 INFO Environment:474 - Hibernate 3.1 rc3
11:58:53,108 INFO Environment:504 - hibernate.properties not found
11:58:53,118 INFO Environment:520 - using CGLIB reflection optimizer
11:58:53,128 INFO Environment:550 - using JDK 1.4 java.sql.Timestamp handling
11:58:53,579 INFO Configuration:1264 - configuring from resource: /hibernate.cfg.xml
11:58:53,579 INFO Configuration:1241 - Configuration resource: /hibernate.cfg.xml
11:58:54,310 INFO Configuration:467 - Reading mappings from resource: com/ws/Profile.hbm.xml
11:58:54,850 INFO HbmBinder:265 - Mapping class: com.ws.Profile -> PROFILES
11:58:55,021 INFO HbmBinder:1325 - Mapping collection: com.ws.Profile.scores -> ProfileScores
11:58:55,041 INFO HbmBinder:1325 - Mapping collection: com.ws.Profile.searchCriteria.criteria -> Criterias
11:58:55,041 INFO Configuration:467 - Reading mappings from resource: com/ws/Score.hbm.xml
11:58:55,131 INFO HbmBinder:265 - Mapping class: com.ws.Profile$Score -> SCORES
11:58:55,141 INFO Configuration:467 - Reading mappings from resource: com/ws/Criteria.hbm.xml
11:58:55,241 INFO HbmBinder:265 - Mapping class: com.ws.SearchCriteria$Criteria -> CRITERIAS
11:58:55,241 INFO Configuration:1375 - Configured SessionFactory: null
11:58:55,241 INFO Configuration:1021 - processing extends queue
11:58:55,261 INFO Configuration:1025 - processing collection mappings
11:58:55,682 INFO Configuration:1034 - processing association property references
11:58:55,682 INFO Configuration:1056 - processing foreign key constraints
11:58:56,653 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
11:58:56,653 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
11:58:56,673 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
11:58:56,693 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost
11:58:56,693 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
11:58:57,044 INFO SettingsFactory:77 - RDBMS: HSQL Database Engine, version: 1.8.0
11:58:57,044 INFO SettingsFactory:78 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
11:58:57,174 INFO Dialect:100 - Using dialect: org.hibernate.dialect.HSQLDialect
11:58:57,324 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
11:58:57,354 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
11:58:57,354 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled
11:58:57,354 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled
11:58:57,364 INFO SettingsFactory:136 - JDBC batch size: 15
11:58:57,374 INFO SettingsFactory:139 - JDBC batch updates for versioned data: disabled
11:58:57,384 INFO SettingsFactory:144 - Scrollable result sets: enabled
11:58:57,394 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): disabled
11:58:57,394 INFO SettingsFactory:160 - Connection release mode: auto
11:58:57,404 INFO SettingsFactory:187 - Default batch fetch size: 1
11:58:57,404 INFO SettingsFactory:191 - Generate SQL with comments: disabled
11:58:57,404 INFO SettingsFactory:195 - Order SQL updates by primary key: disabled
11:58:57,414 INFO SettingsFactory:338 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
11:58:57,434 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
11:58:57,444 INFO SettingsFactory:203 - Query language substitutions: {}
11:58:57,444 INFO SettingsFactory:209 - Second-level cache: enabled
11:58:57,444 INFO SettingsFactory:213 - Query cache: disabled
11:58:57,444 INFO SettingsFactory:325 - Cache provider: org.hibernate.cache.NoCacheProvider
11:58:57,474 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled
11:58:57,474 INFO SettingsFactory:237 - Structured second-level cache entries: disabled
11:58:57,524 INFO SettingsFactory:257 - Echoing all SQL to stdout
11:58:57,524 INFO SettingsFactory:264 - Statistics: disabled
11:58:57,524 INFO SettingsFactory:268 - Deleted entity synthetic identifier rollback: disabled
11:58:57,524 INFO SettingsFactory:283 - Default entity-mode: POJO
11:58:57,694 INFO SessionFactoryImpl:153 - building session factory
11:58:59,487 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
11:58:59,517 INFO SessionFactoryImpl:353 - Checking 0 named HQL queries
11:58:59,517 INFO SessionFactoryImpl:373 - Checking 0 named SQL queries
Hibernate: insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)
11:59:00,168 WARN JDBCExceptionReporter:71 - SQL Error: -22, SQLState: S0002
11:59:00,168 ERROR JDBCExceptionReporter:72 - Table not found in statement [insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)]
11:59:00,188 WARN RequestProcessor:516 - Unhandled Exception thrown: class org.hibernate.exception.SQLGrammarException
11:59:00,208 ERROR [MinimalStrutsApp]:253 - Servlet.service() for servlet MinimalStrutsApp threw exception
org.hibernate.exception.SQLGrammarException: could not insert: [com.ws.Profile$Score]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1985)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2404)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:525)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:515)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:511)
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 org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
at $Proxy0.save(Unknown Source)
at com.ws.Profile.persist(Profile.java:94)
at com.ws.ProfileAdminAction.create(ProfileAdminAction.java:46)
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 org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Table not found in statement [insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)]
at org.hsqldb.jdbc.Util.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:442)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1947)
... 49 more


Top
 Profile  
 
 Post subject: Re: tables not being created
PostPosted: Wed Feb 01, 2006 4:56 pm 
Newbie

Joined: Tue Dec 13, 2005 12:16 pm
Posts: 6
I got past the error below. Still I could use some insight into how to
specify the <key> column for the <component> collection.

Currently it is <key column="PROFILE_ID"/> in the mapping

<hibernate-mapping>

<class name="com.ws.Profile" table="PROFILES">
<id name="id" column="PROFILE_ID">
<generator class="native"/>
</id>

<property name="name"/>

<property name="description"/>

<property name="sex" type="character"/>

<set name="scores" table="ProfileScores" order-by="Scores.attribute">
<key column="PROFILE_ID"/>
<many-to-many column="SCORE_ID"
unique="true"
class="com.ws.Profile$Score"/>
</set>

<component name="searchCriteria" class="com.ws.SearchCriteria">
<property name="searchSex" type="character"/>

<set name="criteria" table="Criterias" order-by="Criterias.attribute">
<key column="PROFILE_ID"/>
<many-to-many column="CRITERIA_ID"
unique="true"
class="com.ws.SearchCriteria$Criteria"/>
</set>
</component>

</class>

</hibernate-mapping>

but this results in

Caused by: java.sql.SQLException: Column not found: PROFILE_ID in statement [insert into Criterias (PROFILE_ID, CRITERIA_ID) values (?, ?)]
at org.hsqldb.jdbc.Util.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:442)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:86)
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:171)


thanks for any tips on how to specify the key column.



nafshartous wrote:
Hi,

It seems that hibernate is not creating tables. Error is:

11:59:00,168 ERROR JDBCExceptionReporter:72 - Table not found in statement [insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)]

Things were fine before I started using the <component> tag.

Thanks for any tips.
--
Nick


Hibernate version: 3.1

Mapping documents:

<hibernate-mapping>

<class name="com.ws.Profile" table="PROFILES">
<id name="id" column="PROFILE_ID">
<generator class="native"/>
</id>

<property name="name"/>

<property name="description"/>

<property name="sex" type="character"/>

<set name="scores" table="ProfileScores" order-by="Scores.attribute">
<key column="PROFILE_ID"/>
<many-to-many column="SCORE_ID"
unique="true"
class="com.ws.Profile$Score"/>
</set>

<component name="searchCriteria" class="com.ws.SearchCriteria">
<property name="searchSex" type="character"/>

<set name="criteria" table="Criterias" order-by="Criterias.attribute">
<key column="PROFILE_ID"/>
<many-to-many column="CRITERIA_ID"
unique="true"
class="com.ws.SearchCriteria$Criteria"/>
</set>
</component>

</class>

</hibernate-mapping>

<hibernate-mapping>

<class name="com.ws.Profile$Score" table="SCORES">
<id name="id" column="SCORE_ID">
<generator class="native"/>
</id>

<property name="attribute"/>
<property name="value" type="integer"/>


</class>

</hibernate-mapping>

<hibernate-mapping>

<class name="com.ws.SearchCriteria$Criteria" table="CRITERIAS">
<id name="id" column="CRITERIA_ID">
<generator class="native"/>
</id>

<property name="attribute"/>
<property name="low" type="integer"/>
<property name="high" type="integer"/>

</class>

</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():

org.hibernate.Session hSession =
HibernateUtil.getSessionFactory().getCurrentSession();

hSession.beginTransaction();

if (this.scores != null) {
for (java.util.Iterator i = this.scores.iterator(); i.hasNext();) {
hSession.save(i.next());
}
}

this.searchCriteria.persist(hSession);
hSession.save(this);

hSession.getTransaction().commit();

Full stack trace of any exception that occurs:

below

Name and version of the database you are using:

hsqldb 1.8

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


1:58:53,068 INFO Environment:474 - Hibernate 3.1 rc3
11:58:53,108 INFO Environment:504 - hibernate.properties not found
11:58:53,118 INFO Environment:520 - using CGLIB reflection optimizer
11:58:53,128 INFO Environment:550 - using JDK 1.4 java.sql.Timestamp handling
11:58:53,579 INFO Configuration:1264 - configuring from resource: /hibernate.cfg.xml
11:58:53,579 INFO Configuration:1241 - Configuration resource: /hibernate.cfg.xml
11:58:54,310 INFO Configuration:467 - Reading mappings from resource: com/ws/Profile.hbm.xml
11:58:54,850 INFO HbmBinder:265 - Mapping class: com.ws.Profile -> PROFILES
11:58:55,021 INFO HbmBinder:1325 - Mapping collection: com.ws.Profile.scores -> ProfileScores
11:58:55,041 INFO HbmBinder:1325 - Mapping collection: com.ws.Profile.searchCriteria.criteria -> Criterias
11:58:55,041 INFO Configuration:467 - Reading mappings from resource: com/ws/Score.hbm.xml
11:58:55,131 INFO HbmBinder:265 - Mapping class: com.ws.Profile$Score -> SCORES
11:58:55,141 INFO Configuration:467 - Reading mappings from resource: com/ws/Criteria.hbm.xml
11:58:55,241 INFO HbmBinder:265 - Mapping class: com.ws.SearchCriteria$Criteria -> CRITERIAS
11:58:55,241 INFO Configuration:1375 - Configured SessionFactory: null
11:58:55,241 INFO Configuration:1021 - processing extends queue
11:58:55,261 INFO Configuration:1025 - processing collection mappings
11:58:55,682 INFO Configuration:1034 - processing association property references
11:58:55,682 INFO Configuration:1056 - processing foreign key constraints
11:58:56,653 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
11:58:56,653 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
11:58:56,673 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
11:58:56,693 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost
11:58:56,693 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
11:58:57,044 INFO SettingsFactory:77 - RDBMS: HSQL Database Engine, version: 1.8.0
11:58:57,044 INFO SettingsFactory:78 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
11:58:57,174 INFO Dialect:100 - Using dialect: org.hibernate.dialect.HSQLDialect
11:58:57,324 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
11:58:57,354 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
11:58:57,354 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled
11:58:57,354 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled
11:58:57,364 INFO SettingsFactory:136 - JDBC batch size: 15
11:58:57,374 INFO SettingsFactory:139 - JDBC batch updates for versioned data: disabled
11:58:57,384 INFO SettingsFactory:144 - Scrollable result sets: enabled
11:58:57,394 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): disabled
11:58:57,394 INFO SettingsFactory:160 - Connection release mode: auto
11:58:57,404 INFO SettingsFactory:187 - Default batch fetch size: 1
11:58:57,404 INFO SettingsFactory:191 - Generate SQL with comments: disabled
11:58:57,404 INFO SettingsFactory:195 - Order SQL updates by primary key: disabled
11:58:57,414 INFO SettingsFactory:338 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
11:58:57,434 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
11:58:57,444 INFO SettingsFactory:203 - Query language substitutions: {}
11:58:57,444 INFO SettingsFactory:209 - Second-level cache: enabled
11:58:57,444 INFO SettingsFactory:213 - Query cache: disabled
11:58:57,444 INFO SettingsFactory:325 - Cache provider: org.hibernate.cache.NoCacheProvider
11:58:57,474 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled
11:58:57,474 INFO SettingsFactory:237 - Structured second-level cache entries: disabled
11:58:57,524 INFO SettingsFactory:257 - Echoing all SQL to stdout
11:58:57,524 INFO SettingsFactory:264 - Statistics: disabled
11:58:57,524 INFO SettingsFactory:268 - Deleted entity synthetic identifier rollback: disabled
11:58:57,524 INFO SettingsFactory:283 - Default entity-mode: POJO
11:58:57,694 INFO SessionFactoryImpl:153 - building session factory
11:58:59,487 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
11:58:59,517 INFO SessionFactoryImpl:353 - Checking 0 named HQL queries
11:58:59,517 INFO SessionFactoryImpl:373 - Checking 0 named SQL queries
Hibernate: insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)
11:59:00,168 WARN JDBCExceptionReporter:71 - SQL Error: -22, SQLState: S0002
11:59:00,168 ERROR JDBCExceptionReporter:72 - Table not found in statement [insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)]
11:59:00,188 WARN RequestProcessor:516 - Unhandled Exception thrown: class org.hibernate.exception.SQLGrammarException
11:59:00,208 ERROR [MinimalStrutsApp]:253 - Servlet.service() for servlet MinimalStrutsApp threw exception
org.hibernate.exception.SQLGrammarException: could not insert: [com.ws.Profile$Score]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1985)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2404)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:525)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:515)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:511)
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 org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
at $Proxy0.save(Unknown Source)
at com.ws.Profile.persist(Profile.java:94)
at com.ws.ProfileAdminAction.create(ProfileAdminAction.java:46)
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 org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Table not found in statement [insert into SCORES (attribute, value, SCORE_ID) values (?, ?, null)]
at org.hsqldb.jdbc.Util.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:442)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1947)
... 49 more


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.