java - UnsupportedException whenever I call save(entity) method in Hibernate and SQL Server -


i'm trying save , entity hibernate in sql server database, , got following exception:

java.lang.unsupportedoperationexception     @ sun.jdbc.odbc.jdbcodbcconnection.preparestatement(jdbcodbcconnection.java:1750)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)     @ java.lang.reflect.method.invoke(method.java:597)     @ org.hibernate.engine.jdbc.internal.proxy.connectionproxyhandler.continueinvocation(connectionproxyhandler.java:138)     @ org.hibernate.engine.jdbc.internal.proxy.abstractproxyhandler.invoke(abstractproxyhandler.java:81)     @ $proxy4.preparestatement(unknown source)     @ org.hibernate.engine.jdbc.internal.statementpreparerimpl$2.doprepare(statementpreparerimpl.java:105)     @ org.hibernate.engine.jdbc.internal.statementpreparerimpl$statementpreparationtemplate.preparestatement(statementpreparerimpl.java:166)     @ org.hibernate.engine.jdbc.internal.statementpreparerimpl.preparestatement(statementpreparerimpl.java:103)     @ org.hibernate.id.identitygenerator$insertselectdelegate.prepare(identitygenerator.java:136)     @ org.hibernate.id.insert.abstractreturningdelegate.performinsert(abstractreturningdelegate.java:52)     @ org.hibernate.persister.entity.abstractentitypersister.insert(abstractentitypersister.java:2757)     @ org.hibernate.persister.entity.abstractentitypersister.insert(abstractentitypersister.java:3268)     @ org.hibernate.action.internal.entityidentityinsertaction.execute(entityidentityinsertaction.java:78)     @ org.hibernate.engine.spi.actionqueue.execute(actionqueue.java:273)     @ org.hibernate.event.internal.abstractsaveeventlistener.performsaveorreplicate(abstractsaveeventlistener.java:304)     @ org.hibernate.event.internal.abstractsaveeventlistener.performsave(abstractsaveeventlistener.java:195)     @ org.hibernate.event.internal.abstractsaveeventlistener.savewithgeneratedid(abstractsaveeventlistener.java:128)     @ org.hibernate.event.internal.defaultsaveorupdateeventlistener.savewithgeneratedorrequestedid(defaultsaveorupdateeventlistener.java:204)     @ org.hibernate.event.internal.defaultsaveeventlistener.savewithgeneratedorrequestedid(defaultsaveeventlistener.java:55)     @ org.hibernate.event.internal.defaultsaveorupdateeventlistener.entityistransient(defaultsaveorupdateeventlistener.java:189)     @ org.hibernate.event.internal.defaultsaveeventlistener.performsaveorupdate(defaultsaveeventlistener.java:49)     @ org.hibernate.event.internal.defaultsaveorupdateeventlistener.onsaveorupdate(defaultsaveorupdateeventlistener.java:90)     @ org.hibernate.internal.sessionimpl.firesave(sessionimpl.java:642)     @ org.hibernate.internal.sessionimpl.save(sessionimpl.java:635)     @ org.hibernate.internal.sessionimpl.save(sessionimpl.java:631)     @ com.recipies.examples.chapter4.app.main(app.java:43) 

you using old version of jdbc-odbc driver supports jdbc2, jdbc3 methods throws unsupported operation exception.

the jdbc-odbc bridge works windows , scheduled removal in java8.

you should use microsoft sql server jdbc drivers instead.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -