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

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JDBC Driver (Fail to convert to internal representation)
PostPosted: Mon Dec 22, 2003 1:43 pm 
Newbie

Joined: Mon Dec 22, 2003 1:13 pm
Posts: 5
Hello,

I have the following mapping:

<class
name="OrgNod"
table="ORG_NODES"
>

<composite-id name="comp_id" class="OrgNodPK">
<key-property
name="orgNodeId"
column="ORG_NODE_ID"
type="java.lang.String"
length="30"
/>
<!-- bi-directional many-to-one association to Org -->
<key-many-to-one
name="org"
class="com.dataconnect.pms.business.hibernate.Org"
>
<column name="ORG_ID" />
</key-many-to-one>
</composite-id>
</class>

then I try to do the following queries... the first one is not working.
Have you ever had this problem or do you know how to solve it ?

NOT WORKING (1):
List list = session.find("select userNode.comp_id.orgNod.comp_id.org.orgId from UserNod userNode");

WORKING (2):
List list = session.find("select orgNod.comp_id.org.orgId from OrgNod orgNod");
WORKING (3):
List list = session.find("select userNode.comp_id.orgNod.comp_id.orgNodeId from UserNod userNode");

We have the feeling that the length of the path to retrieve the list might be too long for either Hibernate or the JDBC driver (for Oracle 9i).

Thanxs in advance for your help.
Regs,
Matthieu



PS: Here is the complete trace:

Hibernate: select finorgda0_.ORG_NODE_ID as x0_0_ from PMS_MD01.FIN_ORG_DAY_TOTALS finorgda0_
[main] WARN net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
SQL Error: 17059, SQLState: null
[main] WARN net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
SQL Error: 17059, SQLState: null
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
Konvertierung zu interner Darstellung nicht erfolgreich
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
Konvertierung zu interner Darstellung nicht erfolgreich
[main] WARN net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
SQL Error: 17059, SQLState: null
[main] WARN net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
SQL Error: 17059, SQLState: null
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
Konvertierung zu interner Darstellung nicht erfolgreich
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,515 - 0
Konvertierung zu interner Darstellung nicht erfolgreich
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,531 - 16
Could not execute query
java.sql.SQLException: Konvertierung zu interner Darstellung nicht erfolgreich
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
at oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:3729)
at oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.java:338)
at oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1563)
at net.sf.hibernate.type.LongType.get(LongType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.hql.QueryTranslator.getResultColumnOrRow(QueryTranslator.java:1003)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:217)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:128)
at net.sf.hibernate.loader.Loader.list(Loader.java:918)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:992)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1470)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1449)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1441)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:168)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:158)
at com.dataconnect.pms.test.HibernateTest.testHQL2(HibernateTest.java:169)
at com.dataconnect.pms.test.HibernateTest.main(HibernateTest.java:33)
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter
2003-12-22 17:53:41,531 - 16
Could not execute query
java.sql.SQLException: Konvertierung zu interner Darstellung nicht erfolgreich
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
at oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:3729)
at oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.java:338)
at oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1563)
at net.sf.hibernate.type.LongType.get(LongType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.hql.QueryTranslator.getResultColumnOrRow(QueryTranslator.java:1003)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:217)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:128)
at net.sf.hibernate.loader.Loader.list(Loader.java:918)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:992)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1470)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1449)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1441)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:168)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:158)
at com.dataconnect.pms.test.HibernateTest.testHQL2(HibernateTest.java:169)
at com.dataconnect.pms.test.HibernateTest.main(HibernateTest.java:33)
[main] FATAL com.dataconnect.pms.service.LogicalStoreServiceImpl
2003-12-22 17:53:41,546 - 31
net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1473)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1449)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1441)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:168)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:158)
at com.dataconnect.pms.test.HibernateTest.testHQL2(HibernateTest.java:169)
at com.dataconnect.pms.test.HibernateTest.main(HibernateTest.java:33)
Caused by: java.sql.SQLException: Konvertierung zu interner Darstellung nicht erfolgreich
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
at oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:3729)
at oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.java:338)
at oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1563)
at net.sf.hibernate.type.LongType.get(LongType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.hql.QueryTranslator.getResultColumnOrRow(QueryTranslator.java:1003)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:217)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:128)
at net.sf.hibernate.loader.Loader.list(Loader.java:918)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:992)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1470)
... 6 more

[main] FATAL com.dataconnect.pms.service.LogicalStoreServiceImpl
2003-12-22 17:53:41,546 - 31
net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1473)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1449)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1441)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:168)
at com.dataconnect.pms.service.LogicalStoreServiceImpl.find(LogicalStoreServiceImpl.java:158)
at com.dataconnect.pms.test.HibernateTest.testHQL2(HibernateTest.java:169)
at com.dataconnect.pms.test.HibernateTest.main(HibernateTest.java:33)
Caused by: java.sql.SQLException: Konvertierung zu interner Darstellung nicht erfolgreich
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
at oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:3729)
at oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.java:338)
at oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1563)
at net.sf.hibernate.type.LongType.get(LongType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.hql.QueryTranslator.getResultColumnOrRow(QueryTranslator.java:1003)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:217)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:128)
at net.sf.hibernate.loader.Loader.list(Loader.java:918)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:992)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1470)
... 6 more


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

All times are UTC - 5 hours [ DST ]


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

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