Hi,
       I am facing a problem with some CMP EJBs with custom PrimaryKey Classes. I am getting the EJBs deployed but during invoking of the findbyprimarykey method I am getting a TransactionRolledBack Exception. On investigating the cause of this I found that it was due to  a ClassCastException that was ocurring in TranQL. In the class org.tranql.sql.jdbc.binding.StringBinding
there is a method setValue. Here during execution the value parameter contains the custom primary key class cast as Object. In the setString method it gives a ClassCastException. Shouldn't this be a value.toString() here? or is this method always supposed to get just a string value?

  public void setValue(PreparedStatement ps, Object value) throws SQLException {
        ps.setString(index, (String) value);
    }

Is there any specific property we need to put in openejb-jar.xml when we use complex PrimaryKey classes over and above the entries in ejb-jar.xml?
Also for the <primkey-field> value in the openejb-jar.xml what do we put if we have a complex primary key consisting of 2 fields?

Thanks
Manu
     

Reply via email to