Do you perhaps have a null in a database column that's mapped to a
primitive type?
> Carles Pi-Sunyer wrote:
>
> I'm using jboss 2.1 (binary bundled with tomcat).
>
> I'm having a problem with CMP finders that return Collections. The
> first bean in the Collection I'm able to access fine. After that I'm
> getting a Load failed message.
>
> Does anyone have an idea how I can make this work?
>
> Thanks,
> Carles
>
> Here is the code that makes the call:
>
> try {
> java.util.Collection usersCollection =
> home.findByCorporationId(1);
> System.out.println("collection.size: " +
> usersCollection.size());
> Iterator allUsers = usersCollection.iterator();
> while (allUsers.hasNext()) {
> Users users = (Users)allUsers.next();
> System.out.println("name: " + users.getLogin());
> System.out.println("login: " + users.getPassword());
> }
>
> } catch (Exception e) {
> System.out.println("Exception: " + e);
> e.printStackTrace();
> }
>
> Here is the console output, including the stack trace:
>
> [AuthenticationBean] collection.size: 13
> [AuthenticationBean] name: dave
> [AuthenticationBean] login: foo
> [UsersBean] java.rmi.ServerException: Load failed; nested exception
> is:
> java.lang.NullPointerException
> [UsersBean] java.lang.NullPointerException
> [UsersBean] at java.lang.reflect.Field.set(Native Method)
> [UsersBean] at
> org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setCMPFieldValue(
> JDBCCommand.java:649)
--
Dan Christopherson (danch)
nVisia Technical Architect (www.nvisia.com)
Opinions expressed are mine and do not neccessarily reflect any
position or opinion of nVISIA.
---------------------------------------------------------------------------
If you're a capitalist and you have the best goods and they're
free, you don't have to proselytize, you just have to wait.
-Eben Moglen
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user