1 Reply Latest reply on Jul 3, 2008 3:37 AM by Thomas Wiesner

    Has anybody a runing embedded jboss env ?

    Thomas Wiesner Newbie

      Hello,

      since a few days i've tried to get a runing embedded jboss environment in eclipse ganymede, regardless what i'm doing without success.

      First and last, i tried it with the embedded beta3 package:
      i configured the bootstrap-Folder as source and added all libs to the classpath. If run the EasierEjbTestCase as JUnit-Test from within eclipse, i got the following exception

      INFO [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
       name: lisa-persistence
       ...]
      WARN [org.hibernate.ejb.packaging.InputStreamZippedJarVisitor] Unable to find file (ignored): vfs://12150126415410/
      java.lang.RuntimeException: Cannot open stream
       at org.jboss.virtual.plugins.context.vfs.AssembledDirectoryHandler.openStream(AssembledDirectoryHandler.java:117)
      


      So is the embedded beta 3 broken for simple JUnit tests ?

      I also tried the embedded module from the jboss5 CR1 source, but the build failed (see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=138401

      And the embedded package of org.jboss.ejb3 in the jboss 4.2.2 source is excluded from the build.

      I've read the wiki and the tutorials in the source docs and i'm surprised how the others run their apps in embedded jboss.

      May be anybody can give me a hint or a short howto setting up the embedded jboss environment for junit tests.

      thanks a lot in advance

      Arakasi

        • 1. Re: Has anybody a runing embedded jboss env ?
          Thomas Wiesner Newbie

          OK, i've read further posts here and slowly understand, that there are some issues with the VFS-implementation.

          So, i changed my code to deploy the JARs builded with ant in my build system:

           /**
           *
           * Deploys the JAR from the given path in the embedded jboss container.
           *
           * @throws IOException
           */
           public static void deploy() throws IOException
           {
          
           try
           {
           deployUrl = new File(JAR_RELATIV_PATH).toURL();
           Bootstrap.getInstance().deploy(deployUrl);
           }
           catch (DeploymentException e)
           {
           throw new RuntimeException("Unable to deploy", e);
           }
           }
          


          This works fine for me.