0 Replies Latest reply on Dec 13, 2005 12:18 PM by Tim

    org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx

    Tim Newbie

      Hi,

      I am a unsure to what is wrong, I have the following code generated with middlegen:

      /** Association. */
      private java.util.Collection<steph.ejb.Rank> ranks;


      /**
      * Get the ranks.
      *
      * @return The ranks.
      */
      @javax.persistence.OneToMany(cascade = javax.persistence.CascadeType.ALL, fetch = javax.persistence.FetchType.EAGER)
      @javax.persistence.JoinColumn(name = "property_id_fk")
      public java.util.Collection<steph.ejb.Rank> getRanks() {
      return ranks;
      }

      However when try to use getRanks() I get the following error:
      [java] javax.ejb.EJBException: null; CausedByException is:
      [java] null
      [java] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:46)
      [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:70)
      [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:204)
      [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:566)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:436)
      [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:247)
      [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:299)
      [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169)
      [java] java.lang.NullPointerException
      [java] at steph.ejb.ManagerImpl.getAverageRank(ManagerImpl.java:62)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      [java] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:32)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
      [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:204)
      [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:566)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:436)
      [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:247)
      [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:299)
      [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169)
      [java] java.lang.NullPointerException
      [java] at steph.ejb.ManagerImpl.getAverageRank(ManagerImpl.java:62)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      [java] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:32)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
      [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:204)
      [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:566)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:436)
      [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:247)
      [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:299)
      [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169)

      Searching for properties or ranks on their own is fine and access from the other side is fine.

      Would be great to get this working before I leave for my Holidays next week!

      Thanks,

      Tim