aspose file tools*
The moose likes JBoss/WildFly and the fly likes failed to initialize bean container with Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "failed to initialize bean container with "Null beannMetaData" error" Watch "failed to initialize bean container with "Null beannMetaData" error" New topic
Author

failed to initialize bean container with "Null beannMetaData" error

Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
I'm trying to deploy an EAR file in JBOSS 5.1GA with "all" configuration and getting a DeploymentException
with message "failed to initialize bean container" and "Null beannMetaData". JBOSS is not started.
I saw there is a similar post with the same exception : http://community.jboss.org/thread/65998?tstart=0#4267965.
I do not have any Jboss libraries inside the lib directory inside the xxx.ear file. I have only some libraries
that are needed for our custom application. The EJB's inside the ejb-jar.xml seems to get loaded/registered. But when the
SAR file is getting deployed, it throws exceptions.
Could somebody point me as to what could be wrong?


My EAR file is organized as follows:

EAR
|
|
---META-INF
| |
| ---application.xml
| ---jboss-app.xml
| ---MANIFEST.MF
|
---ejb-module.jar
| |
| META-INF
| |
| ---ejb-jar.xml
| ---jboss.xml
|
---xxx.war
| |
| xxx-applet.jar
---xxx.sar
| |
| ---META-INF
| |
| ---jboss-service.xml
| ---manifest.mf
|
|
---lib
|
---xxx-lib.jar


application.xml



jboss-app.xml



Any help is greatly appreciated! Please let me know, if you need any other configuration info.


JBOSS Start up logs:

Francesco Marchioni
author
Ranch Hand

Joined: Sep 22, 2003
Posts: 191
Hi
It might be a problem in packaging your archives. Have a look here:
https://jira.jboss.org/browse/EJBTHREE-1969

regards
Francesco


WildFly 8 Administration Book - JBoss Tutorials
Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
Hi Francesco,

Thanks for the response. All the EJB's ejb-module.jar gets deployed and my problem seems to be only with the SAR file deployment.
The workaround in the JIRA bug report says to move ejb1.jar out of lib to the root of the ear
and list it in the application.xml. But I do not have any EJB's inside the "lib" directory.

I tried some options and still not able to get the SAR file deployed.

1. I added the SAR file deployment to the ear/META-INF/application.xml and removed the jboss-app.xml.

2. I removed the SAR file out of the EAR file and deployed it independently and got the same error
as mentioned above in my original post. The EJB's got deployed and the deployment failed because of the SAR file.

Any other options that I should try out?

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

Why are you deploying EJBs in a .sar file? I don't think we have ever tested deploying EJBs in .sar files on JBoss AS5 or JBoss AS6.

[My Blog] [JavaRanch Journal]
Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
Hi Jaikiran,

I'm not deploying EJB's in the SAR file.

The SAR file contains custom MBean code in a jar file and jboss-service.xml & manifest.mf inside the META-INF directory.

jboss-service.xml



manifest.mf


Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

We have already had some issues with ClassPath processing with MANIFEST.MF files. So even if your jar is outside the .sar, it still is referenced via the MANIFEST.MF of the .sar. It's better to just get rid of the .sar and then place the bean deployment jar in the deploy folder. The EJB jar can then additionally contain the jboss-service.xml in it's META-INF folder with the following contents:

Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
Thanks, Jaikiran.

Getting rid of the SAR file and adding the jboss-service.xml to the META-INF directory of the ejb's jar file seems to deploy the services.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: failed to initialize bean container with "Null beannMetaData" error