3 Replies Latest reply on Feb 11, 2014 8:24 AM by Tomaz Cerar

    Junit testing ejb3.1 and jboss 7.1.1.

    Fakaruddin Ali Newbie

      Hi,

      I am trying to test Session beans 3.1 using Ejb3.1 embedded container as follows

          

      System.setProperty("jboss.home", "C://myinstalls//jboss-7.1.1");

           System.setProperty("org.jboss.as.embedded.ejb3.BARREN", "true") ;

           ejbContainer = EJBContainer.createEJBContainer();

           ctx = ejbContainer.getContext();

       

      I have included

      jboss-as-embedded-7.1.1.Final.jar and jboss-client.jar(jboss 7.1.1) at the class path.

      During running the program getting following exception

       

      Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ejb/embeddable/EJBContainer

      at java.lang.ClassLoader.defineClass1(Native Method)

      at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

      at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

      at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

      at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

      at EJBContainerTest.main(EJBContainerTest.java:15)

       

       

      Pleasehelp