java.sql.SQLException: ORA-00997: illegal use of LONG datatype + Hibernate

Srinivasu_V
Srinivasu_V used Ask the Experts™
on
While running a Hibernate's Update query ex, i'm getting the following exception.....

org.hibernate.exception.SQLGrammarException: could not load an entity: [Contact#2]
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.loader.Loader.loadEntity(Loader.java:1874)
      at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
      at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
      at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3044)
      at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
      at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
      at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
      at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
      at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
      at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
      at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
      at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
      at UpdateQuery_Hib.main(UpdateQuery_Hib.java:35)
Caused by: java.sql.SQLException: ORA-00997: illegal use of LONG datatype

      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:573)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
      at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
      at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
      at org.hibernate.loader.Loader.doQuery(Loader.java:674)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
      at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Problem solved by small change...  
i've just removed the type attribute in the hbm file...   its working fine.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial