4 Replies Latest reply on Oct 3, 2002 9:53 PM by Cory

    Fails to select single field

    Cory Newbie

      I'm using:
      JBoss 3.0.3 with HSQLDB 1.7.1
      This was from patches supplied on SourceForge at:
      https://sourceforge.net/tracker/index.php?func=detail&aid=587623&group_id=22866&atid=376687)

      I need HSQLDB 1.7.1 as the 1.6 version which comes packaged with JBoss causes some grief in other parts of my application and switching to 1.7.1 fixed it.
      (Any info on why HSQLDB 1.7 isn't packaged with JBoss?)

      Here is a log excerpt that shows everything:

      16:59:51,387 INFO [STDOUT] getCargoValue() - Packet: 1000 - Cargo: "Delay"
      16:59:51,388 DEBUG [ejbSelectCargoValue] Executing SQL: SELECT t0_c.M_Value FROM TBL_PACKET t1_p, TBL_CARGO t0_c WHERE ((t1_p.K_Packet=?) AND t0_c.S_Name =
      ?) AND (t1_p.K_Packet=t0_c.FK_Packet)
      16:59:51,407 DEBUG [ejbSelectCargoValue] Find failed
      javax.ejb.EJBException: Internal error getting results for field member value; CausedByException is:
      Column not found: 0
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.java:360)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:142)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:96)
      at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      at com.traleesoftware.easyAdapter.framework.packet.entity.PacketEntityBean$Proxy.ejbSelectCargoValue()


      That SQL is perfect.

      Although if I check the contents of the M_Value field in the database it appears as "org.jboss.invocation.MarshalledValue@79215d83" in HSQL's DatabaseManagerSwing application.

      I'm currently at a loss as to what this issue is.

        • 1. Re: Fails to select single field
          Stephen Coy Novice

          The mappings for hsqldb in standardjbosscmp-jdbc.xml up until today were not brilliant.

          There's a reasonable chance that M_Value is one of java.sql.Date, java.sql.Time or java.math.BigDecimal.

          JBoss serialises objects for which it does not have mappings.

          That's what the "org.jboss.invocation.MarshalledValue@79215d83" represents.

          Try adding the following to the Hypersonic mappings in your copy:


          <java-type>java.sql.Date</java-type>
          <jdbc-type>DATE</jdbc-type>
          <sql-type>DATE</sql-type>


          <java-type>java.sql.Time</java-type>
          <jdbc-type>TIME</jdbc-type>
          <sql-type>TIME</sql-type>


          <java-type>java.math.BigDecimal</java-type>
          <jdbc-type>DECIMAL</jdbc-type>
          <sql-type>DECIMAL</sql-type>


          <java-type>java.lang.Object</java-type>
          <!-- hsqldb only supports directly serializable objects for sql type OBJECT -->
          <jdbc-type>VARBINARY</jdbc-type>
          <sql-type>VARBINARY</sql-type>


          Steve Coy

          • 2. Re: Fails to select single field
            Stephen Coy Novice

            This rotten thing just gobbled my reply.

            The short version is: add the following to the Hypersonic mappings in your standardjbosscmp-jdbc.xml file. JBoss serialises objects for which it does not have mappings.

            Hence the "org.jboss.invocation.MarshalledValue@79215d83".


            <java-type>java.sql.Date</java-type>
            <jdbc-type>DATE</jdbc-type>
            <sql-type>DATE</sql-type>


            <java-type>java.sql.Time</java-type>
            <jdbc-type>TIME</jdbc-type>
            <sql-type>TIME</sql-type>


            <java-type>java.math.BigDecimal</java-type>
            <jdbc-type>DECIMAL</jdbc-type>
            <sql-type>DECIMAL</sql-type>


            <java-type>java.lang.Object</java-type>
            <!-- hsqldb only supports directly serializable objects for sql type OBJECT -->
            <jdbc-type>VARBINARY</jdbc-type>
            <sql-type>VARBINARY</sql-type>

            • 3. Re: Fails to select single field
              Stephen Coy Novice

              Third time lucky? This rotten thing just gobbled my reply (twice).

              The short version is: add Hypersonic mappings in your standardjbosscmp-jdbc.xml file. JBoss serialises objects for which it does not have mappings.

              Hence the "org.jboss.invocation.MarshalledValue@79215d83".

              I tried pasting them in for you here, but I'm guessing that the forum software can't cope with the embedded xml.

              In particular, mappings are missing for java.sql.Date, java.sql.Time and java.math.BigDecimal.

              • 4. Re: Fails to select single field
                Cory Newbie

                THANKYOU! :)

                That fixed the issues I was having, thanks for help.

                JBoss rocks my world once more :)