0 Replies Latest reply on May 16, 2002 10:02 AM by Edwin Mol

    Problem with JAWS and MS SQL Server 2000 JDBC Driver

    Edwin Mol Newbie

      Hi,

      I'm using the latest MS SQL Server 2000 JDBC Driver and get the following error when using container managed persistance:

      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.

      This happens when JAWS performs an update statement.
      The table contains one primary key (column=id) and a unique index (column=name), the column workflowDefinitionXML is a text field.

      Can anyone tell me how to solve this?

      Below is the trace:

      [JAWS] Exists command executing: SELECT COUNT(*) FROM square_workflowDefinitions WHERE id=?
      [JAWS] Set parameter: idx=1, jdbcType=VARCHAR, value=d988e1708b0a89bb001bc7169d06426f
      [JAWS] Create command executing: INSERT INTO square_workflowDefinitions (creationDate,version,name,modificationDate,description,active,workflowDefinitionXML,id) VALUES (?,?,?,?,?,?,?,?)
      [JAWS] Set parameter: idx=1, jdbcType=DATE, value=2002-05-16
      [JAWS] Set parameter: idx=2, jdbcType=INTEGER, value=1
      [JAWS] Set parameter: idx=3, jdbcType=VARCHAR, value=acceptTask
      [JAWS] Set parameter: idx=4, jdbcType=DATE, value=2002-05-16
      [JAWS] Set parameter: idx=5, jdbcType=VARCHAR, value=acceptTask
      [JAWS] Set parameter: idx=6, jdbcType=BIT, value=false
      [JAWS] Set parameter: idx=7, jdbcType=VARCHAR, value=<!--
      <!DOCTYPE WORKFLOW-DEFINITION SYSTEM "~/square/src/com/siemens/square/ejb/workflow/META-INF/workflow.dtd"> -->


      <WORKFLOW-DEFINITION name="acceptTask">
      <WORKFLOW-DATA>








      no






      Something went wrong with accepting this task

      </WORKFLOW-DATA>
      <WORKFLOW-EVENT>
      <FACADEBEAN-EVENT>
      SynchronousWorkflowActionForTasks
      Accept
      <EVENT-METHODPARAMS>
      <EVENT-PARAM ref="task"/>
      <EVENT-PARAM ref="theUser"/>
      </EVENT-METHODPARAMS>

      </FACADEBEAN-EVENT>
      </WORKFLOW-EVENT>
      <WORKFLOW-CONDITIONS/>

      <SEQUENTIAL-PROCESS>

      <!-- LOOKUP THE OBJECT DATAS OF THIS TASK -->
      <METHOD-CALL-ACTIVITY>
      com.siemens.square.ejb.knowledgeobject.KnowledgeObjectFacade
      getKnowledgeObject




      </METHOD-CALL-ACTIVITY>

      <!-- LOOKUP THE STATUS OF THIS TASK -->
      <METHOD-CALL-ACTIVITY bean="no">

      getObjectDataForField

      Status


      </METHOD-CALL-ACTIVITY>


      <!-- LOOKUP THE ASSIGNEE OF THIS TASK -->
      <METHOD-CALL-ACTIVITY bean="no">

      getObjectDataForField

      Assigned to


      </METHOD-CALL-ACTIVITY>

      <!-- ASSIGNEE IS AN INNER OBJECT, DIVE IN THE CHILDREN... -->
      <METHOD-CALL-ACTIVITY bean="no">

      getChildren



      </METHOD-CALL-ACTIVITY>


      <METHOD-CALL-ACTIVITY>
      com.siemens.square.ejb.workflow.WorkflowFacade
      iterator




      </METHOD-CALL-ACTIVITY>

      <!-- INIT OF THE VARIABLES OF THE WHILE LOOP -->
      <METHOD-CALL-ACTIVITY bean="no">

      hasNext



      </METHOD-CALL-ACTIVITY>

      <!-- INIT OF TRUE BOOLEAN, CANNOT BE DONE WITH NEWINSTANCE
      SINCE BOOLEAN HAS NO DEFAULT CONSTRUCTOR, FUCK!!!-->
      <METHOD-CALL-ACTIVITY bean="no">

      hasNext



      </METHOD-CALL-ACTIVITY>
      <METHOD-CALL-ACTIVITY bean="no">

      valueOf

      True


      </METHOD-CALL-ACTIVITY>

      <!-- GO THROUGH ALL ASSIGNEES AND LOOK FOR THE USER -->
      <WHILE-PROCESS>
      <PROCESS-CONDITION>
      <COMPOSITE-CONDITION type="and">
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="hasNext"></LEFT-HAND-SIDE>
      <RIGHT-HAND-SIDE ref="TRUE"></RIGHT-HAND-SIDE>
      </LEAF-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="assigneeFound" />
      <RIGHT-HAND-SIDE literal="String">no</RIGHT-HAND-SIDE >
      </LEAF-CONDITION>
      </COMPOSITE-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <METHOD-CALL-ACTIVITY bean="no">

      next



      </METHOD-CALL-ACTIVITY>

      <METHOD-CALL-ACTIVITY bean="no">

      getObjectDataForField

      Target person


      </METHOD-CALL-ACTIVITY>

      <IF-THEN-ELSE-PROCESS>
      <PROCESS-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="targetPerson" field="userlinkData"/>
      <RIGHT-HAND-SIDE ref="theUser" field="id" />
      </LEAF-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <!-- mark that we found the assignee -->
      <METHOD-CALL-ACTIVITY bean="no">
      yes
      toString



      </METHOD-CALL-ACTIVITY>

      </SEQUENTIAL-PROCESS>

      </IF-THEN-ELSE-PROCESS>
      <!-- update our while condition -->
      <METHOD-CALL-ACTIVITY bean="no">

      hasNext



      </METHOD-CALL-ACTIVITY>
      </SEQUENTIAL-PROCESS>

      </WHILE-PROCESS>

      <IF-THEN-ELSE-PROCESS>
      <!-- IF THE USER IS FOUND -->
      <PROCESS-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="assigneeFound" />
      <RIGHT-HAND-SIDE literal="String">yes</RIGHT-HAND-SIDE >
      </LEAF-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <IF-THEN-ELSE-PROCESS>
      <!-- AND IF THE TASK IS NOT YET STARTED YOU CAN ACCEPT IT -->
      <PROCESS-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="status" field="listData"></LEFT-HAND-SIDE>
      <RIGHT-HAND-SIDE literal="String">Not Started</RIGHT-HAND-SIDE>
      </LEAF-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <METHOD-CALL-ACTIVITY bean="no">

      setListValue

      Busy

      </METHOD-CALL-ACTIVITY>

      <METHOD-CALL-ACTIVITY>
      com.siemens.square.ejb.knowledgeobject.KnowledgeObjectFacade
      updateKnowledgeObjectTopLevelOnly



      </METHOD-CALL-ACTIVITY>

      <METHOD-CALL-ACTIVITY bean="no">
      Task is accepted
      toString



      </METHOD-CALL-ACTIVITY>

      </SEQUENTIAL-PROCESS>


      <!-- TASK ALREADY STARTED YOU CANNOT ACCEPT IT ANYMORE -->
      <METHOD-CALL-ACTIVITY bean="no">
      <!-- one of (BEANNAME CALLEDOBJECT) -->
      The task was already accepted!
      toString



      </METHOD-CALL-ACTIVITY>

      </IF-THEN-ELSE-PROCESS>
      <!-- END IF TASK STARTED -->
      </SEQUENTIAL-PROCESS>

      <!-- THERE IS NO USER FOUND -->
      <METHOD-CALL-ACTIVITY bean="no">
      <!-- one of (BEANNAME CALLEDOBJECT) -->
      You must be assigned to the task to accept it!
      toString



      </METHOD-CALL-ACTIVITY>

      </IF-THEN-ELSE-PROCESS> <!-- THE PERFORMER IS FOUND -->
      </SEQUENTIAL-PROCESS>



      </WORKFLOW-DEFINITION>

      [JAWS] Set parameter: idx=8, jdbcType=VARCHAR, value=d988e1708b0a89bb001bc7169d06426f
      [JAWS] Rows affected = 1
      [JAWS] Store command executing: UPDATE square_workflowDefinitions SET creationDate=?,version=?,name=?,modificationDate=?,description=?,active=?,workflowDefinitionXML=?,id=? WHERE id=?
      [JAWS] Set parameter: idx=1, jdbcType=DATE, value=2002-05-16
      [JAWS] Set parameter: idx=2, jdbcType=INTEGER, value=1
      [JAWS] Set parameter: idx=3, jdbcType=VARCHAR, value=acceptTask
      [JAWS] Set parameter: idx=4, jdbcType=DATE, value=2002-05-16
      [JAWS] Set parameter: idx=5, jdbcType=VARCHAR, value=acceptTask
      [JAWS] Set parameter: idx=6, jdbcType=BIT, value=false
      [JAWS] Set parameter: idx=7, jdbcType=VARCHAR, value=<!--
      <!DOCTYPE WORKFLOW-DEFINITION SYSTEM "~/square/src/com/siemens/square/ejb/workflow/META-INF/workflow.dtd"> -->


      <WORKFLOW-DEFINITION name="acceptTask">
      <WORKFLOW-DATA>








      no






      Something went wrong with accepting this task

      </WORKFLOW-DATA>
      <WORKFLOW-EVENT>
      <FACADEBEAN-EVENT>
      SynchronousWorkflowActionForTasks
      Accept
      <EVENT-METHODPARAMS>
      <EVENT-PARAM ref="task"/>
      <EVENT-PARAM ref="theUser"/>
      </EVENT-METHODPARAMS>

      </FACADEBEAN-EVENT>
      </WORKFLOW-EVENT>
      <WORKFLOW-CONDITIONS/>

      <SEQUENTIAL-PROCESS>

      <!-- LOOKUP THE OBJECT DATAS OF THIS TASK -->
      <METHOD-CALL-ACTIVITY>
      com.siemens.square.ejb.knowledgeobject.KnowledgeObjectFacade
      getKnowledgeObject




      </METHOD-CALL-ACTIVITY>

      <!-- LOOKUP THE STATUS OF THIS TASK -->
      <METHOD-CALL-ACTIVITY bean="no">

      getObjectDataForField

      Status


      </METHOD-CALL-ACTIVITY>


      <!-- LOOKUP THE ASSIGNEE OF THIS TASK -->
      <METHOD-CALL-ACTIVITY bean="no">

      getObjectDataForField

      Assigned to


      </METHOD-CALL-ACTIVITY>

      <!-- ASSIGNEE IS AN INNER OBJECT, DIVE IN THE CHILDREN... -->
      <METHOD-CALL-ACTIVITY bean="no">

      getChildren



      </METHOD-CALL-ACTIVITY>


      <METHOD-CALL-ACTIVITY>
      com.siemens.square.ejb.workflow.WorkflowFacade
      iterator




      </METHOD-CALL-ACTIVITY>

      <!-- INIT OF THE VARIABLES OF THE WHILE LOOP -->
      <METHOD-CALL-ACTIVITY bean="no">

      hasNext



      </METHOD-CALL-ACTIVITY>

      <!-- INIT OF TRUE BOOLEAN, CANNOT BE DONE WITH NEWINSTANCE
      SINCE BOOLEAN HAS NO DEFAULT CONSTRUCTOR, FUCK!!!-->
      <METHOD-CALL-ACTIVITY bean="no">

      hasNext



      </METHOD-CALL-ACTIVITY>
      <METHOD-CALL-ACTIVITY bean="no">

      valueOf

      True


      </METHOD-CALL-ACTIVITY>

      <!-- GO THROUGH ALL ASSIGNEES AND LOOK FOR THE USER -->
      <WHILE-PROCESS>
      <PROCESS-CONDITION>
      <COMPOSITE-CONDITION type="and">
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="hasNext"></LEFT-HAND-SIDE>
      <RIGHT-HAND-SIDE ref="TRUE"></RIGHT-HAND-SIDE>
      </LEAF-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="assigneeFound" />
      <RIGHT-HAND-SIDE literal="String">no</RIGHT-HAND-SIDE >
      </LEAF-CONDITION>
      </COMPOSITE-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <METHOD-CALL-ACTIVITY bean="no">

      next



      </METHOD-CALL-ACTIVITY>

      <METHOD-CALL-ACTIVITY bean="no">

      getObjectDataForField

      Target person


      </METHOD-CALL-ACTIVITY>

      <IF-THEN-ELSE-PROCESS>
      <PROCESS-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="targetPerson" field="userlinkData"/>
      <RIGHT-HAND-SIDE ref="theUser" field="id" />
      </LEAF-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <!-- mark that we found the assignee -->
      <METHOD-CALL-ACTIVITY bean="no">
      yes
      toString



      </METHOD-CALL-ACTIVITY>

      </SEQUENTIAL-PROCESS>

      </IF-THEN-ELSE-PROCESS>
      <!-- update our while condition -->
      <METHOD-CALL-ACTIVITY bean="no">

      hasNext



      </METHOD-CALL-ACTIVITY>
      </SEQUENTIAL-PROCESS>

      </WHILE-PROCESS>

      <IF-THEN-ELSE-PROCESS>
      <!-- IF THE USER IS FOUND -->
      <PROCESS-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="assigneeFound" />
      <RIGHT-HAND-SIDE literal="String">yes</RIGHT-HAND-SIDE >
      </LEAF-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <IF-THEN-ELSE-PROCESS>
      <!-- AND IF THE TASK IS NOT YET STARTED YOU CAN ACCEPT IT -->
      <PROCESS-CONDITION>
      <LEAF-CONDITION type="equals">
      <LEFT-HAND-SIDE ref="status" field="listData"></LEFT-HAND-SIDE>
      <RIGHT-HAND-SIDE literal="String">Not Started</RIGHT-HAND-SIDE>
      </LEAF-CONDITION>
      </PROCESS-CONDITION>

      <SEQUENTIAL-PROCESS>
      <METHOD-CALL-ACTIVITY bean="no">

      setListValue

      Busy

      </METHOD-CALL-ACTIVITY>

      <METHOD-CALL-ACTIVITY>
      com.siemens.square.ejb.knowledgeobject.KnowledgeObjectFacade
      updateKnowledgeObjectTopLevelOnly



      </METHOD-CALL-ACTIVITY>

      <METHOD-CALL-ACTIVITY bean="no">
      Task is accepted
      toString



      </METHOD-CALL-ACTIVITY>

      </SEQUENTIAL-PROCESS>


      <!-- TASK ALREADY STARTED YOU CANNOT ACCEPT IT ANYMORE -->
      <METHOD-CALL-ACTIVITY bean="no">
      <!-- one of (BEANNAME CALLEDOBJECT) -->
      The task was already accepted!
      toString



      </METHOD-CALL-ACTIVITY>

      </IF-THEN-ELSE-PROCESS>
      <!-- END IF TASK STARTED -->
      </SEQUENTIAL-PROCESS>

      <!-- THERE IS NO USER FOUND -->
      <METHOD-CALL-ACTIVITY bean="no">
      <!-- one of (BEANNAME CALLEDOBJECT) -->
      You must be assigned to the task to accept it!
      toString



      </METHOD-CALL-ACTIVITY>

      </IF-THEN-ELSE-PROCESS> <!-- THE PERFORMER IS FOUND -->
      </SEQUENTIAL-PROCESS>



      </WORKFLOW-DEFINITION>

      [JAWS] Set parameter: idx=8, jdbcType=VARCHAR, value=d988e1708b0a89bb001bc7169d06426f
      [JAWS] Set parameter: idx=9, jdbcType=VARCHAR, value=d988e1708b0a89bb001bc7169d06426f
      [JAWS] 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.
      [JAWS] at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
      [JAWS] at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
      [JAWS] at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
      [JAWS] at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
      [JAWS] at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
      [JAWS] at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
      [JAWS] at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
      [JAWS] at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
      [JAWS] at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
      [JAWS] at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
      [JAWS] at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
      [JAWS] at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
      [JAWS] at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
      [JAWS] at org.jboss.pool.jdbc.PreparedStatementInPool.executeUpdate(PreparedStatementInPool.java:82)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand.executeStatementAndHandleResult(JDBCUpdateCommand.java:49)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:160)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:97)
      [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.storeEntity(JAWSPersistenceManager.java:168)
      [JAWS] at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:397)
      [JAWS] at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:252)
      [JAWS] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronization.beforeCompletion(EntitySynchronizationInterceptor.java:400)
      [JAWS] at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1210)
      [JAWS] at org.jboss.tm.TxCapsule.commit(TxCapsule.java:304)
      [JAWS] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:364)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
      [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
      [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
      [JAWS] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:286)
      [JAWS] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:395)
      [JAWS] at java.lang.reflect.Method.invoke(Native Method)
      [JAWS] at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      [JAWS] at sun.rmi.transport.Transport$1.run(Unknown Source)
      [JAWS] at java.security.AccessController.doPrivileged(Native Method)
      [JAWS] at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      [JAWS] at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
      [JAWS] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
      [JAWS] at java.lang.Thread.run(Unknown Source)