2 Replies Latest reply on Dec 18, 2006 3:13 PM by K A

    The EJB3 embeddable release contains errors

    K A Newbie


      I was trying to use the jboss embeddable alpha server in my unit tests. I downloaded the latest release and tried the tutorials and they ran fine. When trying to use the server with my tests i first got an

      java.lang.NoClassDefFoundError: javax/persistence/NoResultException

      Ok, so when looking in the ejb3-persistence.jar the class wasn't there and that must be a mistake. I added the ejb3-persistence.jar file from the jboss app server and then I got another of those NoClassDefFoundErrors:

      java.lang.NoClassDefFoundError: javax/persistence/spi/PersistenceInfo

      From what I can see this an old interface that shouldn't be used.

      Maybe I'm missing something here but it looks like there are some errors with the embeddable release.


        • 1. Re: The EJB3 embeddable release contains errors
          K A Newbie

          Some updates:

          I created a new jar file from the old one but added the NoResultException. In this way I got rid of the ClassNotFoundExceptions but I'm getting some other strange errors now. This is the coding I'm using to start the embedded server:

          EJB3StandaloneDeployer deployer = new EJB3StandaloneDeployer(); deployer.getArchivesByResource().add("META-INF/persistence.xml");
          // need to set the InitialContext properties that deployer will use
          // to initial EJB containers

          An error then occurs at deployer.create(). The warnings and exceptions looks like this:

          [testng] WARN 18-12 19:55:31,321 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=file:/C:/dev/project/ejb/embedded_jboss_alpha/conf/bean-deployer_1_0.xsd
           [testng] WARN 18-12 19:55:31,337 (SaxJBossXBParser.java:warning:226) -schema_reference.4: Failed to read schema document 'bean-deployer_1_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. @ file:/C:/dev/project/ejb/embedded_jboss_alpha/conf/embedded-jboss-beans.xml[5,45]
           [testng] WARN 18-12 19:55:32,399 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
           [testng] WARN 18-12 19:55:33,978 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=http://java.sun.com/xml/ns/javaee/javaee_5.xsd
           [testng] WARN 18-12 19:55:34,446 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=http://java.sun.com/xml/ns/javaee/javaee_web_services_client_1_2.xsd
           [testng] FAILED: startEjbServer
           [testng] java.lang.NullPointerException
           [testng] at org.jboss.ejb3.Ejb3DescriptorHandler.isEjb(Ejb3DescriptorHandler.java:129)
           [testng] at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:310)
           [testng] at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:300)
           [testng] at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:282)
           [testng] at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:253)
           [testng] at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:240)
           [testng] at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.create(EJB3StandaloneDeployer.java:390)
           [testng] at test.EJBLifeCycle.startEjbServer(Unknown Source)

          I used the jboss embeddable alpha_5 before and there everything worked perfect and I had no problems like this. The problem with alpha_5 was that the @EntityResult annotation wasn't updated to the spec. Does anyone have an idea about what could be wrong? The application is, by the way, working when I deploy it in JBoss AS.

          Thanks in advance


          • 2. Re: The EJB3 embeddable release contains errors
            K A Newbie

            Me again, I'm sorry...I made a mistake...following the links on the jboss site I downloaded an older version from 2005-08-03 and that's what caused my problems. You can remove this thread if you want to.