-->
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: Trying to query with object having composite key
PostPosted: Fri Jun 24, 2005 7:07 am 
Newbie

Joined: Fri Jun 24, 2005 4:24 am
Posts: 1
Hi,

I am having problem to query on a persistent class using as a parameter an object that has a composite key. It seems that the problem is the way the oracle sql is created. Unfortunately we cannot avoid having composite keys. Four classes are involved in the example below, 3 of them are persistent and the fourth is an Id class for the composite key.

[b]Hibernate version:[/b]
3.0.5
[b]Mapping documents:[/b]
<?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="ck.Cou" table="COU" schema="CK">
<id name="CouId" type="java.lang.String">
<column name="COU_ID" length="10" not-null="true"
unique="true" sql-type="VARCHAR2" />
<generator class="assigned" />
</id>

<property name="CouName" type="java.lang.String">
<column name="COU_NAME" length="100" not-null="true"
sql-type="VARCHAR2" />
</property>

<set name="SetOfReg">
<key>
<column name="COU_ID" length="10" not-null="false" />
</key>
<one-to-many class="ck.Reg" />
</set>
</class>
</hibernate-mapping>

<?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="ck.Reg" table="REG" schema="CK">
<composite-id name="id" class="ck.RegId">
<key-many-to-one name="Cou" class="ck.Cou">
<column name="COU_ID" length="10" not-null="false" />
</key-many-to-one>
<key-property name="RegId" type="java.lang.String">
<column name="REG_ID" length="10" not-null="true"
sql-type="VARCHAR2" />
</key-property>
</composite-id>

<property name="RegName" type="java.lang.String">
<column name="REG_NAME" length="100" not-null="true"
sql-type="VARCHAR2" />
</property>

<set name="SetOfCit">
<key>
<column name="COU_ID" length="10" not-null="false" />
<column name="REG_ID" length="10" not-null="false" />
</key>
<one-to-many class="ck.Cit" />
</set>
</class>
</hibernate-mapping>


<?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="ck.Cit" table="CIT" schema="CK">
<id name="CitId" type="java.lang.String">
<column name="CIT_ID" length="10" not-null="true"
unique="true" sql-type="VARCHAR2" />
<generator class="assigned" />
</id>

<many-to-one name="Reg" class="ck.Reg">
<column name="COU_ID" length="10" not-null="false" />
<column name="REG_ID" length="10" not-null="false" />
</many-to-one>

<property name="CitName" type="java.lang.String">
<column name="CIT_NAME" length="100" not-null="true"
sql-type="VARCHAR2" />
</property>

</class>
</hibernate-mapping>

[b]Code between sessionFactory.openSession() and session.close():[/b]

cou = (Cou) session.load(Cou.class, "GR");
regId = new RegId();
regId.setCou(cou);
regId.setRegId("GR");

reg = (Reg) session.load(Reg.class, regId);

java.util.List list = session.createQuery("from Cit a where a.Reg=:reg").setEntity("reg", reg).list();

[b]Full stack trace of any exception that occurs:[/b]

Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1596)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at ck.Test.test1(Test.java:28)
at ck.runme.main(runme.java:7)
Caused by: java.sql.SQLException: ORA-00920: invalid relational operator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:880)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2516)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2850)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:537)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
... 7 more


[b]Name and version of the database you are using:[/b]

Oracle 9.2.0.1

[b]The generated SQL (show_sql=true):[/b]

Hibernate: select reg0_.COU_ID as COU1_0_, reg0_.REG_ID as REG2_0_, reg0_.REG_NAME as REG3_0_0_ from CK.REG reg0_ where reg0_.COU_ID=? and reg0_.REG_ID=?
[color=red]Hibernate: select cit0_.CIT_ID as CIT1_, cit0_.COU_ID as COU2_1_, cit0_.REG_ID as REG3_1_, cit0_.CIT_NAME as CIT4_1_ from CK.CIT cit0_ where (cit0_.COU_ID, cit0_.REG_ID)=?[/color]

[b]Debug level Hibernate log excerpt:[/b]

13:59:21,209 INFO Environment:464 - Hibernate 3.0.5
13:59:21,239 INFO Environment:477 - hibernate.properties not found
13:59:21,259 INFO Environment:510 - using CGLIB reflection optimizer
13:59:21,259 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
13:59:21,489 INFO Configuration:1110 - configuring from resource: /hibernate.cfg.xml
13:59:21,489 INFO Configuration:1081 - Configuration resource: /hibernate.cfg.xml
13:59:22,380 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
13:59:22,380 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
13:59:22,531 DEBUG Configuration:1067 - hibernate.connection.url=jdbc:oracle:thin:@fcdb04:1521:dbtest2
13:59:22,531 DEBUG Configuration:1067 - hibernate.cglib.use_reflection_optimizer=true
13:59:22,531 DEBUG Configuration:1067 - hibernate.connection.password=CK
13:59:22,541 DEBUG Configuration:1067 - hibernate.connection.username=CK
13:59:22,541 DEBUG Configuration:1067 - hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
13:59:22,541 DEBUG Configuration:1067 - hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
13:59:22,541 DEBUG Configuration:1067 - hibernate.default_schema=CK
13:59:22,541 DEBUG Configuration:1067 - hibernate.show_sql=true
13:59:22,551 DEBUG Configuration:1262 - SessionFactory<-org.dom4j.tree.DefaultAttribute@a97b0b [Attribute: name resource value "ck/Reg.hbm.xml"]
13:59:22,551 INFO Configuration:444 - Mapping resource: ck/Reg.hbm.xml
13:59:22,581 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
13:59:22,591 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
13:59:22,961 INFO HbmBinder:260 - Mapping class: ck.Reg -> REG
13:59:23,222 DEBUG HbmBinder:1099 - Mapped property: Cou -> COU_ID
13:59:23,222 DEBUG HbmBinder:1099 - Mapped property: RegId -> REG_ID
13:59:23,222 DEBUG HbmBinder:1099 - Mapped property: id -> COU_ID, REG_ID
13:59:23,292 DEBUG HbmBinder:1099 - Mapped property: RegName -> REG_NAME
13:59:23,292 DEBUG HbmBinder:1099 - Mapped property: SetOfCit
13:59:23,302 DEBUG Configuration:1262 - SessionFactory<-org.dom4j.tree.DefaultAttribute@eb017e [Attribute: name resource value "ck/Cit.hbm.xml"]
13:59:23,302 INFO Configuration:444 - Mapping resource: ck/Cit.hbm.xml
13:59:23,322 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
13:59:23,342 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
13:59:23,422 INFO HbmBinder:260 - Mapping class: ck.Cit -> CIT
13:59:23,422 DEBUG HbmBinder:1099 - Mapped property: CitId -> CIT_ID
13:59:23,422 DEBUG HbmBinder:1099 - Mapped property: Reg -> COU_ID, REG_ID
13:59:23,422 DEBUG HbmBinder:1099 - Mapped property: CitName -> CIT_NAME
13:59:23,432 DEBUG Configuration:1262 - SessionFactory<-org.dom4j.tree.DefaultAttribute@120a47e [Attribute: name resource value "ck/Cou.hbm.xml"]
13:59:23,432 INFO Configuration:444 - Mapping resource: ck/Cou.hbm.xml
13:59:23,482 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
13:59:23,482 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
13:59:23,562 INFO HbmBinder:260 - Mapping class: ck.Cou -> COU
13:59:23,562 DEBUG HbmBinder:1099 - Mapped property: CouId -> COU_ID
13:59:23,562 DEBUG HbmBinder:1099 - Mapped property: CouName -> COU_NAME
13:59:23,562 DEBUG HbmBinder:1099 - Mapped property: SetOfReg
13:59:23,562 INFO Configuration:1222 - Configured SessionFactory: SessionFactory
13:59:23,572 DEBUG Configuration:1223 - properties: {hibernate.connection.password=CK, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.default_schema=CK, sun.boot.library.path=C:\Program Files\Java\jre1.5.0\bin, java.vm.version=1.5.0-b64, hibernate.connection.username=CK, 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=US, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=c:\Eclipse\workspace\reverse, java.runtime.version=1.5.0-b64, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jre1.5.0\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\GAVIOT~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.jnu.encoding=Cp1253, java.library.path=C:\Program Files\Java\jre1.5.0\bin;.;C:\WINNT\system32;C:\WINNT;D:\ORA9I\bin;C:\Program Files\Internet Explorer;d:\ORA9IAS\bin;D:\orant\bin;C:\sml\bin;C:\WINNT\System32\Wbem;D:\Program Files\Symantec\pcAnywhere;d:\Sybase\Adaptive Server Anywhere 6.0\win32;d:\sybaseclient\Adaptive Server Anywhere 6.0\win32;C:\Program Files\Bitvise Tunnelier;C:\Program Files\Java\jre1.5.0\bin;C:\WINNT\system32;C:\WINNT;, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.0, user.home=C:\Documents and Settings\gaviotisg, user.timezone=Europe/Athens, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.5, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, user.name=gaviotisg, java.class.path=c:\Eclipse\workspace\reverse\bin;C:\Eclipse\oracle-jdbc-driver-9.2.0.5.0\ojdbc14.jar;C:\Eclipse\hibernate-3.0.5\hibernate3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-antlr-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-junit-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-launcher-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\antlr-2.7.5H3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-swing-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\asm.jar;C:\Eclipse\hibernate-3.0.5\lib\asm-attrs.jar;C:\Eclipse\hibernate-3.0.5\lib\c3p0-0.8.5.2.jar;C:\Eclipse\hibernate-3.0.5\lib\cglib-2.1.jar;C:\Eclipse\hibernate-3.0.5\lib\cleanimports.jar;C:\Eclipse\hibernate-3.0.5\lib\commons-collections-2.1.1.jar;C:\Eclipse\hibernate-3.0.5\lib\commons-logging-1.0.4.jar;C:\Eclipse\hibernate-3.0.5\lib\concurrent-1.3.2.jar;C:\Eclipse\hibernate-3.0.5\lib\connector.jar;C:\Eclipse\hibernate-3.0.5\lib\dom4j-1.6.jar;C:\Eclipse\hibernate-3.0.5\lib\ehcache-1.1.jar;C:\Eclipse\hibernate-3.0.5\lib\jaas.jar;C:\Eclipse\hibernate-3.0.5\lib\jacc-1_0-fr.jar;C:\Eclipse\hibernate-3.0.5\lib\jaxen-1.1-beta-4.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-cache.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-common.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-jmx.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-system.jar;C:\Eclipse\hibernate-3.0.5\lib\jdbc2_0-stdext.jar;C:\Eclipse\hibernate-3.0.5\lib\jgroups-2.2.7.jar;C:\Eclipse\hibernate-3.0.5\lib\jta.jar;C:\Eclipse\hibernate-3.0.5\lib\junit-3.8.1.jar;C:\Eclipse\hibernate-3.0.5\lib\log4j-1.2.9.jar;C:\Eclipse\hibernate-3.0.5\lib\oscache-2.1.jar;C:\Eclipse\hibernate-3.0.5\lib\proxool-0.8.3.jar;C:\Eclipse\hibernate-3.0.5\lib\swarmcache-1.0rc2.jar;C:\Eclipse\hibernate-3.0.5\lib\versioncheck.jar;C:\Eclipse\hibernate-3.0.5\lib\xerces-2.6.2.jar;C:\Eclipse\hibernate-3.0.5\lib\xml-apis.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\jre1.5.0, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.Oracle9Dialect, hibernate.connection.url=jdbc:oracle:thin:@fcdb04:1521:dbtest2, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, sharing, java.version=1.5.0, java.ext.dirs=C:\Program Files\Java\jre1.5.0\lib\ext, sun.boot.class.path=C:\Program Files\Java\jre1.5.0\lib\rt.jar;C:\Program Files\Java\jre1.5.0\lib\i18n.jar;C:\Program Files\Java\jre1.5.0\lib\sunrsasign.jar;C:\Program Files\Java\jre1.5.0\lib\jsse.jar;C:\Program Files\Java\jre1.5.0\lib\jce.jar;C:\Program Files\Java\jre1.5.0\lib\charsets.jar;C:\Program Files\Java\jre1.5.0\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.session_factory_name=SessionFactory, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, sun.cpu.isalist=}
13:59:23,622 DEBUG Configuration:998 - Preparing to build session factory with filters : {}
13:59:23,622 INFO Configuration:875 - processing extends queue
13:59:23,632 INFO Configuration:879 - processing collection mappings
13:59:23,632 DEBUG HbmBinder:2466 - Second pass for collection: ck.Reg.SetOfCit
13:59:23,632 INFO HbmBinder:2041 - Mapping collection: ck.Reg.SetOfCit -> CIT
13:59:23,632 DEBUG HbmBinder:2482 - Mapped collection key: COU_ID, REG_ID, one-to-many: ck.Cit
13:59:23,632 DEBUG HbmBinder:2466 - Second pass for collection: ck.Cou.SetOfReg
13:59:23,632 INFO HbmBinder:2041 - Mapping collection: ck.Cou.SetOfReg -> REG
13:59:23,632 DEBUG HbmBinder:2482 - Mapped collection key: COU_ID, one-to-many: ck.Reg
13:59:23,632 INFO Configuration:888 - processing association property references
13:59:23,642 INFO Configuration:917 - processing foreign key constraints
13:59:23,642 DEBUG Configuration:964 - resolving reference to class: ck.Reg
13:59:23,642 DEBUG Configuration:964 - resolving reference to class: ck.Cou
13:59:24,283 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
13:59:24,283 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
13:59:24,283 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
13:59:24,413 INFO DriverManagerConnectionProvider:80 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@fcdb04:1521:dbtest2
13:59:24,413 INFO DriverManagerConnectionProvider:83 - connection properties: {user=CK, password=CK}
13:59:24,413 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
13:59:24,413 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
13:59:27,778 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:oracle:thin:@fcdb04:1521:dbtest2, Isolation Level: 2
13:59:27,808 DEBUG SettingsFactory:295 - could not get database version from JDBC metadata
13:59:27,808 INFO SettingsFactory:77 - RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
13:59:27,818 INFO SettingsFactory:78 - JDBC driver: Oracle JDBC driver, version: 9.2.0.5.0
13:59:27,818 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
13:59:27,868 INFO Dialect:92 - Using dialect: org.hibernate.dialect.Oracle9Dialect
13:59:27,908 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
13:59:27,918 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
13:59:27,918 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled
13:59:27,918 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled
13:59:27,918 INFO SettingsFactory:136 - JDBC batch size: 15
13:59:27,918 INFO SettingsFactory:139 - JDBC batch updates for versioned data: disabled
13:59:27,928 INFO SettingsFactory:144 - Scrollable result sets: enabled
13:59:27,928 DEBUG SettingsFactory:148 - Wrap result sets: disabled
13:59:27,928 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): disabled
13:59:27,928 INFO SettingsFactory:160 - Connection release mode: null
13:59:27,928 INFO SettingsFactory:178 - Default schema: CK
13:59:27,938 INFO SettingsFactory:187 - Default batch fetch size: 1
13:59:27,938 INFO SettingsFactory:191 - Generate SQL with comments: disabled
13:59:27,938 INFO SettingsFactory:195 - Order SQL updates by primary key: disabled
13:59:27,938 INFO SettingsFactory:334 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
13:59:27,948 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
13:59:27,948 INFO SettingsFactory:203 - Query language substitutions: {}
13:59:27,948 INFO SettingsFactory:209 - Second-level cache: enabled
13:59:27,958 INFO SettingsFactory:213 - Query cache: disabled
13:59:27,958 INFO SettingsFactory:321 - Cache provider: org.hibernate.cache.EhCacheProvider
13:59:27,968 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled
13:59:27,968 INFO SettingsFactory:237 - Structured second-level cache entries: disabled
13:59:27,968 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
13:59:27,988 INFO SettingsFactory:257 - Echoing all SQL to stdout
13:59:27,988 INFO SettingsFactory:261 - Statistics: disabled
13:59:27,988 INFO SettingsFactory:265 - Deleted entity synthetic identifier rollback: disabled
13:59:27,988 INFO SettingsFactory:279 - Default entity-mode: pojo
13:59:28,109 INFO SessionFactoryImpl:152 - building session factory
13:59:28,109 DEBUG SessionFactoryImpl:161 - Session factory constructed with filter configurations : {}
13:59:28,119 DEBUG SessionFactoryImpl:164 - instantiating session factory with properties: {hibernate.connection.password=CK, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.default_schema=CK, sun.boot.library.path=C:\Program Files\Java\jre1.5.0\bin, java.vm.version=1.5.0-b64, hibernate.connection.username=CK, 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=US, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=c:\Eclipse\workspace\reverse, java.runtime.version=1.5.0-b64, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jre1.5.0\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\GAVIOT~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.jnu.encoding=Cp1253, java.library.path=C:\Program Files\Java\jre1.5.0\bin;.;C:\WINNT\system32;C:\WINNT;D:\ORA9I\bin;C:\Program Files\Internet Explorer;d:\ORA9IAS\bin;D:\orant\bin;C:\sml\bin;C:\WINNT\System32\Wbem;D:\Program Files\Symantec\pcAnywhere;d:\Sybase\Adaptive Server Anywhere 6.0\win32;d:\sybaseclient\Adaptive Server Anywhere 6.0\win32;C:\Program Files\Bitvise Tunnelier;C:\Program Files\Java\jre1.5.0\bin;C:\WINNT\system32;C:\WINNT;, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.0, user.home=C:\Documents and Settings\gaviotisg, user.timezone=Europe/Athens, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.5, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, user.name=gaviotisg, java.class.path=c:\Eclipse\workspace\reverse\bin;C:\Eclipse\oracle-jdbc-driver-9.2.0.5.0\ojdbc14.jar;C:\Eclipse\hibernate-3.0.5\hibernate3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-antlr-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-junit-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-launcher-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\antlr-2.7.5H3.jar;C:\Eclipse\hibernate-3.0.5\lib\ant-swing-1.6.3.jar;C:\Eclipse\hibernate-3.0.5\lib\asm.jar;C:\Eclipse\hibernate-3.0.5\lib\asm-attrs.jar;C:\Eclipse\hibernate-3.0.5\lib\c3p0-0.8.5.2.jar;C:\Eclipse\hibernate-3.0.5\lib\cglib-2.1.jar;C:\Eclipse\hibernate-3.0.5\lib\cleanimports.jar;C:\Eclipse\hibernate-3.0.5\lib\commons-collections-2.1.1.jar;C:\Eclipse\hibernate-3.0.5\lib\commons-logging-1.0.4.jar;C:\Eclipse\hibernate-3.0.5\lib\concurrent-1.3.2.jar;C:\Eclipse\hibernate-3.0.5\lib\connector.jar;C:\Eclipse\hibernate-3.0.5\lib\dom4j-1.6.jar;C:\Eclipse\hibernate-3.0.5\lib\ehcache-1.1.jar;C:\Eclipse\hibernate-3.0.5\lib\jaas.jar;C:\Eclipse\hibernate-3.0.5\lib\jacc-1_0-fr.jar;C:\Eclipse\hibernate-3.0.5\lib\jaxen-1.1-beta-4.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-cache.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-common.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-jmx.jar;C:\Eclipse\hibernate-3.0.5\lib\jboss-system.jar;C:\Eclipse\hibernate-3.0.5\lib\jdbc2_0-stdext.jar;C:\Eclipse\hibernate-3.0.5\lib\jgroups-2.2.7.jar;C:\Eclipse\hibernate-3.0.5\lib\jta.jar;C:\Eclipse\hibernate-3.0.5\lib\junit-3.8.1.jar;C:\Eclipse\hibernate-3.0.5\lib\log4j-1.2.9.jar;C:\Eclipse\hibernate-3.0.5\lib\oscache-2.1.jar;C:\Eclipse\hibernate-3.0.5\lib\proxool-0.8.3.jar;C:\Eclipse\hibernate-3.0.5\lib\swarmcache-1.0rc2.jar;C:\Eclipse\hibernate-3.0.5\lib\versioncheck.jar;C:\Eclipse\hibernate-3.0.5\lib\xerces-2.6.2.jar;C:\Eclipse\hibernate-3.0.5\lib\xml-apis.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\jre1.5.0, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.Oracle9Dialect, hibernate.connection.url=jdbc:oracle:thin:@fcdb04:1521:dbtest2, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, sharing, java.version=1.5.0, java.ext.dirs=C:\Program Files\Java\jre1.5.0\lib\ext, sun.boot.class.path=C:\Program Files\Java\jre1.5.0\lib\rt.jar;C:\Program Files\Java\jre1.5.0\lib\i18n.jar;C:\Program Files\Java\jre1.5.0\lib\sunrsasign.jar;C:\Program Files\Java\jre1.5.0\lib\jsse.jar;C:\Program Files\Java\jre1.5.0\lib\jce.jar;C:\Program Files\Java\jre1.5.0\lib\charsets.jar;C:\Program Files\Java\jre1.5.0\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.session_factory_name=SessionFactory, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, sun.cpu.isalist=}
13:59:28,149 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Eclipse/hibernate-3.0.5/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
13:59:28,860 DEBUG BasicEntityPersister:2220 - Static SQL for entity: ck.Reg
13:59:28,870 DEBUG BasicEntityPersister:2222 - Version select: select COU_ID, REG_ID from CK.REG where COU_ID =? and REG_ID =?
13:59:28,870 DEBUG BasicEntityPersister:2223 - Snapshot select: select reg_.COU_ID, reg_.REG_ID, reg_.REG_NAME as REG3_0_ from CK.REG reg_ where reg_.COU_ID=? and reg_.REG_ID=?
13:59:28,870 DEBUG BasicEntityPersister:2225 - Insert 0: insert into CK.REG (REG_NAME, COU_ID, REG_ID) values (?, ?, ?)
13:59:28,870 DEBUG BasicEntityPersister:2226 - Update 0: update CK.REG set REG_NAME=? where COU_ID=? and REG_ID=?
13:59:29,070 DEBUG BasicEntityPersister:2227 - Delete 0: delete from CK.REG where COU_ID=? and REG_ID=?
13:59:29,210 DEBUG BasicEntityPersister:2220 - Static SQL for entity: ck.Cit
13:59:29,210 DEBUG BasicEntityPersister:2222 - Version select: select CIT_ID from CK.CIT where CIT_ID =?
13:59:29,210 DEBUG BasicEntityPersister:2223 - Snapshot select: select cit_.CIT_ID, cit_.COU_ID as COU2_1_, cit_.REG_ID as REG3_1_, cit_.CIT_NAME as CIT4_1_ from CK.CIT cit_ where cit_.CIT_ID=?
13:59:29,220 DEBUG BasicEntityPersister:2225 - Insert 0: insert into CK.CIT (COU_ID, REG_ID, CIT_NAME, CIT_ID) values (?, ?, ?, ?)
13:59:29,220 DEBUG BasicEntityPersister:2226 - Update 0: update CK.CIT set COU_ID=?, REG_ID=?, CIT_NAME=? where CIT_ID=?
13:59:29,220 DEBUG BasicEntityPersister:2227 - Delete 0: delete from CK.CIT where CIT_ID=?
13:59:29,290 DEBUG BasicEntityPersister:2220 - Static SQL for entity: ck.Cou
13:59:29,300 DEBUG BasicEntityPersister:2222 - Version select: select COU_ID from CK.COU where COU_ID =?
13:59:29,300 DEBUG BasicEntityPersister:2223 - Snapshot select: select cou_.COU_ID, cou_.COU_NAME as COU2_2_ from CK.COU cou_ where cou_.COU_ID=?
13:59:29,300 DEBUG BasicEntityPersister:2225 - Insert 0: insert into CK.COU (COU_NAME, COU_ID) values (?, ?)
13:59:29,300 DEBUG BasicEntityPersister:2226 - Update 0: update CK.COU set COU_NAME=? where COU_ID=?
13:59:29,300 DEBUG BasicEntityPersister:2227 - Delete 0: delete from CK.COU where COU_ID=?
13:59:29,350 DEBUG AbstractCollectionPersister:479 - Static SQL for collection: ck.Cou.SetOfReg
13:59:29,350 DEBUG AbstractCollectionPersister:480 - Row insert: update CK.REG set COU_ID=? where COU_ID=? and REG_ID=?
13:59:29,350 DEBUG AbstractCollectionPersister:482 - Row delete: update CK.REG set COU_ID=null where COU_ID=? and COU_ID=? and REG_ID=?
13:59:29,350 DEBUG AbstractCollectionPersister:483 - One-shot delete: update CK.REG set COU_ID=null where COU_ID=?
13:59:29,360 DEBUG AbstractCollectionPersister:479 - Static SQL for collection: ck.Reg.SetOfCit
13:59:29,360 DEBUG AbstractCollectionPersister:480 - Row insert: update CK.CIT set COU_ID=?, REG_ID=? where CIT_ID=?
13:59:29,360 DEBUG AbstractCollectionPersister:482 - Row delete: update CK.CIT set COU_ID=null, REG_ID=null where COU_ID=? and REG_ID=? and CIT_ID=?
13:59:29,360 DEBUG AbstractCollectionPersister:483 - One-shot delete: update CK.CIT set COU_ID=null, REG_ID=null where COU_ID=? and REG_ID=?
13:59:29,410 DEBUG EntityLoader:95 - Static select for entity ck.Reg: select reg0_.COU_ID as COU1_0_, reg0_.REG_ID as REG2_0_, reg0_.REG_NAME as REG3_0_0_ from CK.REG reg0_ where reg0_.COU_ID=? and reg0_.REG_ID=?
13:59:29,410 DEBUG EntityLoader:95 - Static select for entity ck.Reg: select reg0_.COU_ID as COU1_0_, reg0_.REG_ID as REG2_0_, reg0_.REG_NAME as REG3_0_0_ from CK.REG reg0_ where reg0_.COU_ID=? and reg0_.REG_ID=?
13:59:29,420 DEBUG EntityLoader:95 - Static select for entity ck.Reg: select reg0_.COU_ID as COU1_0_, reg0_.REG_ID as REG2_0_, reg0_.REG_NAME as REG3_0_0_ from CK.REG reg0_ where reg0_.COU_ID=? and reg0_.REG_ID=? for update
13:59:29,420 DEBUG EntityLoader:95 - Static select for entity ck.Reg: select reg0_.COU_ID as COU1_0_, reg0_.REG_ID as REG2_0_, reg0_.REG_NAME as REG3_0_0_ from CK.REG reg0_ where reg0_.COU_ID=? and reg0_.REG_ID=? for update nowait
13:59:29,420 DEBUG EntityLoader:95 - Static select for entity ck.Cit: select cit0_.CIT_ID as CIT1_0_, cit0_.COU_ID as COU2_1_0_, cit0_.REG_ID as REG3_1_0_, cit0_.CIT_NAME as CIT4_1_0_ from CK.CIT cit0_ where cit0_.CIT_ID=?
13:59:29,430 DEBUG EntityLoader:95 - Static select for entity ck.Cit: select cit0_.CIT_ID as CIT1_0_, cit0_.COU_ID as COU2_1_0_, cit0_.REG_ID as REG3_1_0_, cit0_.CIT_NAME as CIT4_1_0_ from CK.CIT cit0_ where cit0_.CIT_ID=?
13:59:29,430 DEBUG EntityLoader:95 - Static select for entity ck.Cit: select cit0_.CIT_ID as CIT1_0_, cit0_.COU_ID as COU2_1_0_, cit0_.REG_ID as REG3_1_0_, cit0_.CIT_NAME as CIT4_1_0_ from CK.CIT cit0_ where cit0_.CIT_ID=? for update
13:59:29,430 DEBUG EntityLoader:95 - Static select for entity ck.Cit: select cit0_.CIT_ID as CIT1_0_, cit0_.COU_ID as COU2_1_0_, cit0_.REG_ID as REG3_1_0_, cit0_.CIT_NAME as CIT4_1_0_ from CK.CIT cit0_ where cit0_.CIT_ID=? for update nowait
13:59:29,430 DEBUG EntityLoader:95 - Static select for entity ck.Cou: select cou0_.COU_ID as COU1_0_, cou0_.COU_NAME as COU2_2_0_ from CK.COU cou0_ where cou0_.COU_ID=?
13:59:29,430 DEBUG EntityLoader:95 - Static select for entity ck.Cou: select cou0_.COU_ID as COU1_0_, cou0_.COU_NAME as COU2_2_0_ from CK.COU cou0_ where cou0_.COU_ID=?
13:59:29,440 DEBUG EntityLoader:95 - Static select for entity ck.Cou: select cou0_.COU_ID as COU1_0_, cou0_.COU_NAME as COU2_2_0_ from CK.COU cou0_ where cou0_.COU_ID=? for update
13:59:29,440 DEBUG EntityLoader:95 - Static select for entity ck.Cou: select cou0_.COU_ID as COU1_0_, cou0_.COU_NAME as COU2_2_0_ from CK.COU cou0_ where cou0_.COU_ID=? for update nowait
13:59:29,501 DEBUG OneToManyLoader:106 - Static select for one-to-many ck.Cou.SetOfReg: select setofreg0_.COU_ID as COU1_1_, setofreg0_.REG_ID as REG2_1_, setofreg0_.COU_ID as COU1_0_, setofreg0_.REG_ID as REG2_0_, setofreg0_.REG_NAME as REG3_0_0_ from CK.REG setofreg0_ where setofreg0_.COU_ID=?
13:59:29,501 DEBUG OneToManyLoader:106 - Static select for one-to-many ck.Reg.SetOfCit: select setofcit0_.COU_ID as COU2_1_, setofcit0_.REG_ID as REG3_1_, setofcit0_.CIT_ID as CIT1_1_, setofcit0_.CIT_ID as CIT1_0_, setofcit0_.COU_ID as COU2_1_0_, setofcit0_.REG_ID as REG3_1_0_, setofcit0_.CIT_NAME as CIT4_1_0_ from CK.CIT setofcit0_ where setofcit0_.COU_ID=? and setofcit0_.REG_ID=?
13:59:29,511 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
13:59:29,511 DEBUG SessionFactoryObjectFactory:76 - registered: 12fc62d504ae008a0104ae00905d0000 (SessionFactory)
13:59:29,511 INFO SessionFactoryObjectFactory:86 - Factory name: SessionFactory
13:59:29,521 INFO NamingHelper:26 - JNDI InitialContext properties:{}
13:59:29,531 DEBUG NamingHelper:48 - binding: SessionFactory
13:59:29,531 WARN SessionFactoryObjectFactory:98 - Could not bind factory to JNDI
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getNameParser(Unknown Source)
at org.hibernate.util.NamingHelper.bind(NamingHelper.java:52)
at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:260)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at ck.Test.test1(Test.java:16)
at ck.runme.main(runme.java:7)
13:59:29,541 DEBUG SessionFactoryImpl:262 - instantiated session factory
13:59:29,541 INFO SessionFactoryImpl:379 - Checking 0 named queries
13:59:29,711 DEBUG SessionImpl:250 - opened session at timestamp: 4585925712039936
13:59:29,721 DEBUG DefaultLoadEventListener:143 - loading entity: [ck.Cou#GR]
13:59:29,721 DEBUG DefaultLoadEventListener:216 - creating new proxy for entity
13:59:29,731 DEBUG JDBCContext:322 - after autocommit
13:59:29,731 DEBUG SessionImpl:403 - after transaction completion
13:59:29,741 DEBUG DefaultLoadEventListener:143 - loading entity: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,741 DEBUG DefaultLoadEventListener:216 - creating new proxy for entity
13:59:29,741 DEBUG JDBCContext:322 - after autocommit
13:59:29,741 DEBUG SessionImpl:403 - after transaction completion
13:59:29,761 DEBUG SessionImpl:639 - initializing proxy: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,761 DEBUG DefaultLoadEventListener:290 - attempting to resolve: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,761 DEBUG DefaultLoadEventListener:326 - object not resolved in any cache: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,761 DEBUG BasicEntityPersister:2467 - Materializing entity: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,761 DEBUG Loader:1340 - loading entity: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,771 DEBUG AbstractBatcher:290 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
13:59:29,771 DEBUG ConnectionManager:296 - opening JDBC connection
13:59:29,771 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
13:59:29,781 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
13:59:29,781 DEBUG SQL:324 - select reg0_.COU_ID as COU1_0_, reg0_.REG_ID as REG2_0_, reg0_.REG_NAME as REG3_0_0_ from CK.REG reg0_ where reg0_.COU_ID=? and reg0_.REG_ID=?
Hibernate: select reg0_.COU_ID as COU1_0_, reg0_.REG_ID as REG2_0_, reg0_.REG_NAME as REG3_0_0_ from CK.REG reg0_ where reg0_.COU_ID=? and reg0_.REG_ID=?
13:59:29,791 DEBUG AbstractBatcher:378 - preparing statement
13:59:29,871 DEBUG AbstractBatcher:306 - about to open ResultSet (open ResultSets: 0, globally: 0)
13:59:29,871 DEBUG Loader:405 - processing result set
13:59:29,871 DEBUG Loader:410 - result set row: 0
13:59:29,871 DEBUG Loader:828 - result row: EntityKey[ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,881 DEBUG Loader:978 - Initializing object from ResultSet: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,901 DEBUG BasicEntityPersister:1651 - Hydrating entity: [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,901 DEBUG Loader:429 - done processing result set (1 rows)
13:59:29,901 DEBUG AbstractBatcher:313 - about to close ResultSet (open ResultSets: 1, globally: 1)
13:59:29,901 DEBUG AbstractBatcher:298 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
13:59:29,911 DEBUG AbstractBatcher:416 - closing statement
13:59:29,911 DEBUG Loader:528 - total objects hydrated: 1
13:59:29,911 DEBUG TwoPhaseLoad:96 - resolving associations for [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,941 DEBUG CollectionLoadContext:141 - creating collection wrapper:[ck.Reg.SetOfCit#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,951 DEBUG TwoPhaseLoad:167 - done materializing entity [ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}]
13:59:29,961 DEBUG PersistenceContext:789 - initializing non-lazy collections
13:59:29,961 DEBUG Loader:1368 - done entity load
13:59:29,961 DEBUG SessionImpl:829 - find: from Cit a where a.Reg=:reg
13:59:29,971 DEBUG QueryParameters:224 - named parameters: {reg=ck.Reg#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}}
13:59:30,141 DEBUG QueryTranslatorImpl:207 - parse() - HQL: from ck.Cit a where a.Reg=:reg
13:59:30,172 DEBUG AST:223 - --- HQL AST ---
\-[QUERY] 'query'
+-[SELECT_FROM] 'SELECT_FROM'
| \-[FROM] 'from'
| \-[RANGE] 'RANGE'
| +-[DOT] '.'
| | +-[IDENT] 'ck'
| | \-[IDENT] 'Cit'
| \-[ALIAS] 'a'
\-[WHERE] 'where'
\-[EQ] '='
+-[DOT] '.'
| +-[IDENT] 'a'
| \-[IDENT] 'Reg'
\-[COLON] ':'
\-[IDENT] 'reg'

13:59:30,172 DEBUG ErrorCounter:72 - throwQueryException() : no errors
13:59:30,272 DEBUG HqlSqlBaseWalker:120 - query() << begin, level = 1
13:59:30,322 DEBUG FromElement:88 - FromClause{level=1} : ck.Cit (a) -> cit0_
13:59:30,332 DEBUG FromReferenceNode:48 - Resolved : a -> cit0_.CIT_ID
13:59:30,332 DEBUG DotNode:476 - getDataType() : Reg -> org.hibernate.type.ManyToOneType(ck.Reg)
13:59:30,332 DEBUG DotNode:432 - dereferenceShortcut() : property Reg in ck.Cit does not require a join.
13:59:30,332 DEBUG FromReferenceNode:48 - Resolved : a.Reg -> (cit0_.COU_ID, cit0_.REG_ID)
13:59:30,342 DEBUG HqlSqlBaseWalker:125 - query() : finishing up , level = 1
13:59:30,342 DEBUG HqlSqlWalker:331 - processQuery() : ( SELECT ( FromClause{level=1} CK.CIT cit0_ ) ( where ( = ( (cit0_.COU_ID, cit0_.REG_ID) cit0_.CIT_ID Reg ) ? ) ) )
13:59:30,362 DEBUG HqlSqlWalker:451 - Derived SELECT clause created.
13:59:30,402 DEBUG JoinProcessor:112 - Using FROM fragment [CK.CIT cit0_]
13:59:30,402 DEBUG HqlSqlBaseWalker:128 - query() >> end, level = 1
13:59:30,412 DEBUG AST:193 - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (CK.CIT)
+-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
| +-[SELECT_EXPR] SelectExpressionImpl: 'cit0_.CIT_ID as CIT1_' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=a,role=null,tableName=CK.CIT,tableAlias=cit0_,colums={,className=ck.Cit}}}
| \-[SQL_TOKEN] SqlFragment: 'cit0_.COU_ID as COU2_1_, cit0_.REG_ID as REG3_1_, cit0_.CIT_NAME as CIT4_1_'
+-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[a], fromElementByTableAlias=[cit0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
| \-[FROM_FRAGMENT] FromElement: 'CK.CIT cit0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=a,role=null,tableName=CK.CIT,tableAlias=cit0_,colums={,className=ck.Cit}}
\-[WHERE] SqlNode: 'where'
\-[EQ] SqlNode: '='
+-[DOT] DotNode: '(cit0_.COU_ID, cit0_.REG_ID)' {propertyName=Reg,dereferenceType=ROOT_LEVEL,propertyPath=Reg,path=a.Reg,tableAlias=cit0_,className=ck.Cit,classAlias=a}
| +-[ALIAS_REF] IdentNode: 'cit0_.CIT_ID' {alias=a, className=ck.Cit, tableAlias=cit0_}
| \-[IDENT] IdentNode: 'Reg' {originalText=Reg}
\-[NAMED_PARAM] SqlNode: '?'

13:59:30,422 DEBUG ErrorCounter:72 - throwQueryException() : no errors
13:59:30,442 DEBUG QueryTranslatorImpl:177 - HQL: from ck.Cit a where a.Reg=:reg
13:59:30,452 DEBUG QueryTranslatorImpl:178 - SQL: select cit0_.CIT_ID as CIT1_, cit0_.COU_ID as COU2_1_, cit0_.REG_ID as REG3_1_, cit0_.CIT_NAME as CIT4_1_ from CK.CIT cit0_ where (cit0_.COU_ID, cit0_.REG_ID)=?
13:59:30,452 DEBUG ErrorCounter:72 - throwQueryException() : no errors
13:59:30,462 DEBUG AbstractFlushingEventListener:52 - flushing session
13:59:30,462 DEBUG AbstractFlushingEventListener:102 - processing flush-time cascades
13:59:30,472 DEBUG AbstractFlushingEventListener:150 - dirty checking collections
13:59:30,472 DEBUG AbstractFlushingEventListener:167 - Flushing entities and processing referenced collections
13:59:30,492 DEBUG Collections:140 - Collection found: [ck.Reg.SetOfCit#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}], was: [ck.Reg.SetOfCit#component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}] (uninitialized)
13:59:30,492 DEBUG AbstractFlushingEventListener:203 - Processing unreferenced collections
13:59:30,492 DEBUG AbstractFlushingEventListener:217 - Scheduling collection removes/(re)creates/updates
13:59:30,502 DEBUG AbstractFlushingEventListener:79 - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
13:59:30,502 DEBUG AbstractFlushingEventListener:85 - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections
13:59:30,502 DEBUG Printer:83 - listing entities:
13:59:30,502 DEBUG Printer:90 - ck.Reg{SetOfCit=<uninitialized>, RegName=Greece, id=component[Cou,RegId]{Cou=ck.Cou#GR, RegId=GR}}
13:59:30,532 DEBUG DefaultAutoFlushEventListener:60 - Dont need to execute flush
13:59:30,542 DEBUG AbstractBatcher:290 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
13:59:30,542 DEBUG SQL:324 - select cit0_.CIT_ID as CIT1_, cit0_.COU_ID as COU2_1_, cit0_.REG_ID as REG3_1_, cit0_.CIT_NAME as CIT4_1_ from CK.CIT cit0_ where (cit0_.COU_ID, cit0_.REG_ID)=?
Hibernate: select cit0_.CIT_ID as CIT1_, cit0_.COU_ID as COU2_1_, cit0_.REG_ID as REG3_1_, cit0_.CIT_NAME as CIT4_1_ from CK.CIT cit0_ where (cit0_.COU_ID, cit0_.REG_ID)=?
13:59:30,542 DEBUG AbstractBatcher:378 - preparing statement
13:59:30,542 DEBUG QueryLoader:260 - bindNamedParameters() ck.Reg@14e3f41 -> reg [1]
13:59:30,562 DEBUG AbstractBatcher:298 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
13:59:30,562 DEBUG AbstractBatcher:416 - closing statement
13:59:30,572 DEBUG JDBCExceptionReporter:63 - could not execute query [select cit0_.CIT_ID as CIT1_, cit0_.COU_ID as COU2_1_, cit0_.REG_ID as REG3_1_, cit0_.CIT_NAME as CIT4_1_ from CK.CIT cit0_ where (cit0_.COU_ID, cit0_.REG_ID)=?]
java.sql.SQLException: ORA-00920: invalid relational operator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:880)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2516)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2850)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:537)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at ck.Test.test1(Test.java:26)
at ck.runme.main(runme.java:7)
13:59:30,572 WARN JDBCExceptionReporter:71 - SQL Error: 920, SQLState: 42000
13:59:30,572 ERROR JDBCExceptionReporter:72 - ORA-00920: invalid relational operator

13:59:30,582 DEBUG JDBCContext:322 - after autocommit


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 18, 2005 2:45 pm 
Newbie

Joined: Tue Oct 26, 2004 3:55 pm
Posts: 5
I have the same problem. I believe that it is in the Hibernate Dialect where it generates the statement:
Code:
(obj1.someValue, obj1.anotherValue) = (obj2.someValue, obj2.anotherValue)

I think i'll go take a look at it.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.