]
Strong Liu resolved HHH-6795.
-----------------------------
Resolution: Fixed
Fix Version/s: 4.0.0.next
Assignee: Strong Liu
unsupported Boolean type null value on Sybase causes hangs forever
when doing bind parameter
--------------------------------------------------------------------------------------------
Key: HHH-6795
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6795
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 4.0.0.CR5
Reporter: Strong Liu
Assignee: Strong Liu
Fix For: 4.0.0.next
_org.hibernate.test.annotations.entity.Java5FeaturesTest#testEnums_
when running this test, it calls org.hibernate.type.descriptor.sql.BasicBinder#bind to
bind parameters to insert statement, since Bit.approved is null, then this
"st.setNull( index, sqlDescriptor.getSqlType() );" is called, and
sqlDescriptor.getSqlType() returns Types.BOOLEAN (16)
stacktrace
{code}
Hibernate:
insert
into
Bid
(approved, description, editorsNote, note, DTYPE, id)
values
(?, ?, ?, ?, 'Bid', ?)
22:12:21,806 TRACE BasicBinder:3654 - binding parameter [1] as [BOOLEAN] - <null>
22:12:21,808 TRACE BasicBinder:3654 - binding parameter [2] as [VARCHAR] - My best one
22:12:21,814 TRACE EnumType:3674 - Binding {0} to parameter: 3
22:12:21,815 TRACE EnumType:3674 - Binding {0} to parameter: {1}
22:12:21,816 TRACE BasicBinder:3654 - binding parameter [5] as [INTEGER] - 1
22:12:21,817 DEBUG SqlExceptionHelper:3554 - JZ006: Caught IOException:
java.io.IOException: JZ0SL: Unsupported SQL type 16. [n/a]
java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported
SQL type 16.
at com.sybase.jdbc4.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc4.jdbc.ErrorMessage.raiseErrorCheckDead(Unknown Source)
at com.sybase.jdbc4.tds.Tds.a(Unknown Source)
at com.sybase.jdbc4.tds.Tds.a(Unknown Source)
at com.sybase.jdbc4.tds.Tds.dynamicExecute(Unknown Source)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.sendQuery(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(Unknown Source)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeUpdate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:123)
at
org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at $Proxy17.executeUpdate(Unknown Source)
at
org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2849)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3290)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186)
at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1084)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:319)
at
org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at
org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
at
org.hibernate.test.annotations.entity.Java5FeaturesTest.testEnums(Java5FeaturesTest.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.hibernate.testing.junit4.FailureExpectedHandler.evaluate(FailureExpectedHandler.java:59)
at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at
org.hibernate.testing.junit4.BeforeClassCallbackHandler.evaluate(BeforeClassCallbackHandler.java:43)
at
org.hibernate.testing.junit4.AfterClassCallbackHandler.evaluate(AfterClassCallbackHandler.java:42)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
22:12:21,827 WARN SqlExceptionHelper:3629 - SQL Error: 0, SQLState: JZ006
22:12:21,828 ERROR SqlExceptionHelper:3589 - JZ006: Caught IOException:
java.io.IOException: JZ0SL: Unsupported SQL type 16.
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: