-->
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.  [ 1 post ] 
Author Message
 Post subject: Implicit polymorphism still requires mapping for interface
PostPosted: Mon Jun 13, 2005 4:13 am 
Newbie

Joined: Mon Jan 17, 2005 5:43 am
Posts: 13
Location: Macau
Hi,

I have an interface Foo1 that is implemented by two concrete
classes Foo1Child1 and Foo1Child2. I'd like to use implicit
polymorphism. According to the doc I don't need to map Foo1,
but this doesn't seem to be the case.

Hibernate version:
3.0

Mapping documents:
Code:
<hibernate-mapping package="mo.org.cpttm.hierarchy">
   <!-- without this, it will throw an exception saying
   "class not mapped" -->
   <!-- <class name="Foo1">
      <id name="id">
         <generator class="hilo"/>
      </id>
   </class> -->
   <class name="Foo1Child1" table="Foo1Child1">
      <id name="id">
         <generator class="hilo"/>
      </id>
      <property name="name"/>
   </class>
   <class name="Foo1Child2" table="Foo1Child2">
      <id name="id">
         <generator class="hilo"/>
      </id>
      <property name="num"/>
   </class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
Code:
   Query query = session.createQuery("from Foo1 f");
   for (Iterator iter = query.iterate(); iter.hasNext();) {
      Foo1 foo = (Foo1) iter.next();
      session.delete(foo);
   }



Full stack trace of any exception that occurs:
Code:
org.hibernate.hql.ast.QuerySyntaxError: Foo1 is not mapped. [from Foo1 f]
   at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
   at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:196)
   at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
   at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
   at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
   at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:821)
   at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:857)
   at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
   at mo.org.cpttm.hierarchy.Main1$3.perform(Main1.java:61)
   at mo.org.cpttm.hierarchy.SessionTaskExecutor.doTask(SessionTaskExecutor.java:18)
   at mo.org.cpttm.hierarchy.SessionFactoryHolder.doTask(SessionFactoryHolder.java:16)
   at mo.org.cpttm.hierarchy.Main1.deleteAll(Main1.java:57)
   at mo.org.cpttm.hierarchy.Main1.initDB(Main1.java:39)
   at mo.org.cpttm.hierarchy.Main1.run(Main1.java:17)
   at mo.org.cpttm.hierarchy.Main1.main(Main1.java:11)
Caused by:  Foo1 is not mapped.
   at org.hibernate.hql.ast.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:81)
   at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:77)
   at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67)
   at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:217)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2356)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2276)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:512)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:370)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:200)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:150)
   at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
   ... 13 more
Exception in thread "main"


Name and version of the database you are using:
hsqldb-1.7.3.3

The generated SQL (show_sql=true):
no SQL is shown.

Debug level Hibernate log excerpt:
Code:
16:20:53,004  INFO Environment:460 - Hibernate 3.0
16:20:53,024  INFO Environment:473 - hibernate.properties not found
16:20:53,034  INFO Environment:506 - using CGLIB reflection optimizer
16:20:53,044  INFO Environment:536 - using JDK 1.4 java.sql.Timestamp handling
16:20:53,285  INFO Configuration:1159 - configuring from resource: /hibernate.cfg.xml
16:20:53,285  INFO Configuration:1130 - Configuration resource: /hibernate.cfg.xml
16:20:54,106 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath under org/hibernate/
16:20:54,116 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath
16:20:54,266 DEBUG Configuration:1116 - hibernate.dialect=org.hibernate.dialect.HSQLDialect
16:20:54,266 DEBUG Configuration:1116 - hibernate.connection.driver_class=org.hsqldb.jdbcDriver
16:20:54,276 DEBUG Configuration:1116 - hibernate.connection.username=sa
16:20:54,286 DEBUG Configuration:1116 - hibernate.connection.password=
16:20:54,286 DEBUG Configuration:1116 - hibernate.connection.url=jdbc:hsqldb:file:data/hierarchy
16:20:54,286 DEBUG Configuration:1116 - hibernate.show_sql=true
16:20:54,296 DEBUG Configuration:1116 - hibernate.hbm2ddl.auto=update
16:20:54,296 DEBUG Configuration:1311 - null<-org.dom4j.tree.DefaultAttribute@e45076 [Attribute: name resource value "mo/org/cpttm/hierarchy/Foo1.hbm.xml"]
16:20:54,296  INFO Configuration:440 - Mapping resource: mo/org/cpttm/hierarchy/Foo1.hbm.xml
16:20:54,306 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
16:20:54,306 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
16:20:54,677  INFO HbmBinder:258 - Mapping class: mo.org.cpttm.hierarchy.Foo1Child1 -> Foo1Child1
16:20:54,727 DEBUG HbmBinder:1089 - Mapped property: id -> id
16:20:54,757 DEBUG HbmBinder:1089 - Mapped property: name -> name
16:20:54,767  INFO HbmBinder:258 - Mapping class: mo.org.cpttm.hierarchy.Foo1Child2 -> Foo1Child2
16:20:54,787 DEBUG HbmBinder:1089 - Mapped property: id -> id
16:20:54,787 DEBUG HbmBinder:1089 - Mapped property: num -> num
16:20:54,787  INFO Configuration:1271 - Configured SessionFactory: null
16:20:54,797 DEBUG Configuration:1272 - properties: {hibernate.connection.password=, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\j2sdk1.4.2_04\jre\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=sa, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=TW, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=c:\workspace\Hierarchy, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\j2sdk1.4.2_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\kent\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.java2d.fontpath=, java.library.path=C:\j2sdk1.4.2_04\bin;.;C:\WINNT\system32;C:\WINNT;C:\Perl\bin\;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\j2sdk1.4.2_04\bin;c:\cygwin\bin;C:\Program Files\Common Files\GTK\2.0\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.0, user.home=C:\Documents and Settings\kent, user.timezone=Asia/Taipei, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=MS950_HKSCS, java.specification.version=1.4, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, user.name=kent, java.class.path=c:\workspace\Hierarchy;C:\hibernate-3.0\hibernate3.jar;C:\hibernate-3.0\lib\xml-apis.jar;C:\hibernate-3.0\lib\ant-antlr-1.6.2.jar;C:\hibernate-3.0\lib\ant-junit-1.6.2.jar;C:\hibernate-3.0\lib\ant-launcher-1.6.2.jar;C:\hibernate-3.0\lib\antlr-2.7.5H3.jar;C:\hibernate-3.0\lib\ant-swing-1.6.2.jar;C:\hibernate-3.0\lib\asm.jar;C:\hibernate-3.0\lib\asm-attrs.jar;C:\hibernate-3.0\lib\c3p0-0.8.5.jar;C:\hibernate-3.0\lib\cglib-2.1.jar;C:\hibernate-3.0\lib\cleanimports.jar;C:\hibernate-3.0\lib\commons-collections-2.1.1.jar;C:\hibernate-3.0\lib\commons-logging-1.0.4.jar;C:\hibernate-3.0\lib\concurrent-1.3.2.jar;C:\hibernate-3.0\lib\connector.jar;C:\hibernate-3.0\lib\dom4j-1.5.2.jar;C:\hibernate-3.0\lib\ehcache-1.1.jar;C:\hibernate-3.0\lib\jaas.jar;C:\hibernate-3.0\lib\jacc-1_0-fr.jar;C:\hibernate-3.0\lib\jaxen-1.1-beta-4.jar;C:\hibernate-3.0\lib\jboss-cache.jar;C:\hibernate-3.0\lib\jboss-common.jar;C:\hibernate-3.0\lib\jboss-jmx.jar;C:\hibernate-3.0\lib\jboss-system.jar;C:\hibernate-3.0\lib\jdbc2_0-stdext.jar;C:\hibernate-3.0\lib\jgroups-2.2.7.jar;C:\hibernate-3.0\lib\jta.jar;C:\hibernate-3.0\lib\junit-3.8.1.jar;C:\hibernate-3.0\lib\log4j-1.2.9.jar;C:\hibernate-3.0\lib\oscache-2.1.jar;C:\hibernate-3.0\lib\proxool-0.8.3.jar;C:\hibernate-3.0\lib\swarmcache-1.0rc2.jar;C:\hibernate-3.0\lib\versioncheck.jar;C:\hibernate-3.0\lib\xerces-2.6.2.jar;C:\hibernate-3.0\lib\ant-1.6.2.jar;C:\hsqldb-1.7.3.3\lib\hsqldb.jar;C:\jars\junit.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\j2sdk1.4.2_04\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:hsqldb:file:data/hierarchy, hibernate.dialect=org.hibernate.dialect.HSQLDialect, user.language=zh, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_04, java.ext.dirs=C:\j2sdk1.4.2_04\jre\lib\ext, sun.boot.class.path=C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\jre\lib\i18n.jar;C:\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_04\jre\lib\jsse.jar;C:\j2sdk1.4.2_04\jre\lib\jce.jar;C:\j2sdk1.4.2_04\jre\lib\charsets.jar;C:\j2sdk1.4.2_04\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.hbm2ddl.auto=update, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=pentium i486 i386}
16:20:54,797 DEBUG Configuration:1047 - Preparing to build session factory with filters : {}
16:20:54,797  INFO Configuration:851 - processing extends queue
16:20:54,797  INFO Configuration:855 - processing collection mappings
16:20:54,807  INFO Configuration:864 - processing association property references
16:20:54,807  INFO Configuration:893 - processing foreign key constraints
16:20:55,037  INFO Dialect:91 - Using dialect: org.hibernate.dialect.HSQLDialect
16:20:55,057 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
16:20:55,068  INFO SettingsFactory:90 - Default batch fetch size: 1
16:20:55,078  INFO SettingsFactory:94 - Generate SQL with comments: disabled
16:20:55,078  INFO SettingsFactory:98 - Order SQL updates by primary key: disabled
16:20:55,078  INFO SettingsFactory:273 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:20:55,088  INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
16:20:55,088  INFO SettingsFactory:106 - Query language substitutions: {}
16:20:55,108  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
16:20:55,118  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
16:20:55,118  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
16:20:55,128  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:data/hierarchy
16:20:55,128  INFO DriverManagerConnectionProvider:83 - connection properties: {user=sa, password=}
16:20:55,138 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
16:20:55,138 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
16:20:56,670 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:hsqldb:file:data/hierarchy, Isolation Level: 1
16:20:56,690 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
16:20:56,700  INFO SettingsFactory:148 - JDBC batch size: 15
16:20:56,700  INFO SettingsFactory:151 - JDBC batch updates for versioned data: disabled
16:20:56,700  INFO SettingsFactory:156 - Scrollable result sets: enabled
16:20:56,710 DEBUG SettingsFactory:160 - Wrap result sets: disabled
16:20:56,710  INFO SettingsFactory:164 - JDBC3 getGeneratedKeys(): disabled
16:20:56,730  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
16:20:56,740  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:20:56,740  INFO SettingsFactory:176 - Automatic flush during beforeCompletion(): disabled
16:20:56,740  INFO SettingsFactory:179 - Automatic session close at end of transaction: disabled
16:20:56,740  INFO SettingsFactory:260 - Cache provider: org.hibernate.cache.EhCacheProvider
16:20:56,760  INFO SettingsFactory:187 - Second-level cache: enabled
16:20:56,760  INFO SettingsFactory:192 - Optimize cache for minimal puts: disabled
16:20:56,770  INFO SettingsFactory:199 - Structured second-level cache entries: enabled
16:20:56,770  INFO SettingsFactory:203 - Query cache: disabled
16:20:56,770  INFO SettingsFactory:210 - Echoing all SQL to stdout
16:20:56,770  INFO SettingsFactory:214 - Statistics: disabled
16:20:56,770  INFO SettingsFactory:218 - Deleted entity synthetic identifier rollback: disabled
16:20:56,780  INFO SettingsFactory:232 - Default entity-mode: pojo
16:20:57,221  INFO SessionFactoryImpl:140 - building session factory
16:20:57,221 DEBUG SessionFactoryImpl:149 - Session factory constructed with filter configurations : {}
16:20:57,231 DEBUG SessionFactoryImpl:152 - instantiating session factory with properties: {hibernate.connection.password=, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\j2sdk1.4.2_04\jre\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=sa, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=TW, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=c:\workspace\Hierarchy, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\j2sdk1.4.2_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\kent\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.java2d.fontpath=, java.library.path=C:\j2sdk1.4.2_04\bin;.;C:\WINNT\system32;C:\WINNT;C:\Perl\bin\;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\j2sdk1.4.2_04\bin;c:\cygwin\bin;C:\Program Files\Common Files\GTK\2.0\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.0, user.home=C:\Documents and Settings\kent, user.timezone=Asia/Taipei, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=MS950_HKSCS, java.specification.version=1.4, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, user.name=kent, java.class.path=c:\workspace\Hierarchy;C:\hibernate-3.0\hibernate3.jar;C:\hibernate-3.0\lib\xml-apis.jar;C:\hibernate-3.0\lib\ant-antlr-1.6.2.jar;C:\hibernate-3.0\lib\ant-junit-1.6.2.jar;C:\hibernate-3.0\lib\ant-launcher-1.6.2.jar;C:\hibernate-3.0\lib\antlr-2.7.5H3.jar;C:\hibernate-3.0\lib\ant-swing-1.6.2.jar;C:\hibernate-3.0\lib\asm.jar;C:\hibernate-3.0\lib\asm-attrs.jar;C:\hibernate-3.0\lib\c3p0-0.8.5.jar;C:\hibernate-3.0\lib\cglib-2.1.jar;C:\hibernate-3.0\lib\cleanimports.jar;C:\hibernate-3.0\lib\commons-collections-2.1.1.jar;C:\hibernate-3.0\lib\commons-logging-1.0.4.jar;C:\hibernate-3.0\lib\concurrent-1.3.2.jar;C:\hibernate-3.0\lib\connector.jar;C:\hibernate-3.0\lib\dom4j-1.5.2.jar;C:\hibernate-3.0\lib\ehcache-1.1.jar;C:\hibernate-3.0\lib\jaas.jar;C:\hibernate-3.0\lib\jacc-1_0-fr.jar;C:\hibernate-3.0\lib\jaxen-1.1-beta-4.jar;C:\hibernate-3.0\lib\jboss-cache.jar;C:\hibernate-3.0\lib\jboss-common.jar;C:\hibernate-3.0\lib\jboss-jmx.jar;C:\hibernate-3.0\lib\jboss-system.jar;C:\hibernate-3.0\lib\jdbc2_0-stdext.jar;C:\hibernate-3.0\lib\jgroups-2.2.7.jar;C:\hibernate-3.0\lib\jta.jar;C:\hibernate-3.0\lib\junit-3.8.1.jar;C:\hibernate-3.0\lib\log4j-1.2.9.jar;C:\hibernate-3.0\lib\oscache-2.1.jar;C:\hibernate-3.0\lib\proxool-0.8.3.jar;C:\hibernate-3.0\lib\swarmcache-1.0rc2.jar;C:\hibernate-3.0\lib\versioncheck.jar;C:\hibernate-3.0\lib\xerces-2.6.2.jar;C:\hibernate-3.0\lib\ant-1.6.2.jar;C:\hsqldb-1.7.3.3\lib\hsqldb.jar;C:\jars\junit.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\j2sdk1.4.2_04\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:hsqldb:file:data/hierarchy, hibernate.dialect=org.hibernate.dialect.HSQLDialect, user.language=zh, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_04, java.ext.dirs=C:\j2sdk1.4.2_04\jre\lib\ext, sun.boot.class.path=C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\jre\lib\i18n.jar;C:\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_04\jre\lib\jsse.jar;C:\j2sdk1.4.2_04\jre\lib\jce.jar;C:\j2sdk1.4.2_04\jre\lib\charsets.jar;C:\j2sdk1.4.2_04\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.hbm2ddl.auto=update, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=pentium i486 i386}
16:20:57,251 DEBUG CacheManager:191 - Creating new CacheManager with default config
16:20:57,271 DEBUG CacheManager:164 - Configuring ehcache from classpath.
16:20:57,291  WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/hibernate-3.0/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
16:20:57,321 DEBUG Configuration$DiskStore:185 - Disk Store Path: C:\DOCUME~1\kent\LOCALS~1\Temp\
16:20:58,293 DEBUG BasicEntityPersister:2234 - Static SQL for entity: mo.org.cpttm.hierarchy.Foo1Child2
16:20:58,293 DEBUG BasicEntityPersister:2236 -  Version select: select id from Foo1Child2 where id =?
16:20:58,293 DEBUG BasicEntityPersister:2237 -  Snapshot select: select foo1child2x_.id, foo1child2x_.num as num1_ from Foo1Child2 foo1child2x_ where foo1child2x_.id=?
16:20:58,293 DEBUG BasicEntityPersister:2239 -  Insert 0: insert into Foo1Child2 (num, id) values (?, ?)
16:20:58,303 DEBUG BasicEntityPersister:2240 -  Update 0: update Foo1Child2 set num=? where id=?
16:20:58,313 DEBUG BasicEntityPersister:2241 -  Delete 0: delete from Foo1Child2 where id=?
16:20:58,403 DEBUG BasicEntityPersister:2234 - Static SQL for entity: mo.org.cpttm.hierarchy.Foo1Child1
16:20:58,403 DEBUG BasicEntityPersister:2236 -  Version select: select id from Foo1Child1 where id =?
16:20:58,403 DEBUG BasicEntityPersister:2237 -  Snapshot select: select foo1child1x_.id, foo1child1x_.name as name0_ from Foo1Child1 foo1child1x_ where foo1child1x_.id=?
16:20:58,423 DEBUG BasicEntityPersister:2239 -  Insert 0: insert into Foo1Child1 (name, id) values (?, ?)
16:20:58,423 DEBUG BasicEntityPersister:2240 -  Update 0: update Foo1Child1 set name=? where id=?
16:20:58,423 DEBUG BasicEntityPersister:2241 -  Delete 0: delete from Foo1Child1 where id=?
16:20:58,473 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num1_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
16:20:58,483 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num1_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
16:20:58,483 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num1_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
16:20:58,483 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num1_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
16:20:58,483 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name0_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
16:20:58,493 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name0_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
16:20:58,503 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name0_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
16:20:58,503 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name0_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
16:20:58,523 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
16:20:58,533 DEBUG SessionFactoryObjectFactory:76 - registered: 297eaf3e0474c975010474c97c070000 (unnamed)
16:20:58,533  INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
16:20:58,533 DEBUG SessionFactoryImpl:249 - instantiated session factory
16:20:58,543  INFO Dialect:91 - Using dialect: org.hibernate.dialect.HSQLDialect
16:20:58,543  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
16:20:58,543  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
16:20:58,543  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
16:20:58,543  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:data/hierarchy
16:20:58,553  INFO DriverManagerConnectionProvider:83 - connection properties: {user=sa, password=}
16:20:58,553  INFO SchemaUpdate:105 - Running hbm2ddl schema update
16:20:58,553  INFO SchemaUpdate:117 - fetching database metadata
16:20:58,553 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
16:20:58,553 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
16:20:58,563 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:hsqldb:file:data/hierarchy, Isolation Level: 1
16:20:58,673  INFO SchemaUpdate:133 - updating schema
16:20:58,673  INFO Configuration:851 - processing extends queue
16:20:58,673  INFO Configuration:855 - processing collection mappings
16:20:58,683  INFO Configuration:864 - processing association property references
16:20:58,683  INFO Configuration:893 - processing foreign key constraints
16:20:58,844  INFO TableMetadata:38 - table found: FOO1CHILD1
16:20:58,854  INFO TableMetadata:39 - columns: [name, id]
16:20:58,854  INFO TableMetadata:40 - foreign keys: []
16:20:58,854  INFO TableMetadata:41 - indexes: [sys_pk_foo1child1]
16:20:58,864  INFO TableMetadata:38 - table found: FOO1CHILD2
16:20:58,864  INFO TableMetadata:39 - columns: [num, id]
16:20:58,874  INFO TableMetadata:40 - foreign keys: []
16:20:58,874  INFO TableMetadata:41 - indexes: [sys_pk_foo1child2]
16:20:59,094  INFO TableMetadata:38 - table found: HIBERNATE_UNIQUE_KEY
16:20:59,094  INFO TableMetadata:39 - columns: [next_hi]
16:20:59,094  INFO TableMetadata:40 - foreign keys: []
16:20:59,094  INFO TableMetadata:41 - indexes: []
16:20:59,104  INFO SchemaUpdate:153 - schema update complete
16:20:59,104  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:file:data/hierarchy
16:20:59,104  INFO SessionFactoryImpl:366 - Checking 0 named queries
16:20:59,204 DEBUG SessionImpl:229 - opened session at timestamp: 4581993918930944
16:20:59,214 DEBUG JDBCTransaction:46 - begin
16:20:59,214 DEBUG AbstractBatcher:408 - opening JDBC connection
16:20:59,214 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
16:20:59,214 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
16:20:59,224 DEBUG JDBCTransaction:50 - current autocommit status: false
16:20:59,254 DEBUG SessionImpl:852 - iterate: from Foo1 f
16:20:59,254 DEBUG QueryParameters:220 - named parameters: {}
16:20:59,445 DEBUG QueryTranslatorImpl:207 - parse() - HQL: from Foo1 f
16:20:59,485 DEBUG AST:223 - --- HQL AST ---
\-[QUERY] 'query'
    \-[SELECT_FROM] 'SELECT_FROM'
       \-[FROM] 'from'
          +-[IDENT] 'Foo1'
          \-[ALIAS] 'f'

16:20:59,485 DEBUG ErrorCounter:72 - throwQueryException() : no errors
16:20:59,815  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:file:data/hierarchy
16:20:59,865 DEBUG HqlSqlBaseWalker:119 - query() << begin, level = 1
16:20:59,915 ERROR PARSER:35 - *** ERROR:  Foo1 is not mapped.
16:20:59,915 DEBUG ErrorCounter:28 -  Foo1 is not mapped.
Foo1 is not mapped.
   at org.hibernate.hql.ast.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:81)
   at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:77)
   at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67)
   at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:217)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2356)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2276)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:512)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:370)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:200)
   at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:150)
   at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
   at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
   at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
   at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
   at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:821)
   at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:857)
   at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
   at mo.org.cpttm.hierarchy.Main1$3.perform(Main1.java:61)
   at mo.org.cpttm.hierarchy.SessionTaskExecutor.doTask(SessionTaskExecutor.java:18)
   at mo.org.cpttm.hierarchy.SessionFactoryHolder.doTask(SessionFactoryHolder.java:16)
   at mo.org.cpttm.hierarchy.Main1.deleteAll(Main1.java:57)
   at mo.org.cpttm.hierarchy.Main1.initDB(Main1.java:39)
   at mo.org.cpttm.hierarchy.Main1.run(Main1.java:17)
   at mo.org.cpttm.hierarchy.Main1.main(Main1.java:11)
16:20:59,935 DEBUG HqlSqlBaseWalker:124 - query() : finishing up , level = 1
16:20:59,945 DEBUG HqlSqlWalker:328 - processQuery() :  ( SELECT FromClause{level=1} )
16:20:59,965 DEBUG HqlSqlWalker:448 - Derived SELECT clause created.
16:20:59,975 DEBUG HqlSqlBaseWalker:127 - query() >> end, level = 1
16:20:59,985 DEBUG AST:193 - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT'
    +-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
    \-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=0, fromElements=0, fromElementByClassAlias=[], fromElementByTableAlias=[], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}

16:20:59,985 DEBUG JDBCTransaction:124 - rollback
16:20:59,985 DEBUG JDBCContext:208 - before transaction completion
16:20:59,995 DEBUG SessionImpl:337 - before transaction completion
16:20:59,995 DEBUG JDBCTransaction:135 - rolled back JDBC Connection
16:20:59,995 DEBUG JDBCContext:213 - after transaction completion
16:21:00,005 DEBUG SessionImpl:353 - after transaction completion
16:21:00,005 DEBUG SessionImpl:246 - closing session
16:21:00,005 DEBUG AbstractBatcher:423 - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
16:21:00,015 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
16:21:00,015 DEBUG JDBCContext:213 - after transaction completion
16:21:00,015 DEBUG SessionImpl:353 - after transaction completion
16:21:00,025  INFO SessionFactoryImpl:684 - closing
16:21:00,035  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:file:data/hierarchy


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

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.