0 Replies Latest reply on Feb 6, 2013 4:24 AM by sandello

    Invoke an EJB from anoter ear through local interface

    sandello

      I have a two J2EE 6 applications deployed to JBoss AS 7.1.1

      An ejb (ejb "A") from the first ear invoke another ejb (ejb "B") from the second ear. But the JBoss server throws a ClassCastException durin lookup:

       

      14:42:26,291 ERROR [com.techinfocom.agiserver.EjbAgiScript] (Asterisk-Java DaemonPool-1-thread-4) ynqpt0q0l20wxl8af6bt:service: : java.lang.ClassCastException: org.asteriskjava.fastagi.AgiScript$$$view82 cannot be cast to org.asteriskjava.fastagi.AgiScript
              at com.techinfocom.agiserver.AgiServerUtils.getAgiScript(AgiServerUtils.java:55) [agiserver-common-2.5-SNAPSHOT.jar:2.5-SNAPSHOT-${git.branch}.${git.commit.id.abbrev}]
              at com.techinfocom.agiserver.EjbAgiScript.service(EjbAgiScript.java:62) [agiserver-common-2.5-SNAPSHOT.jar:2.5-SNAPSHOT-${git.branch}.${git.commit.id.abbrev}]
              at org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConnectionHandler.java:144) [asterisk-java-1.0.0.M3.jar:]
              at org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnectionHandler.java:116) [asterisk-java-1.0.0.M3.jar:]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
      
      14:42:26,297 ERROR [org.asteriskjava.fastagi.internal.FastAgiConnectionHandler] (Asterisk-Java DaemonPool-1-thread-4) AgiException running AgiScript com.techinfocom.agiserver.EjbAgiScript on Asterisk-Java DaemonPool-1-thread-4: org.asteriskjava.fastagi.AgiException: org.asteriskjava.fastagi.AgiScript$$$view82 cannot be cast to org.asteriskjava.fastagi.AgiScript
              at com.techinfocom.agiserver.EjbAgiScript.service(EjbAgiScript.java:93) [agiserver-common-2.5-SNAPSHOT.jar:2.5-SNAPSHOT-${git.branch}.${git.commit.id.abbrev}]
              at org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConnectionHandler.java:144) [asterisk-java-1.0.0.M3.jar:]
              at org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnectionHandler.java:116) [asterisk-java-1.0.0.M3.jar:]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
      Caused by: java.lang.ClassCastException: org.asteriskjava.fastagi.AgiScript$$$view82 cannot be cast to org.asteriskjava.fastagi.AgiScript
              at com.techinfocom.agiserver.AgiServerUtils.getAgiScript(AgiServerUtils.java:55) [agiserver-common-2.5-SNAPSHOT.jar:2.5-SNAPSHOT-${git.branch}.${git.commit.id.abbrev}]
              at com.techinfocom.agiserver.EjbAgiScript.service(EjbAgiScript.java:62) [agiserver-common-2.5-SNAPSHOT.jar:2.5-SNAPSHOT-${git.branch}.${git.commit.id.abbrev}]
              ... 5 more
      

       

      All my ejbs uses local interfaces.

      jndi name of the ejb "B":

      java:global/mccc-ear/mccc-ejb/AgiScript2Ussd!org.asteriskjava.fastagi.AgiScript