0 Replies Latest reply on Jun 7, 2006 7:13 AM by dreu zel

    calling a  bean  using  a class structure  please  advise

    dreu zel Novice

      i'm calling an ejb 3.0 bean and it partualy seems to work but ....


      String value =bean.myroutine(String abc);
      works perfectly

      changing the bean definition to .....
      myroutine( myclass xxx)
      does not offer any construction error But fails with a runtime error

      class myclass
      {String aaa="dassd";
      String bbb="sdsds";
      }
      xxx=new myclass();
      String value=bean.myroutine2( xxx)
      // obviously all bean interfaces are addapted to myclass instead of String

      ps: as I Use Dom4j.Document as class it works fine
      just my classes do not seem to work !!!!???

      fails with
      javax.ejb.EJBException: java.lang.IllegalArgumentException:
      Wrong target. class com.bean for public java.lang.String com.cyclus.bean.myroutine2(xxx)
      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:199)
      at org.jboss.ejb3.service.ServiceLocalProxy.invoke(ServiceLocalProxy.java:75)
      at $Proxy84.DomSession(Unknown Source)
      ....



      any Ideas
      It seems to simple for me not to make a mistake.