• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

many-to-one and Set problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working with Oracle 10g JDeveloper and I have used the Set tag in one of my classes and the result of my problem is:

Exception breakpoint occurred at line 1923 of Loader.java.
org.hibernate.exception.GenericJDBCException: could not initialize a collection: [aria.dto.MyTableTO.addresses#9]
Exception in thread main
org.hibernate.exception.GenericJDBCException: could not initialize a collection: [aria.dto.MyTableTO.addresses#9]

at org.hibernate.JDBCException.<init>(JDBCException.java:25)

at org.hibernate.exception.GenericJDBCException.<init>(GenericJDBCException.java:19)

at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)

at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)

at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

at org.hibernate.loader.Loader.loadCollection(Loader.java:1923)

at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:71)

at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)

at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)

at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1565)

at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)

at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)

at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)

at org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:121)

at aria.dto.MyTableTO.isContainAddress(MyTableTO.java:79)

at aria.dao.MyTableDAO.DeleteAddresses(MyTableDAO.java:111)

at aria.dao.TestClient.main(TestClient.java:15)

Caused by: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index

at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)

at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)

at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3812)

at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java:5642)

at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:585)

at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:603)

at org.hibernate.type.IntegerType.get(IntegerType.java:28)

at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)

at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)

at org.hibernate.persister.collection.AbstractCollectionPersister.readKey(AbstractCollectionPersister.java:676)

at org.hibernate.loader.Loader.readCollectionElement(Loader.java:962)

at org.hibernate.loader.Loader.readCollectionElements(Loader.java:635)

at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:579)

at org.hibernate.loader.Loader.doQuery(Loader.java:689)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)

at org.hibernate.loader.Loader.loadCollection(Loader.java:1916)

... 11 more

Debugger disconnected from local process.
Process exited.
 
And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic