-->
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.  [ 6 posts ] 
Author Message
 Post subject: Custom SQL for loading not working with composite-id?
PostPosted: Thu Sep 23, 2004 10:03 am 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
From the mapping docs below you can see that I tried to add a custom sql to load class C. C has a composite-id.

Now I get an exception telling me that not all positional parameters have been set. Hibernate expects 2 of them, but there are two questions marks.

Is there something wrong with my mappnig or has verifyParameters() a problem with counting for composite-ids?

TIA
Ernst


Hibernate version:
3.0 alpha

Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
   <class name="li.pluess.hibernate.C">
      <composite-id>
         <key-property name="system"/>
         <key-property name="id"/>
      </composite-id>
      <set name="d">
         <key>
            <column name="c_system"/>
            <column name="c_id"/>
         </key>
         <one-to-many class="li.pluess.hibernate.D"/>
      </set>
      <loader query-ref="loadC"/>
   </class>
   <sql-query name="loadC">
      <return alias="c" class="li.pluess.hibernate.C"/>
      select system as {c.system}, id as {c.id} from C where system=? and id=?
   </sql-query>
</hibernate-mapping>


Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
   <class name="li.pluess.hibernate.D">
      <composite-id>
         <key-property name="system"/>
         <key-property name="id"/>
      </composite-id>
      <many-to-one name="c">
         <column name="c_system"/>
         <column name="c_id"/>
      </many-to-one>
   </class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
Code:
          Session s = HibernateUtil.getSession();
          HibernateUtil.beginTransaction();
         
          C c = new C();
          D d = new D();

          c.setId(makeId());
          c.setSystem(SYSTEM);
         
          d.setId(makeId());
          d.setSystem(SYSTEM);
         
          c.getD().add(d);
          d.setC(c);
         
          s.save(c);
          s.save(d);
         
          HibernateUtil.commitTransaction();
          HibernateUtil.closeSession();
          int id = c.getId();

          s = HibernateUtil.getSession();
          HibernateUtil.beginTransaction();

          c = (C) s.get(C.class, new C(SYSTEM, id));
          System.out.println( new ReflectionToStringBuilder(c, ToStringStyle.MULTI_LINE_STYLE).toString());
         
          HibernateUtil.commitTransaction();
          HibernateUtil.closeSession();


Full stack trace of any exception that occurs:
Code:
org.hibernate.QueryException: Not all positional parameters have been set. Expected 2, set [li.pluess.hibernate.C@77ae] [
      
      select system as {c.system}, id as {c.id} from C where system=? and id=?
   ]
   at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:104)
   at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:81)
   at org.hibernate.persister.NamedQueryLoader.load(NamedQueryLoader.java:56)
   at org.hibernate.persister.SingleTableEntityPersister.load(SingleTableEntityPersister.java:525)
   at org.hibernate.event.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:328)
   at org.hibernate.event.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:309)
   at org.hibernate.event.DefaultLoadEventListener.load(DefaultLoadEventListener.java:144)
   at org.hibernate.event.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
   at org.hibernate.event.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:113)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1121)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1116)
   at li.pluess.hibernate.CTestCase.testCLivecycle(CTestCase.java:67)
   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 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:421)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
15:47:17,356  INFO DefaultLoadEventListener:121 - Error performing load command
org.hibernate.QueryException: Not all positional parameters have been set. Expected 2, set [li.pluess.hibernate.C@77ae] [
      
      select system as {c.system}, id as {c.id} from C where system=? and id=?
   ]
   at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:104)
   at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:81)
   at org.hibernate.persister.NamedQueryLoader.load(NamedQueryLoader.java:56)
   at org.hibernate.persister.SingleTableEntityPersister.load(SingleTableEntityPersister.java:525)
   at org.hibernate.event.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:328)
   at org.hibernate.event.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:309)
   at org.hibernate.event.DefaultLoadEventListener.load(DefaultLoadEventListener.java:144)
   at org.hibernate.event.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
   at org.hibernate.event.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:113)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1121)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1116)
   at li.pluess.hibernate.CTestCase.testCLivecycle(CTestCase.java:67)
   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 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:421)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


Name and version of the database you are using:
MySQL 4.0.20a

The generated SQL (show_sql=true):
Code:
Hibernate: insert into C (system, id) values (?, ?)
Hibernate: insert into D (c_system, c_id, system, id) values (?, ?, ?, ?)
Hibernate: update D set c_system=?, c_id=? where system=? and id=?


Debug level Hibernate log excerpt:
Code:
15:47:14,403  INFO Environment:411 - Hibernate 3.0 alpha
15:47:14,418  INFO Environment:424 - hibernate.properties not found
15:47:14,434  INFO Environment:457 - using CGLIB reflection optimizer
15:47:14,434  INFO Environment:486 - using JDK 1.4 java.sql.Timestamp handling
15:47:14,543  INFO Configuration:1019 - configuring from resource: /hibernate.cfg.xml
15:47:14,543  INFO Configuration:990 - Configuration resource: /hibernate.cfg.xml
15:47:15,059 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath under org/hibernate/
15:47:15,059 DEBUG DTDEntityResolver:50 - found http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath
15:47:15,153 DEBUG Configuration:976 - show_sql=true
15:47:15,153 DEBUG Configuration:976 - dialect=org.hibernate.dialect.MySQLDialect
15:47:15,153 DEBUG Configuration:976 - hibernate.connection.driver_class=com.mysql.jdbc.Driver
15:47:15,153 DEBUG Configuration:976 - hibernate.connection.url=jdbc:mysql://localhost/sql_handmade
15:47:15,153 DEBUG Configuration:1136 - null<-org.dom4j.tree.DefaultAttribute@d02b51 [Attribute: name resource value "li/pluess/hibernate/A.hbm.xml"]
15:47:15,168  INFO Configuration:416 - Mapping resource: li/pluess/hibernate/A.hbm.xml
15:47:15,215 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
15:47:15,215 DEBUG DTDEntityResolver:50 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
15:47:15,387  INFO Binder:413 - Mapping class: li.pluess.hibernate.A -> A
15:47:15,434 DEBUG Binder:803 - Mapped property: id -> id
15:47:15,450 DEBUG Binder:803 - Mapped property: b
15:47:15,465 DEBUG Configuration:1136 - null<-org.dom4j.tree.DefaultAttribute@162dbb6 [Attribute: name resource value "li/pluess/hibernate/B.hbm.xml"]
15:47:15,465  INFO Configuration:416 - Mapping resource: li/pluess/hibernate/B.hbm.xml
15:47:15,465 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
15:47:15,465 DEBUG DTDEntityResolver:50 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
15:47:15,512  INFO Binder:413 - Mapping class: li.pluess.hibernate.B -> B
15:47:15,512 DEBUG Binder:803 - Mapped property: id -> id
15:47:15,637 DEBUG Binder:803 - Mapped property: a -> a_id
15:47:15,637 DEBUG Configuration:1136 - null<-org.dom4j.tree.DefaultAttribute@177b3cd [Attribute: name resource value "li/pluess/hibernate/C.hbm.xml"]
15:47:15,637  INFO Configuration:416 - Mapping resource: li/pluess/hibernate/C.hbm.xml
15:47:15,637 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
15:47:15,637 DEBUG DTDEntityResolver:50 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
15:47:15,700  INFO Binder:413 - Mapping class: li.pluess.hibernate.C -> C
15:47:15,715 DEBUG Binder:803 - Mapped property: system -> system
15:47:15,715 DEBUG Binder:803 - Mapped property: id -> id
15:47:15,715 DEBUG Binder:803 - Mapped property: d
15:47:15,715 DEBUG Binder:1765 - Named SQL query: loadC ->
      
      select system as {c.system}, id as {c.id} from C where system=? and id=?
   
15:47:15,715 DEBUG Configuration:1136 - null<-org.dom4j.tree.DefaultAttribute@51052d [Attribute: name resource value "li/pluess/hibernate/D.hbm.xml"]
15:47:15,731  INFO Configuration:416 - Mapping resource: li/pluess/hibernate/D.hbm.xml
15:47:15,731 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
15:47:15,731 DEBUG DTDEntityResolver:50 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
15:47:15,793  INFO Binder:413 - Mapping class: li.pluess.hibernate.D -> D
15:47:15,809 DEBUG Binder:803 - Mapped property: system -> system
15:47:15,809 DEBUG Binder:803 - Mapped property: id -> id
15:47:15,809 DEBUG Binder:803 - Mapped property: c -> c_system, c_id
15:47:15,809  INFO Configuration:1166 - Configured SessionFactory: null
15:47:15,809 DEBUG Configuration:1167 - properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\Programme\j2sdk1.4.1_01\jre\bin, java.vm.version=1.4.1_01-b01, 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=CH, sun.os.patch.level=Service Pack 1, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade, java.runtime.version=1.4.1_01-b01, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Programme\j2sdk1.4.1_01\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOKUME~1\ea71\LOKALE~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=C:\Programme\j2sdk1.4.1_01\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\Programme\dev\sybase\OLEDB;C:\oracle\ora92\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Attachmate\E!E2K\;C:\Programme\j2sdk1.4.1_01\bin;C:\Programme\dev\sybase\ODBC;C:\Programme\dev\sybase\ASEP_Win32;C:\Programme\dev\sybase\OCS-12_5\dll;C:\Programme\dev\sybase\OCS-12_5\lib3p;C:\Programme\dev\sybase\OCS-12_5\bin;C:\WINDOWS\System32\;C:\WINDOWS\;C:\WINDOWS\System32\Wbem;C:\Programme\Gemeinsame Dateien\GTK\2.0\bin;C:\Programme\apache-ant-1.6.1\bin;C:\Programme\Rational\common;C:\Programme\Rational\Rose\TopLink\;C:\Programme\aspectj1.2\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Dokumente und Einstellungen\ea71, user.timezone=Europe/Berlin, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.connection.driver_class=com.mysql.jdbc.Driver, show_sql=true, user.name=ea71, java.class.path=/c:/Programme/eclipse3R2/plugins/org.eclipse.jdt.junit_3.0.0/junitsupport.jar;/c:/Programme/eclipse3R2/plugins/org.eclipse.jdt.junit.runtime_3.0.0/junitruntime.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\config;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\bin;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-antlr-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-junit-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-launcher-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-swing-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\antlr-2.7.4.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\c3p0-0.8.4.5.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\cglib-full-2.0.2.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\cleanimports.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\commons-collections-2.1.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\commons-logging-1.0.4.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\concurrent-1.3.2.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\connector.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\dom4j-1.4.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ehcache-0.9.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\hibernate3.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jaas.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-cache.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-common.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-jmx.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-system.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jdbc2_0-stdext.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jgroups-2.2.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jta.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\junit-3.8.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\log4j-1.2.8.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\oscache-2.0.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\proxool-0.8.3.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\swarmcache-1.0rc2.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\xalan-2.4.0.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\xerces-2.4.0.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\xml-apis.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\mysql-connector-java-3.0.15-ga-bin.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\commons-lang-2.0.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\Programme\j2sdk1.4.1_01\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:mysql://localhost/sql_handmade, hibernate.dialect=org.hibernate.dialect.MySQLDialect, user.language=de, 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.1_01, java.ext.dirs=C:\Programme\j2sdk1.4.1_01\jre\lib\ext, sun.boot.class.path=C:\Programme\j2sdk1.4.1_01\jre\lib\rt.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\i18n.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\sunrsasign.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\jsse.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\jce.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\charsets.jar;C:\Programme\j2sdk1.4.1_01\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, dialect=org.hibernate.dialect.MySQLDialect, sun.cpu.isalist=pentium i486 i386}
15:47:15,809 DEBUG Configuration:907 - Preparing to build session factory with filters : {}
15:47:15,809  INFO Configuration:735 - processing one-to-many association mappings
15:47:15,825 DEBUG Binder:1795 - Second pass for collection: li.pluess.hibernate.A.b
15:47:15,825  INFO Binder:1463 - Mapping collection: li.pluess.hibernate.A.b -> B
15:47:15,825 DEBUG Binder:1809 - Mapped collection key: a_id, one-to-many: li.pluess.hibernate.B
15:47:15,825 DEBUG Binder:1795 - Second pass for collection: li.pluess.hibernate.C.d
15:47:15,825  INFO Binder:1463 - Mapping collection: li.pluess.hibernate.C.d -> D
15:47:15,825 DEBUG Binder:1809 - Mapped collection key: c_system, c_id, one-to-many: li.pluess.hibernate.D
15:47:15,825  INFO Configuration:744 - processing one-to-one association property references
15:47:15,825  INFO Configuration:769 - processing foreign key constraints
15:47:15,825 DEBUG Configuration:787 - resolving reference to class: li.pluess.hibernate.C
15:47:15,825 DEBUG Configuration:787 - resolving reference to class: li.pluess.hibernate.A
15:47:16,231  INFO Dialect:86 - Using dialect: org.hibernate.dialect.MySQLDialect
15:47:16,247  INFO SettingsFactory:77 - Generate SQL with comments: disabled
15:47:16,247  INFO SettingsFactory:81 - Query language substitutions: {}
15:47:16,247  INFO DriverManagerConnectionProvider:43 - Using Hibernate built-in connection pool (not for production use!)
15:47:16,247  INFO DriverManagerConnectionProvider:44 - Hibernate connection pool size: 20
15:47:16,247  INFO DriverManagerConnectionProvider:47 - autocommit mode: false
15:47:16,262  INFO DriverManagerConnectionProvider:82 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/sql_handmade
15:47:16,262  INFO DriverManagerConnectionProvider:85 - connection properties: {}
15:47:16,262 DEBUG DriverManagerConnectionProvider:95 - total checked-out connections: 0
15:47:16,262 DEBUG DriverManagerConnectionProvider:111 - opening new JDBC connection
15:47:16,559 DEBUG DriverManagerConnectionProvider:117 - created connection to: jdbc:mysql://localhost/sql_handmade, Isolation Level: 4
15:47:16,559 DEBUG DriverManagerConnectionProvider:131 - returning connection to pool, pool size: 1
15:47:16,559  INFO SettingsFactory:130 - Scrollable result sets: enabled
15:47:16,559  INFO SettingsFactory:134 - JDBC3 getGeneratedKeys(): enabled
15:47:16,575  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
15:47:16,575  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
15:47:16,575  INFO SettingsFactory:210 - Cache provider: org.hibernate.cache.EhCacheProvider
15:47:16,590  INFO SettingsFactory:151 - Second-level cache: enabled
15:47:16,590  INFO SettingsFactory:153 - Optimize cache for minimal puts: disabled
15:47:16,590  INFO SettingsFactory:161 - Query cache: disabled
15:47:16,590  INFO SettingsFactory:168 - Echoing all SQL to stdout
15:47:16,590  INFO SettingsFactory:172 - Statistics: disabled
15:47:16,590  INFO SettingsFactory:176 - Deleted entity synthetic identifier rollback: disabled
15:47:16,653  INFO SessionFactoryImpl:133 - building session factory
15:47:16,653 DEBUG SessionFactoryImpl:142 - Session factory constructed with filter configurations : {}
15:47:16,653 DEBUG SessionFactoryImpl:145 - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\Programme\j2sdk1.4.1_01\jre\bin, java.vm.version=1.4.1_01-b01, 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=CH, sun.os.patch.level=Service Pack 1, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade, java.runtime.version=1.4.1_01-b01, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Programme\j2sdk1.4.1_01\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOKUME~1\ea71\LOKALE~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=C:\Programme\j2sdk1.4.1_01\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\Programme\dev\sybase\OLEDB;C:\oracle\ora92\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Attachmate\E!E2K\;C:\Programme\j2sdk1.4.1_01\bin;C:\Programme\dev\sybase\ODBC;C:\Programme\dev\sybase\ASEP_Win32;C:\Programme\dev\sybase\OCS-12_5\dll;C:\Programme\dev\sybase\OCS-12_5\lib3p;C:\Programme\dev\sybase\OCS-12_5\bin;C:\WINDOWS\System32\;C:\WINDOWS\;C:\WINDOWS\System32\Wbem;C:\Programme\Gemeinsame Dateien\GTK\2.0\bin;C:\Programme\apache-ant-1.6.1\bin;C:\Programme\Rational\common;C:\Programme\Rational\Rose\TopLink\;C:\Programme\aspectj1.2\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Dokumente und Einstellungen\ea71, user.timezone=Europe/Berlin, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.connection.driver_class=com.mysql.jdbc.Driver, show_sql=true, user.name=ea71, java.class.path=/c:/Programme/eclipse3R2/plugins/org.eclipse.jdt.junit_3.0.0/junitsupport.jar;/c:/Programme/eclipse3R2/plugins/org.eclipse.jdt.junit.runtime_3.0.0/junitruntime.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\config;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\bin;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-antlr-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-junit-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-launcher-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ant-swing-1.6.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\antlr-2.7.4.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\c3p0-0.8.4.5.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\cglib-full-2.0.2.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\cleanimports.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\commons-collections-2.1.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\commons-logging-1.0.4.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\concurrent-1.3.2.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\connector.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\dom4j-1.4.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\ehcache-0.9.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\hibernate3.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jaas.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-cache.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-common.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-jmx.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jboss-system.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jdbc2_0-stdext.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jgroups-2.2.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\jta.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\junit-3.8.1.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\log4j-1.2.8.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\oscache-2.0.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\proxool-0.8.3.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\swarmcache-1.0rc2.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\xalan-2.4.0.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\xerces-2.4.0.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\xml-apis.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\mysql-connector-java-3.0.15-ga-bin.jar;C:\Dokumente und Einstellungen\ea71\Eigene Dateien\Source\Java\sql_handmade\lib\commons-lang-2.0.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\Programme\j2sdk1.4.1_01\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:mysql://localhost/sql_handmade, hibernate.dialect=org.hibernate.dialect.MySQLDialect, user.language=de, 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.1_01, java.ext.dirs=C:\Programme\j2sdk1.4.1_01\jre\lib\ext, sun.boot.class.path=C:\Programme\j2sdk1.4.1_01\jre\lib\rt.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\i18n.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\sunrsasign.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\jsse.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\jce.jar;C:\Programme\j2sdk1.4.1_01\jre\lib\charsets.jar;C:\Programme\j2sdk1.4.1_01\jre\classes, java.vendor=Sun Microsystems Inc., hibernate.jdbc.batch_size=15, file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, hibernate.max_fetch_depth=2, dialect=org.hibernate.dialect.MySQLDialect, sun.cpu.isalist=pentium i486 i386}
15:47:16,872 DEBUG AbstractCollectionPersister:409 - Static SQL for collection: li.pluess.hibernate.A.b
15:47:16,872 DEBUG AbstractCollectionPersister:410 -  Row insert: update B set a_id=? where id=?
15:47:16,872 DEBUG AbstractCollectionPersister:412 -  Row delete: update B set a_id=null where a_id=? and id=?
15:47:16,872 DEBUG AbstractCollectionPersister:413 -  One-shot delete: update B set a_id=null where a_id=?
15:47:16,887 DEBUG AbstractCollectionPersister:409 - Static SQL for collection: li.pluess.hibernate.C.d
15:47:16,887 DEBUG AbstractCollectionPersister:410 -  Row insert: update D set c_system=?, c_id=? where system=? and id=?
15:47:16,887 DEBUG AbstractCollectionPersister:412 -  Row delete: update D set c_system=null, c_id=null where c_system=? and c_id=? and system=? and id=?
15:47:16,887 DEBUG AbstractCollectionPersister:413 -  One-shot delete: update D set c_system=null, c_id=null where c_system=? and c_id=?
15:47:16,903 DEBUG BasicEntityPersister:1893 - Static SQL for entity: li.pluess.hibernate.C
15:47:16,903 DEBUG BasicEntityPersister:1895 -  Version select: select system, id from C where system =? and id =?
15:47:16,903 DEBUG BasicEntityPersister:1896 -  Snapshot select: select c.system, c.id from C c where c.system=? and c.id=?
15:47:16,903 DEBUG BasicEntityPersister:1898 -  Insert 0: insert into C (system, id) values (?, ?)
15:47:16,903 DEBUG BasicEntityPersister:1899 -  Update 0: update C set  where system=? and id=?
15:47:16,903 DEBUG BasicEntityPersister:1900 -  Delete 0: delete from C where system=? and id=?
15:47:16,934 DEBUG EntityLoader:59 - Static select for entity li.pluess.hibernate.C: select c0_.system as system0_, c0_.id as id0_ from C c0_ where c0_.system=? and c0_.id=?
15:47:16,934 DEBUG BasicEntityPersister:1893 - Static SQL for entity: li.pluess.hibernate.A
15:47:16,934 DEBUG BasicEntityPersister:1895 -  Version select: select id from A where id =?
15:47:16,950 DEBUG BasicEntityPersister:1896 -  Snapshot select: select a.id from A a where a.id=?
15:47:16,950 DEBUG BasicEntityPersister:1898 -  Insert 0: insert into A (id) values (?)
15:47:16,950 DEBUG BasicEntityPersister:1899 -  Update 0: update A set  where id=?
15:47:16,950 DEBUG BasicEntityPersister:1900 -  Delete 0: delete from A where id=?
15:47:16,950 DEBUG EntityLoader:59 - Static select for entity li.pluess.hibernate.A: select a0_.id as id0_ from A a0_ where a0_.id=?
15:47:16,950 DEBUG BasicEntityPersister:1893 - Static SQL for entity: li.pluess.hibernate.D
15:47:16,950 DEBUG BasicEntityPersister:1895 -  Version select: select system, id from D where system =? and id =?
15:47:16,950 DEBUG BasicEntityPersister:1896 -  Snapshot select: select d.system, d.id, d.c_system as c_system3_, d.c_id as c_id3_ from D d where d.system=? and d.id=?
15:47:16,950 DEBUG BasicEntityPersister:1898 -  Insert 0: insert into D (c_system, c_id, system, id) values (?, ?, ?, ?)
15:47:16,950 DEBUG BasicEntityPersister:1899 -  Update 0: update D set c_system=?, c_id=? where system=? and id=?
15:47:16,950 DEBUG BasicEntityPersister:1900 -  Delete 0: delete from D where system=? and id=?
15:47:16,950 DEBUG EntityLoader:59 - Static select for entity li.pluess.hibernate.D: select d0_.system as system1_, d0_.id as id1_, d0_.c_system as c_system3_1_, d0_.c_id as c_id3_1_, c1_.system as system0_, c1_.id as id0_ from D d0_ left outer join C c1_ on d0_.c_system=c1_.system and d0_.c_id=c1_.id where d0_.system=? and d0_.id=?
15:47:16,965 DEBUG BasicEntityPersister:1893 - Static SQL for entity: li.pluess.hibernate.B
15:47:16,965 DEBUG BasicEntityPersister:1895 -  Version select: select id from B where id =?
15:47:16,965 DEBUG BasicEntityPersister:1896 -  Snapshot select: select b.id, b.a_id as a_id1_ from B b where b.id=?
15:47:16,965 DEBUG BasicEntityPersister:1898 -  Insert 0: INSERT into B (a_id) values (?) /* my sql */
15:47:16,965 DEBUG BasicEntityPersister:1899 -  Update 0: UPDATE b set a_id=? where id=?; /* my sql */
15:47:16,965 DEBUG BasicEntityPersister:1900 -  Delete 0: DELETE from B where id=? /* my sql */
15:47:16,965 DEBUG EntityLoader:59 - Static select for entity li.pluess.hibernate.B: select b0_.id as id1_, b0_.a_id as a_id1_1_, a1_.id as id0_ from B b0_ left outer join A a1_ on b0_.a_id=a1_.id where b0_.id=?
15:47:16,965 DEBUG OneToManyLoader:77 - Static select for one-to-many li.pluess.hibernate.A.b: select b0_.a_id as a_id__, b0_.id as id__, b0_.id as id0_, b0_.a_id as a_id1_0_ from B b0_ where b0_.a_id=?
15:47:17,012 DEBUG OneToManyLoader:77 - Static select for one-to-many li.pluess.hibernate.C.d: select d0_.c_system as c_system__, d0_.c_id as c_id__, d0_.system as system__, d0_.id as id__, d0_.system as system0_, d0_.id as id0_, d0_.c_system as c_system3_0_, d0_.c_id as c_id3_0_ from D d0_ where d0_.c_system=? and d0_.c_id=?
15:47:17,028 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
15:47:17,028 DEBUG SessionFactoryObjectFactory:76 - registered: 1f109288ff2b8bb400ff2b8bb6940000 (unnamed)
15:47:17,028  INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
15:47:17,028 DEBUG SessionFactoryImpl:218 - instantiated session factory
15:47:17,028  INFO SessionFactoryImpl:336 - Checking 0 named queries
Opening new Session for this thread.
15:47:17,075 DEBUG SessionImpl:323 - opened session
Starting new database transaction in this thread.
15:47:17,090 DEBUG JDBCTransaction:37 - begin
15:47:17,090 DEBUG DriverManagerConnectionProvider:95 - total checked-out connections: 0
15:47:17,090 DEBUG DriverManagerConnectionProvider:101 - using pooled JDBC connection, pool size: 0
15:47:17,090 DEBUG JDBCTransaction:41 - current autocommit status:false
15:47:17,137 DEBUG AbstractSaveEventListener:131 - saving [li.pluess.hibernate.C#li.pluess.hibernate.C@77ae]
15:47:17,184 DEBUG WrapVisitor:82 - Wrapped collection in role: li.pluess.hibernate.C.d
15:47:17,215 DEBUG AbstractSaveEventListener:131 - saving [li.pluess.hibernate.D#li.pluess.hibernate.D@11e0c13[
  system=7
  id=7122
  c=li.pluess.hibernate.C@77ae
]]
Committing database transaction of this thread.
15:47:17,215 DEBUG JDBCTransaction:59 - commit
15:47:17,215 DEBUG AbstractFlushingEventListener:59 - flushing session
15:47:17,215 DEBUG AbstractFlushingEventListener:159 - Flushing entities and processing referenced collections
15:47:17,231 DEBUG AbstractFlushingEventListener:602 - Collection found: [li.pluess.hibernate.C.d#li.pluess.hibernate.C@77ae], was: [<unreferenced>]
15:47:17,231 DEBUG AbstractFlushingEventListener:442 - Processing unreferenced collections
15:47:17,231 DEBUG AbstractFlushingEventListener:456 - Scheduling collection removes/(re)creates/updates
15:47:17,231 DEBUG AbstractFlushingEventListener:83 - Flushed: 2 insertions, 0 updates, 0 deletions to 2 objects
15:47:17,247 DEBUG AbstractFlushingEventListener:89 - Flushed: 1 (re)creations, 0 updates, 0 removals to 1 collections
15:47:17,247 DEBUG Printer:78 - listing entities:
15:47:17,247 DEBUG Printer:85 - li.pluess.hibernate.C{d=[D]}
15:47:17,247 DEBUG Printer:85 - li.pluess.hibernate.D{c=C}
15:47:17,247 DEBUG AbstractFlushingEventListener:504 - executing flush
15:47:17,247 DEBUG BasicEntityPersister:1578 - Inserting entity: [li.pluess.hibernate.C#li.pluess.hibernate.C@77ae]
15:47:17,247 DEBUG AbstractBatcher:218 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:47:17,247 DEBUG SQL:244 - insert into C (system, id) values (?, ?)
Hibernate: insert into C (system, id) values (?, ?)
15:47:17,247 DEBUG AbstractBatcher:301 - preparing statement
15:47:17,293 DEBUG BasicEntityPersister:1386 - Dehydrating entity: [li.pluess.hibernate.C#li.pluess.hibernate.C@77ae]
15:47:17,293 DEBUG BasicEntityPersister:1578 - Inserting entity: [li.pluess.hibernate.D#li.pluess.hibernate.D@11e0c13[
  system=7
  id=7122
  c=li.pluess.hibernate.C@77ae
]]
15:47:17,293 DEBUG AbstractBatcher:225 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:47:17,293 DEBUG AbstractBatcher:321 - closing statement
15:47:17,293 DEBUG AbstractBatcher:218 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:47:17,293 DEBUG SQL:244 - insert into D (c_system, c_id, system, id) values (?, ?, ?, ?)
Hibernate: insert into D (c_system, c_id, system, id) values (?, ?, ?, ?)
15:47:17,293 DEBUG AbstractBatcher:301 - preparing statement
15:47:17,293 DEBUG BasicEntityPersister:1386 - Dehydrating entity: [li.pluess.hibernate.D#li.pluess.hibernate.D@11e0c13[
  system=7
  id=7122
  c=li.pluess.hibernate.C@77ae
]]
15:47:17,293 DEBUG AbstractBatcher:225 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:47:17,309 DEBUG AbstractBatcher:321 - closing statement
15:47:17,309 DEBUG AbstractCollectionPersister:640 - Inserting collection: [li.pluess.hibernate.C.d#li.pluess.hibernate.C@77ae]
15:47:17,309 DEBUG AbstractBatcher:218 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:47:17,309 DEBUG SQL:244 - update D set c_system=?, c_id=? where system=? and id=?
Hibernate: update D set c_system=?, c_id=? where system=? and id=?
15:47:17,309 DEBUG AbstractBatcher:301 - preparing statement
15:47:17,309 DEBUG AbstractCollectionPersister:672 - done inserting collection: 1 rows inserted
15:47:17,309 DEBUG AbstractBatcher:225 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:47:17,309 DEBUG AbstractBatcher:321 - closing statement
15:47:17,309 DEBUG AbstractFlushingEventListener:549 - post flush
15:47:17,309 DEBUG SessionImpl:356 - transaction completion
Closing Session of this thread.
15:47:17,309 DEBUG SessionImpl:341 - closing session
15:47:17,309 DEBUG SessionImpl:1664 - disconnecting session
15:47:17,325 DEBUG DriverManagerConnectionProvider:131 - returning connection to pool, pool size: 1
15:47:17,325 DEBUG SessionImpl:356 - transaction completion
Opening new Session for this thread.
15:47:17,325 DEBUG SessionImpl:323 - opened session
Starting new database transaction in this thread.
15:47:17,325 DEBUG JDBCTransaction:37 - begin
15:47:17,325 DEBUG DriverManagerConnectionProvider:95 - total checked-out connections: 0
15:47:17,325 DEBUG DriverManagerConnectionProvider:101 - using pooled JDBC connection, pool size: 0
15:47:17,325 DEBUG JDBCTransaction:41 - current autocommit status:false
15:47:17,340 DEBUG DefaultLoadEventListener:170 - loading entity: [li.pluess.hibernate.C#li.pluess.hibernate.C@77ae]
15:47:17,340 DEBUG DefaultLoadEventListener:267 - attempting to resolve: [li.pluess.hibernate.C#li.pluess.hibernate.C@77ae]
15:47:17,340 DEBUG DefaultLoadEventListener:303 - object not resolved in any cache: [li.pluess.hibernate.C#li.pluess.hibernate.C@77ae]
15:47:17,340 DEBUG SingleTableEntityPersister:516 - Materializing entity: [li.pluess.hibernate.C#li.pluess.hibernate.C@77ae]
15:47:17,340 DEBUG NamedQueryLoader:42 - loading entity: li.pluess.hibernate.C using named query: loadC
org.hibernate.QueryException: Not all positional parameters have been set. Expected 2, set [li.pluess.hibernate.C@77ae] [
      
      select system as {c.system}, id as {c.id} from C where system=? and id=?
   ]
   at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:104)
   at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:81)
   at org.hibernate.persister.NamedQueryLoader.load(NamedQueryLoader.java:56)
   at org.hibernate.persister.SingleTableEntityPersister.load(SingleTableEntityPersister.java:525)
   at org.hibernate.event.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:328)
   at org.hibernate.event.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:309)
   at org.hibernate.event.DefaultLoadEventListener.load(DefaultLoadEventListener.java:144)
   at org.hibernate.event.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
   at org.hibernate.event.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:113)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1121)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1116)
   at li.pluess.hibernate.CTestCase.testCLivecycle(CTestCase.java:67)
   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 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:421)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
15:47:17,356  INFO DefaultLoadEventListener:121 - Error performing load command
org.hibernate.QueryException: Not all positional parameters have been set. Expected 2, set [li.pluess.hibernate.C@77ae] [
      
      select system as {c.system}, id as {c.id} from C where system=? and id=?
   ]
   at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:104)
   at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:81)
   at org.hibernate.persister.NamedQueryLoader.load(NamedQueryLoader.java:56)
   at org.hibernate.persister.SingleTableEntityPersister.load(SingleTableEntityPersister.java:525)
   at org.hibernate.event.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:328)
   at org.hibernate.event.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:309)
   at org.hibernate.event.DefaultLoadEventListener.load(DefaultLoadEventListener.java:144)
   at org.hibernate.event.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
   at org.hibernate.event.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:113)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1121)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1116)
   at li.pluess.hibernate.CTestCase.testCLivecycle(CTestCase.java:67)
   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 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:421)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 24, 2004 2:23 am 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
I changed the method AbstractQueryImpl.verifyParameters() to not check the positionalParameterCount and everything works fine. IMHO this is a bug in h3. Should I create a JIRA entry?

Ernst


The current h3 alpha code
Code:
   protected void verifyParameters() throws HibernateException {

      if ( actualNamedParameters.size() != namedParameters.size() + namedParameterLists.size() ) {
         Set missingParams = new HashSet(actualNamedParameters);
         missingParams.removeAll( namedParameterLists.keySet() );
         missingParams.removeAll( namedParameters.keySet() );
         throw new QueryException( "Not all named parameters have been set: " + missingParams, getQueryString() );
      }

      if ( positionalParameterCount!=values.size() ) {
          throw new QueryException( "Not all positional parameters have been set. Expected " + positionalParameterCount + ", set " + values, getQueryString() );
      }

      for (int i = 0; i < values.size(); i++) {
         if( values.get(i)==UNSET_PARAMETER || types.get(i)==UNSET_TYPE ) {
            throw new QueryException( "Not all positional parameters have been set. Found unset parameter at position " + i, getQueryString() );
         }
      }

   }


My change:
Code:
   protected void verifyParameters() throws HibernateException {

      if ( actualNamedParameters.size() != namedParameters.size() + namedParameterLists.size() ) {
         Set missingParams = new HashSet(actualNamedParameters);
         missingParams.removeAll( namedParameterLists.keySet() );
         missingParams.removeAll( namedParameters.keySet() );
         throw new QueryException( "Not all named parameters have been set: " + missingParams, getQueryString() );
      }

      /*if ( positionalParameterCount!=values.size() ) {
          throw new QueryException( "Not all positional parameters have been set. Expected " + positionalParameterCount + ", set " + values, getQueryString() );
      }
    */

      for (int i = 0; i < values.size(); i++) {
         if( values.get(i)==UNSET_PARAMETER || types.get(i)==UNSET_TYPE ) {
            throw new QueryException( "Not all positional parameters have been set. Found unset parameter at position " + i, getQueryString() );
         }
      }

   }


Top
 Profile  
 
 Post subject: ever got answer on this?
PostPosted: Wed Feb 13, 2008 12:51 pm 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
I have same issue...


Top
 Profile  
 
 Post subject: any solutions?
PostPosted: Thu Feb 14, 2008 1:24 pm 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
any solutions?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 1:29 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
read his 2nd post

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject: ok maybe it's not exactly the same problem anymore...
PostPosted: Thu Feb 14, 2008 2:14 pm 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
See

http://forum.hibernate.org/viewtopic.php?t=958067&highlight=

and please tell me what you think.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.