0 Replies Latest reply on May 6, 2003 9:04 AM by Ignacio de Cordoba

    NullPointerException in a CMR

    Ignacio de Cordoba Novice

      Hi there,
      when I access a CMR I am getting the following exception:

      2003-05-06 16:47:24,822 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.Curso] Executing SQL: SELECT titulocurso, nombrearea FROM ca WHERE (titulocurso=?) OR (titulocurso=?) OR (titulocurso=?) OR (titulocurso=?) OR (titulocurso=?) OR (titulocurso=?) OR (titulocurso=?)
      2003-05-06 16:47:24,824 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy:
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.execute(JDBCLoadRelationCommand.java:141)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadRelation(JDBCStoreManager.java:703)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMRFieldBridge.java:1037)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getInstanceValue(JDBCCMRFieldBridge.java:550)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getValue(JDBCCMRFieldBridge.java:508)
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:124)
      at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      at com.skios.cvucm.CursoBean$Proxy.getAreas()
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1044)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:301)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)


      My problem is that this only happens in some columns (the database is created with foreign keys, so references are right).

      Can anybody give me a hint on where to look or at least tell me how to configure log4java.xml file to make the sql queries be logged not with "?" but with the real data sent as query?

      thanks for any help,
      Ignacio