3 Replies Latest reply on Aug 11, 2006 4:12 AM by wolfc

    Starting embeddable EJB3 server

    jaboj

      HI,

      I need a little help to start the standalone embeddable EJB3 service. I've downloaded a ALPHA and a ALPHA 8 version. Only the ALPHA_8 version matches the description in http://docs.jboss.org/ejb3/embedded/embedded.html.

      Some other guys mentioned a RC8 version (http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952489#3952489). ) - but I'm not able to locate this download.

      Where can I locate the newest download?

      I need to use the standalone embeddable EJB3 server in som JUnit tests.

      When I'm trying out the tutorial described in the above URL, I'm getting this exception:



      WARN 07-08 23:30:34,909 (BeanSchemaBinding.java:init:227) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
      ERROR 07-08 23:30:35,149 (AbstractController.java:incrementState:350) -Error installing to Start: name=TransactionManagerInitializer state=Create
      java.lang.NoSuchFieldError: xidFactory
      at org.jboss.tm.TransactionManagerInitializer.start(TransactionManagerInitializer.java:110)
      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)
      ....


      I start the server with this method:

      public static void startupEmbeddedJboss()
       {
       EJB3StandaloneBootstrap.boot(null);
       EJB3StandaloneBootstrap.scanClasspath();
      
       }
      



      I've think I've tried anything. I'm using Eclipse 3.2 and JBoss 4.0.4GA ad app.server. In eclipse the conf-dir is in the build-path. If I removed it the build-path then I'm getting another exception - so I'm sure that it is in the build path.

      Can anybody help me with this? Has anyone succeded using this embeddable EJB3 server in a unit test? I really much need to know how?

      Regard
      jaboj

        • 1. Re: Starting embeddable EJB3 server
          wolfc

          You've got the latest release. While RC8 is derived from the JBoss 4 source, Embeddable Alpha 8 is derived from JBoss 5 source.

          Please check your classpath. TransactionImpl.xidFactory is incompatible between JBoss 4.0.4.GA and JBoss Embeddable Alpha 8. Make sure the embeddable jars in <EJB3E>/lib are at the top.

          • 2. Re: Starting embeddable EJB3 server
            jaboj

            I found out that when removing the JBOSS 404 EJB3 libraries from the classpath, then the embedded server started successfully.

            However, I was thinking it would be better to use the RC8 version together with JBOSS 4.0.4 - do you know where I can download this version?

            Do you see any conflicts in using ALPHA_8 to unittest, using JUnit, a application which is ment for deploy on JBOSS 404?

            • 3. Re: Starting embeddable EJB3 server
              wolfc

              You can find all downloads via www.jboss.org => EJB 3.0 Download etc.

              The functionality of the embedded stack is more limited than the full EJB3 stack, so if it works in embedded it should work in full.