XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-4.0.4.GA
    • JBossAS-4.0.4RC1
    • CMP service
    • None

    Description

      The following code:

      /**

      • @ejb.home-method view-type="local"
        */
        public int ejbHomeTotalSalery(Long tid) throws FinderException { return ejbSelectTotalSalery(tid); }

      /**

      • @ejb.select
      • query="SELECT SUM(c.salery) FROM Coach c WHERE c.team IS NOT NULL AND c.team.id = ?1"
        */
        public abstract int ejbSelectTotalSalery(Long tid) throws FinderException;

      where Coach::Salery (Integer) is a CMP field and Coach::Team is a CMR gives:

      13:44:51,339 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract int CoachLocalHome.totalSalery(java.lang.Long) throws javax.ejb.FinderException, causedBy:
      java.lang.NullPointerException
      at CoachEJB$Proxy.ejbSelectTotalSalery(<generated>)
      at CoachEJB.ejbHomeTotalSalery(CoachEJB.java:538)
      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:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1143)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:204)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:135)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:525)
      at org.jboss.ejb.Container.invoke(Container.java:949)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
      at $Proxy379.totalSalery(Unknown Source)

      with current Branch_4_0.

      The function is called with the correct argument.

      This ejbSelect method exists for other entities also - where one of them is working.

      Hope this gives an idea - otherwise let me know.

      Attachments

        1. ejb-jar.xml
          5 kB
        2. jbas2826.zip
          6 kB
        3. jboss.xml
          2 kB
        4. jbosscmp-jdbc.xml
          1 kB

        Activity

          People

            olubyans@redhat.com Alexey Loubyansky
            jpederse@redhat.com Jesper Pedersen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: