1 Reply Latest reply on Sep 2, 2002 1:19 PM by Juha Lindfors

    SQLSTATE=07006

    David Li Newbie

      Hi all, I am running into the following error and can't see to findout what is wrong with it. Any help is thankful.

      Server: JBoss 3.0.1

      Following is the error msg I got when I try to access a entity bean. Just to be note: other similar bean works fine, just this one have problem.

      COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0301N The value of a host variable in the EXECUTE or OPEN statement cannot be used because of its data type. SQLSTATE=07006

      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:260)
      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:197)
      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:448)
      at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java:1247)
      at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(DB2PreparedStatement.java:807)

      Following is my ejb-jar.xml, please note that I am using my own key class.


      <ejb-name>MDLabProcedureSource</ejb-name>
      skeva.engage.md.labs.model.MDLabProcedureSourceHome
      skeva.engage.md.labs.model.MDLabProcedureSource
      <ejb-class>skeva.engage.md.labs.model.MDLabProcedureSourceBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>skeva.engage.md.labs.model.MDLabProcedureSourceKey</prim-key-class>
      False
      <cmp-field id="MDLabProcedureSource_procedureSource">
      <field-name>procedureSource</field-name>
      </cmp-field>
      <cmp-field id="MDLabProcedureSource_description">
      <field-name>description</field-name>
      </cmp-field>
      <cmp-field id="MDLabProcedureSource_max_length">
      <field-name>max_length</field-name>
      </cmp-field>


      and the follwoing is my jaws.xml file.

      <ejb-name>MDLabProcedureSource</ejb-name>
      <create-table>false</create-table>
      <table-name>EML_PROC_SRCE</table-name>
      <remove-table>false</remove-table>
      <tuned-updates>false</tuned-updates>
      <read-only>false</read-only>
      <time-out>600</time-out>
      <cmp-field>
      <field-name>description</field-name>
      <column-name>SOURCE_DESCRIPTION</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>procedureSource</field-name>
      <column-name>PROCEDURE_SOURCE</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>max_length</field-name>
      <column-name>MAX_LENGTH</column-name>
      </cmp-field>


      and the my standarjbosscmp-jdbc.xml file is remain the same as when I got the package.

      Any hints or helps will be thankful. thanx in advance.

      David