Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

query cannot update a text, ntext, or image column and a clustering key at the same time

1 view
Skip to first unread message

Narayan

unread,
Jul 31, 2002, 6:20:33 AM7/31/02
to
From: "Narayan" <nns...@cmcltd.com>
Sender: "Narayan" <nns...@cmcltd.com>
Reply-To: "Narayan" <nns...@cmcltd.com>
Subject: query cannot update a text, ntext, or image column and a clustering key at the same time
Newsgroups: weblogic.developer.interest.jdbc
X-User-Info: 210.212.217.4
NNTP-Posting-Host: 210.212.217.4
X-Original-NNTP-Posting-Host: 210.212.217.4
Message-ID: <3d47...@newsgroups.bea.com>
Date: 31 Jul 2002 03:20:33 -0700
X-Trace: newsgroups.bea.com 1028110833 210.212.217.4 (31 Jul 2002 03:20:33 -0700)
X-Original-Trace: 31 Jul 2002 03:20:33 -0700, 210.212.217.4
Organization: BEA NEWS SITE
Lines: 100
XPident: Unknown
Path: newsgroups.bea.com!not-for-mail
Xref: newsgroups.bea.com weblogic.developer.interest.jdbc:14458


Hi,
I deployed an entity EJB which uses CMP.

One of the CMP fields is of byte[] type.I am using MS SQL 2000 server

as database server. I created a table in which the corresponding mapping

column is of type IMAGE.I am using WEBLOGIC6.0 and JDBC Drivers. I am

unable to create the entity EJB in which the size of the binary field is about
9kb..where as i am able to create the entity EJB with size of binary data field
around 6kb. I dont think the problem is with the size of the data, because in
the SQL 2K documentation the size fo IMAGE field is given as of variable 0 through
231-1 (2,147,483,647) bytes. The following is the trace of exceptions i got. I
think this problem is faced by some of u already..I will thankful to u if u find
some solution to fix this problem

************************

javax.ejb.EJBException
- with nested exception:
[java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The
query processor could not produce a query plan from the optimizer because a query
cannot update a text, ntext, or image column and a clustering key at the same
time.]
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookEntityEJB_WebLogic_CMP_RDBMS.ejbStore(CheckBookEntityEJB_WebLogic_CMP_RDBMS.java:739)
at weblogic.ejb20.manager.DBManager.storeBean(DBManager.java:236)
at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:354)
at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:218)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:512)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:79)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:893)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1229)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:168)
at weblogic.ejb20.internal.BaseEJBHome.postHomeInvoke(BaseEJBHome.java:381)
at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:379)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookEntityEJBHomeImpl.create(CheckBookEntityEJBHomeImpl.java:77)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookEntityEJBHomeImpl_WLSkel.invoke(CheckBookEntityEJBHomeImpl_WLSkel.java:70)
at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:373)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:128)
at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:237)
at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.java:118)
at weblogic.rmi.internal.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:115)
at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:88)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookEntityEJBHomeImpl_WLStub.create(CheckBookEntityEJBHomeImpl_WLStub.java:132)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookBean.addCheckBook(CheckBookBean.java:44)
at jsp_servlet._addecheck._jspService(_addecheck.java:154)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
sync = weblogic.ejb20.internal.TxManager$TxListener@7cfd4701 - with nested exception:
[javax.ejb.EJBException
- with nested exception:
[java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The
query processor could not produce a query plan from the optimizer because a query
cannot update a text, ntext, or image column and a clustering key at the same
time.]]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1248)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:218)
at weblogic.ejb20.internal.BaseEJBHome.postHomeInvoke(BaseEJBHome.java:381)
at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:379)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookEntityEJBHomeImpl.create(CheckBookEntityEJBHomeImpl.java:77)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookEntityEJBHomeImpl_WLSkel.invoke(CheckBookEntityEJBHomeImpl_WLSkel.java:70)
at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:373)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:128)
at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:237)
at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.java:118)
at weblogic.rmi.internal.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:115)
at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:88)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookEntityEJBHomeImpl_WLStub.create(CheckBookEntityEJBHomeImpl_WLStub.java:132)
at com.cmcltd.paymentserver.echeck.servercheckbook.CheckBookBean.addCheckBook(CheckBookBean.java:44)
at jsp_servlet._addecheck._jspService(_addecheck.java:154)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


********************************

Thanx in advance

Regards,

N Narayan Singh

Joseph Weinstein

unread,
Jul 31, 2002, 1:04:41 PM7/31/02
to Narayan

Narayan wrote:

> Hi,
> I deployed an entity EJB which uses CMP.
>
> One of the CMP fields is of byte[] type.I am using MS SQL 2000 server
>
> as database server. I created a table in which the corresponding mapping
>
> column is of type IMAGE.I am using WEBLOGIC6.0 and JDBC Drivers. I am
>
> unable to create the entity EJB in which the size of the binary field is about
> 9kb..where as i am able to create the entity EJB with size of binary data field
> around 6kb. I dont think the problem is with the size of the data, because in
> the SQL 2K documentation the size fo IMAGE field is given as of variable 0 through
> 231-1 (2,147,483,647) bytes. The following is the trace of exceptions i got. I
> think this problem is faced by some of u already..I will thankful to u if u find
> some solution to fix this problem
>
> ************************
>
> javax.ejb.EJBException
> - with nested exception:
> [java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The
> query processor could not produce a query plan from the optimizer because a query
> cannot update a text, ntext, or image column and a clustering key at the same
> time.]
> at

Hi. This is a purely MS SQLServer internal limitation. How big will your byte[] be?
You can try making the column a varbinary instead of image.
Joe

0 new messages