lundi 17 octobre 2016

Unable to load the EJB module. DeploymentContext does not contain any EJB

i'm trying to solve this problem since days...

i'm developping a web application and i wish to test my EJBs with arquillian against Payara Server.

Testing EJB fail, returning this full stacktrace:

java.lang.NoClassDefFoundError: model/business/AbstractFacade
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    ...
    ...  more

Warning:   Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: model/business/AbstractFacade
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1232)
    ....
    ....
Caused by: java.lang.ClassNotFoundException: model.business.AbstractFacade
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1795)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
    ... 87 more

Severe:   Exception while invoking class org.glassfish.ejb.startup.EjbDeployer prepare method
Severe:   java.lang.RuntimeException: Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for /home/marco/Servers/payara4162/glassfish/domains/eWheel/applications/test.
If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected
    at org.glassfish.ejb.startup.EjbDeployer.prepare(EjbDeployer.java:189)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:926)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:435)
    ....
Severe:   Exception while preparing the app
Severe:   Exception during lifecycle processing
java.lang.RuntimeException: Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for /home/marco/Servers/payara4162/glassfish/domains/eWheel/applications/test.
If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected
    at org.glassfish.ejb.startup.EjbDeployer.prepare(EjbDeployer.java:189)
....

Severe:   Exception while preparing the app : Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for /home/marco/Servers/payara4162/glassfish/domains/eWheel/applications/test.
If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected
Info:   File /tmp/MIME1087121361997683445.tmp was not deleted

in my web.xml :

<web-app metadata-complete="false" version="3.1" xmlns="http://ift.tt/19L2NlC" xmlns:xsi="http://ift.tt/ra1lAU" xsi:schemaLocation="http://ift.tt/19L2NlC http://ift.tt/1drxgYl">

at the moment i'm using mockito, but i'd prefer a test in real env.

can someone explain me what happened please?

any suggest will be appreciated

Aucun commentaire:

Enregistrer un commentaire