Solved

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

Posted on 2010-11-29
7
4,572 Views
Last Modified: 2013-12-10
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.ModuleException: Exception preparing module
: EJBModule(MyApplication.jar)
[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.ModuleException: Exception preparing module: EJBModule(MyApplication.jar)
[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.deployer.EJBModule.prepare(EJBModule.java:467)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
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.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:219)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1242)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:395)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.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.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor>
</interceptors>

<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>

</ejb-jar>

Any thoughts on what's going wrong? I'd appreciate any help I can get.

Regards

Panos
0
Comment
Question by:girionis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 19

Accepted Solution

by:
ramazanyich earned 500 total points
ID: 34234277
I think the reference which you used is a little bit outdated as it is written for weblogic 10.0MP and you are trying to migrate to weblogic 10.3
I suggest you better check updated doc for installation of seam on weblogic 10.3 at http://docs.jboss.org/seam/2.1.2/reference/en-US/html/weblogic.html#weblogic-ejb-issues
0
 
LVL 35

Author Comment

by:girionis
ID: 34236778
Hello ramazanyich, thanks for your reply. I have already seen this link, I have tried all the suggestions there but still no luck. I really think it's a classpath issue since my @Entity beans should be picked up by the Seam Interceptor, just like it happens with JBoss. But I am stumped as to why they are not picked up. I am pretty sure I am loading all the Seam components since if I remove the seam jars from the classpath I am getting the ClassNotFound exceptions everywhere.

Any more thoughts?
0
 
LVL 19

Assisted Solution

by:ramazanyich
ramazanyich earned 500 total points
ID: 34237414
maybe it doesn't like the <ejb-name>*</...
because in all examples all ejb-names are listed one-by-one...
Do you have your seam beans with @Statefull annotation?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 35

Author Comment

by:girionis
ID: 34237819
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".
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 34238588
seems like that causes the weblogic to fail. It expets some EJBs if you provide ejb-jar xml file
0
 
LVL 35

Author Comment

by:girionis
ID: 34238604
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.
0
 
LVL 35

Author Comment

by:girionis
ID: 34238618
> 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
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Certificat to iSeries KeyStore 1 30
jsp insert to database example 2 88
Selenium docs api java index 3 96
Delete .class files at every compile 4 55
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question