girionis
asked on
No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with t he @Stateless
Hello all,
I've banging my head for the past day to migrate a Seam web application from JBoss 5.0 to WebLogic 10.3 server. I have followed the instructions here: http://docs.jboss.org/seam/2.0.2.SP1/reference/en-US/html/weblogic.html and I have set up everything that needs to be set up (datasources, jms queues etc) but when I deploy the .ear file on WebLogic I get the following error
<29 -¿¿ 2010 4:34:51 ¿¿ EET> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'myapplication-ear' due to error weblogic.application.Modul eException : Exception preparing module
: EJBModule(MyApplication.ja r)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with t
he @Stateless, @Stateful or @MessageDriven EJB annotation...
weblogic.application.Modul eException : Exception preparing module: EJBModule(MyApplication.ja r)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with t
he @Stateless, @Stateful or @MessageDriven EJB annotation..
at weblogic.ejb.container.dep loyer.EJBM odule.prep are(EJBMod ule.java:4 67)
at weblogic.application.inter nal.flow.M oduleListe nerInvoker .prepare(M oduleListe nerInvoker .java:199)
at weblogic.application.inter nal.flow.D eploymentC allbackFlo w$1.next(D eploymentC allbackFlo w.java:507 )
at weblogic.application.utils .StateMach ineDriver. nextState( StateMachi neDriver.j ava:41)
at weblogic.application.inter nal.flow.D eploymentC allbackFlo w.prepare( Deployment CallbackFl ow.java:14 9)
Truncated. see log file for complete stacktrace
Caused By: java.io.IOException: No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at l
east one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
at weblogic.ejb.container.dd. xml.EjbDes criptorRea derImpl.cr eateReadOn lyDescript orFromJarF ile(EjbDes criptorRea derImpl.ja va:219)
at weblogic.ejb.spi.EjbDescri ptorFactor y.createRe adOnlyDesc riptorFrom JarFile(Ej bDescripto rFactory.j ava:93)
at weblogic.ejb.container.dep loyer.EJBM odule.load EJBDescrip tor(EJBMod ule.java:1 242)
at weblogic.ejb.container.dep loyer.EJBM odule.prep are(EJBMod ule.java:3 95)
at weblogic.application.inter nal.flow.M oduleListe nerInvoker .prepare(M oduleListe nerInvoker .java:199)
Truncated. see log file for complete stacktrace
It seems that WebLogic does not like our model project (MyApplication.jar) which is a bunch of classes with @Entity and @Table annotations and an interceptor defined in the ejb-jar.xml (shown below) to handle these classes.
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0">
<interceptors>
<interceptor>
<interceptor-class>org.jbo ss.seam.ej b.SeamInte rceptor</i nterceptor -class>
</interceptor>
</interceptors>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jbo ss.seam.ej b.SeamInte rceptor</i nterceptor -class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
Any thoughts on what's going wrong? I'd appreciate any help I can get.
Regards
Panos
I've banging my head for the past day to migrate a Seam web application from JBoss 5.0 to WebLogic 10.3 server. I have followed the instructions here: http://docs.jboss.org/seam/2.0.2.SP1/reference/en-US/html/weblogic.html and I have set up everything that needs to be set up (datasources, jms queues etc) but when I deploy the .ear file on WebLogic I get the following error
<29 -¿¿ 2010 4:34:51 ¿¿ EET> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'myapplication-ear' due to error weblogic.application.Modul
: EJBModule(MyApplication.ja
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with t
he @Stateless, @Stateful or @MessageDriven EJB annotation...
weblogic.application.Modul
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with t
he @Stateless, @Stateful or @MessageDriven EJB annotation..
at weblogic.ejb.container.dep
at weblogic.application.inter
at weblogic.application.inter
at weblogic.application.utils
at weblogic.application.inter
Truncated. see log file for complete stacktrace
Caused By: java.io.IOException: No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at l
east one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
at weblogic.ejb.container.dd.
at weblogic.ejb.spi.EjbDescri
at weblogic.ejb.container.dep
at weblogic.ejb.container.dep
at weblogic.application.inter
Truncated. see log file for complete stacktrace
It seems that WebLogic does not like our model project (MyApplication.jar) which is a bunch of classes with @Entity and @Table annotations and an interceptor defined in the ejb-jar.xml (shown below) to handle these classes.
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0">
<interceptors>
<interceptor>
<interceptor-class>org.jbo
</interceptor>
</interceptors>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jbo
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
Any thoughts on what's going wrong? I'd appreciate any help I can get.
Regards
Panos
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have tried to list the ejbs one by one in the <ejb-name> but I am still getting the same error.
> Do you have your seam beans with @Statefull annotation?
No. I am using Seam's @Name annotation on POJOs which should be picked up by Seam as EJB components. This is why I think that seam might not be loaded correctly.
Currently I am running the application by changing the <ejb> element in the <module> (in application.xml) to "java" instead of "ejb".
> Do you have your seam beans with @Statefull annotation?
No. I am using Seam's @Name annotation on POJOs which should be picked up by Seam as EJB components. This is why I think that seam might not be loaded correctly.
Currently I am running the application by changing the <ejb> element in the <module> (in application.xml) to "java" instead of "ejb".
seems like that causes the weblogic to fail. It expets some EJBs if you provide ejb-jar xml file
ASKER
After much research I came to the conclusion that this is a WebLogic-specific issue, since both JBoss and Websphere do not exhibit the same behaviour. And after reading the seam specification I also found out that the @Name attribute does not create EJBs, just POJOs.
To anyone interested I had to add a dummy @Stateless bean in my project in order to make this work for WebLogic. I din't change the <ejb-name>*</... at all.
I will assign the points to ramazanyich for having helping me with the link he provided. Thanks again.
To anyone interested I had to add a dummy @Stateless bean in my project in order to make this work for WebLogic. I din't change the <ejb-name>*</... at all.
I will assign the points to ramazanyich for having helping me with the link he provided. Thanks again.
ASKER
> seems like that causes the weblogic to fail. It expets some EJBs if you provide ejb-jar xml file
Yes it does. But the *exact* same jar file works fone on JBoss and Websphere, so I guess it's a WebLogic specific issue (maybe a bug?). Anyway, the solution was to (as I said in my previous comment) to provide a dummy Stateless session bean and now it works fine.
Thanks again for your help.
Regards
Yes it does. But the *exact* same jar file works fone on JBoss and Websphere, so I guess it's a WebLogic specific issue (maybe a bug?). Anyway, the solution was to (as I said in my previous comment) to provide a dummy Stateless session bean and now it works fine.
Thanks again for your help.
Regards
ASKER
Any more thoughts?