1 Reply Latest reply on Jan 12, 2002 5:09 AM by Filip Defoort

    EJB-QL nullPointerException

    Filip Defoort Newbie

      Hi,

      I'm trying to add a custom finder using EJBQL with
      JBoss 3.0alpha1:

      ejb-jar.xml:
      ...
      <abstract-schema-name>Item</abstract-schema-name>
      ...

      test
      <query-method>
      <method-name>findBlabla</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql>
      SELECT OBJECT(o) FROM Item AS o
      </ejb-ql>

      ....

      the home interfaces contain:
      public Collection findBlabla(String pattern) throws RemoteException, FinderException;


      When I try to deploy the app with this finder added, I get a null pointer exception:

      [2002-01-11 15:36:14,083,CMP,DEBUG] Loading standardjbosscmp-jdbc.xml : file:/volume1/java/JBoss-3.0.0alpha/jboss/conf/d
      efault/standardjbosscmp-jdbc.xml
      [2002-01-11 15:36:14,111,CMP,DEBUG] jar:file:/volume1/java/JBoss-3.0.0alpha/jboss/deploy/Default/someApp.ear/ejb1093.jar
      !/META-INF/jbosscmp-jdbc.xml found. Overriding defaults
      [2002-01-11 15:36:14,114,ConnectionFactoryLoader,DEBUG] ConnectionFactoryLoader.getObjectInstance, name = 'DefaultDS'
      [2002-01-11 15:36:14,115,ContainerFactory,ERROR] Could not deploy file:/volume1/java/JBoss-3.0.0alpha/jboss/deploy/Defau
      lt/someApp.ear
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.loadSelectors(JDBCEntityBridge.java:213)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:90)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.init(JDBCStoreManager.java:117)
      at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPPersistenceManager.java:141)
      at org.jboss.ejb.EntityContainer.init(EntityContainer.java:313)
      at org.jboss.ejb.Application.start(Application.java:201)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:382)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:308)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
      at java.lang.reflect.Method.invoke(Method.java:327)


      Can anybody shed some light on what's going on here??

      Thanks a lot,
      - Filip

        • 1. Re: EJB-QL nullPointerException
          Filip Defoort Newbie

          ok, I finally figured this one out:
          (after adding a ton of debug stuff to the sources :( ).
          What seems to be the case is that if you have both
          a remote and a local interface, you cannot declare
          a finder in just one of the two interfaces - you have
          to add the same finder to both interfaces!

          Not sure whether this is a bug or a feature...