This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB3 varbinary is incompatible with ntext  RSS feed

 
Jose Socola
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I have this issue, I use EJB3 and Jboss 4.04GA, when insert data in ntext for example Table Car field called Note show me a message error

could not execute native bulk manipulation query [ INSERT INTO Car(Note) VALUES( ? )]

java.sql.SQLException: Operand type clash: varbinary is incompatible with ntext

at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)

at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)

at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)

at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)

at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)

at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)

at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)

at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:95)

at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)

at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:164)

at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1156)

at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:323)

at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:43)

at com.quadrem.jxis.homa.facade.TransportFacade.create(TransportFacade.java:58)

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.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)

at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)

at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)

at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)

at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)

at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)

at $Proxy596.create(Unknown Source)



I tried with inside Entity

@Lob
@Column(name = "Note", columnDefinition = "NTEXT NULL")
public String getNote()
{
return note;
}


and changed value inside D:\jboss-4.0.4.GA\server\default\conf\standardjbosscmp-jdbc.xml



<mapping>

<java-type>java.lang.String</java-type>

<jdbc-type>VARCHAR</jdbc-type>

<sql-type>VARCHAR(2147483500)</sql-type>

<!--

<sql-type>VARCHAR(256)</sql-type>
-->

</mapping>

[ April 03, 2008: Message edited by: Jose Socola ]

[ April 03, 2008: Message edited by: Jose Socola ]
[ May 28, 2008: Message edited by: Jose Socola ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!