I'm getting Null Pointer exceptions (in JDBCCommand.java @line 591) in a CMP when a
database column is an integer type and contains a null value. This happens from any
of the finder methods for the specific bean (i.e. findAll was the first place I saw
it). I can call findAll() and it returns a Collection. I'm getting the exception the
first time I try to reference an element in the collection Iteration (i.e.
iter.next()) that contains a reference to a null integer database column.
This is with JBoss 2.0 Final, using InterBase with the InterClient JDBC driver all
running under Linux (RedHat 7.0) and IBM 1.3 jdk (Classic VM (build 1.3.0, J2RE 1.3.0
IBM build cx130-20001124 (JIT enabled: jitc)).
Is this a known issue? If not, I can provide more details. Below is the code
snipped from JDBCCommand.java. When the null pointer exception occurs, the value
parameter is null. The fields causing exception are defined as 'INTEGER' in
InterBase. I'm using the standardjaws.xml mappings for interbase;
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
protected void setCMPFieldValue(Object instance,
CMPFieldMetaData fieldMetaData,
Object value)
throws IllegalAccessException
{
Field field = fieldMetaData.getField();
field.set(instance, value); // line 591
}
Thanks!
Tom
--
Tom Armistead
972-495-1465
[EMAIL PROTECTED]
http://armisteads.com/tom/
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]