4 Replies Latest reply on Dec 7, 2003 1:54 PM by martin0

    cmp field mapping for float on SQL2000

    martin0 Novice


      I have an entity bean with a float (lower case f) field. I am using SQLServer 2000.
      The field is called poValue.
      The database field is of type real.

      I am getting the following error:
      javax.ejb.EJBException: Internal error getting results for field member poValue; CausedByException is:
      [Microsoft][SQLServer 2000 Driver for JDBC]Value can not be converted to requested type.
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.java:418)

      Originally jbosscmp-jdbc.xml was configured to use default field mappings for this field.
      For MS SQLSERVER2000 this is


      (Not sure if java.lang.Float would be used for primitive float type?)

      I also tried explicit mapping in local jbosscmp-jdbc.xml:

      This gave the same errors.

      Can anyone tell me the solution to this problem?

      Many Thanks