Hi,
I hope someone can help me. I am new to Hibernate and I am trying to set up the example program eg (the Auction example).
When test data is being inserted I get the following exception (The driver does not support this function). I am using the jt400.jar for DB2 on iSeries.
Does anyone know what this means, what the driver does not support?
When I use the same driver and write code that inserts into the database with the same insert statement it works fine.
Thank you in advance for any comments.
dorag
More information below:
Hibernate version:3.1.2
Full stack trace of any exception that occurs:
[java] Setting up some test data [java] Hibernate: [java] /* insert org.hibernate.auction.User [java] */ insert [java] into [java] AuctionUser [java] (userName, "password", email, firstName, "initial", las Name, id) [java] values [java] (?, ?, ?, ?, ?, ?, default) [java] 14:56:47,726 WARN JDBCExceptionReporter:71 - SQL Error: -99999, SQ State: IM001 [java] 14:56:47,726 ERROR JDBCExceptionReporter:72 - The driver does not s pport this function. [java] org.hibernate.exception.GenericJDBCException: could not insert: [or .hibernate.auction.User] [java] at org.hibernate.exception.SQLStateConverter.handledNonSpecific xception(SQLStateConverter.java:91) [java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateCo verter.java:79) [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExce tionHelper.java:43) [java] at org.hibernate.persister.entity.AbstractEntityPersister.inser (AbstractEntityPersister.java:1986) [java] at org.hibernate.persister.entity.AbstractEntityPersister.inser (AbstractEntityPersister.java:2405) [java] at org.hibernate.action.EntityIdentityInsertAction.execute(Enti yIdentityInsertAction.java:37) [java] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:24 ) [java] at org.hibernate.event.def.AbstractSaveEventListener.performSav OrReplicate(AbstractSaveEventListener.java:269) [java] at org.hibernate.event.def.AbstractSaveEventListener.performSav (AbstractSaveEventListener.java:167) [java] at org.hibernate.event.def.AbstractSaveEventListener.saveWithGe eratedId(AbstractSaveEventListener.java:101) [java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.sav WithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186) [java] at org.hibernate.event.def.DefaultSaveEventListener.saveWithGen ratedOrRequestedId(DefaultSaveEventListener.java:33) [java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.ent tyIsTransient(DefaultSaveOrUpdateEventListener.java:175) [java] at org.hibernate.event.def.DefaultSaveEventListener.performSave rUpdate(DefaultSaveEventListener.java:27) [java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onS veOrUpdate(DefaultSaveOrUpdateEventListener.java:70) [java] at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:559
[java] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:547) [java] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:543) [java] at org.hibernate.auction.Main.createTestAuctions(Main.java:293) [java] at org.hibernate.auction.Main.main(Main.java:370) [java] Caused by: java.sql.SQLException: The driver does not support this unction. [java] at com.ibm.as400.access.JDError.throwSQLException(JDError.java: 95) [java] at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS 00JDBCConnection.java:1945) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Sour e) [java] at java.lang.reflect.Method.invoke(Unknown Source) [java] at org.hibernate.util.GetGeneratedKeysHelper.prepareStatement(G tGeneratedKeysHelper.java:45) [java] at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(Abst actBatcher.java:435) [java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(Abstract atcher.java:93) [java] at org.hibernate.persister.entity.AbstractEntityPersister.inser (AbstractEntityPersister.java:1948) [java] ... 16 more [java] Exception in thread "main"
BUILD FAILED C:\Program Files\Hibernate\hibernate-3.1.2\hibernate-3.1\build.xml:707: Java re urned: 1
Name and version of the database you are using:DB2 on iSeries
|