I'm quite new to Ibatis so I might be missing something, but I can't seem to be able to figure out why I'm getting this error.
I'm getting this error when I try to save a Person object which has a weapon reference variable. I know the person object isn't null since I validate the object to see if the weapon reference variable isn't null and since I checked the value in my debugger in Eclipse. Thanks to the validation and debugging I also know that the weapon reference isn't null.
To save my object to the database I use: getSqlMapClientTemplate().insert(statementMap.get("create"), object);
I'm using informix as my database and jboss as my application server.
Bit more output from my console:
14:33:12,796 ERROR [STDERR] org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
--- The error occurred in sqlmaps/person.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the Person.findById.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException: Could not get property 'weapon' from null reference. Cause: java.lang.NullPointerException; nested exception is com.ibatis.
common.jdbc.exception.NestedSQLException:
--- The error occurred in sqlmaps/person.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the Person.findById.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException: Could not get property 'weapon' from null reference. Cause: java.lang.NullPointerException
Blockquote