• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB3 Stateless Session Bean deployment failure on JBOSS 5.1.0 GA

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are trying to deploy a simple calculator bean to JBOSS. The jar is attached. But deployment is failing with with following error "No container configured with name 'Stateless Bean''"

here is the full stacktrace. Please help us find out exact reason for the error.

-------------------
org.jboss.deployers.spi.DeploymentException: Error deploying EJB3_Training.jar: No container configured with name 'Stateless Bean''
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: No container configured with name 'Stateless Bean''
at org.jboss.ejb3.Ejb3AnnotationHandler.getStatelessContainer(Ejb3AnnotationHandler.java:307)
at org.jboss.ejb3.Ejb3DescriptorHandler.getStatelessContainer(Ejb3DescriptorHandler.java:499)
at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:203)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:718)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:669)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:651)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:614)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:491)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
... 33 more


-------------------
Contents of the jar are
-------------------

0 Thu Jun 16 13:00:00 EDT 2011 META-INF/
102 Thu Jun 16 12:59:58 EDT 2011 META-INF/MANIFEST.MF
0 Thu Jun 16 12:59:26 EDT 2011 META-INF/wsdl/
0 Thu Jun 16 12:59:26 EDT 2011 training/
0 Thu Jun 16 12:59:26 EDT 2011 training/session/
0 Thu Jun 16 12:59:26 EDT 2011 training/session/stateless/
470 Thu Jun 16 12:59:26 EDT 2011 META-INF/jboss.xml
731 Thu Jun 16 12:59:26 EDT 2011 training/session/stateless/CalculatorBean.class
333 Thu Jun 16 12:59:26 EDT 2011 training/session/stateless/CalculatorRemote.class
-------------------

Remote interface CalculatorRemote.java


Bean class CalculatorBean.java



Note that the same jar gets deployed perfectly on Glassfish. We face issue only on JBOSS.
Thanks in advance,
Manju
 
Ranch Hand
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Manjunatha!

So you have no EJB Deployment Descriptor (ejb-jar.xml), right?
What is the content of this jboss.xml file?

Cheers!
 
Manjunatha Murthy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have a ejb-jar.xml, but tried with an empty one as well.

here's my jboss.xml

[code]
<?xml version="1.0"?>
<jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" version="3.0">
<enterprise-beans>
<session>
<ejb-name>CalculatorBean</ejb-name>
<business-remote>training.session.stateless.CalculatorRemote</business-remote>
<jndi-name>Calculator/remote</jndi-name>
</session>
</enterprise-beans>
</jboss>
[code]
 
Piotr Nowicki
Ranch Hand
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you deploy your code as a EAR or JAR archive?
Do you deploy it to your "deployer" or "deploy" directory?
 
Manjunatha Murthy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we are deploying it as a jar. Copying the jar to deploy directory of default server instance.
 
Piotr Nowicki
Ranch Hand
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I noticed the "wsdl" resource in your META-INF directory. Do you think it might be related with this bug: https://issues.jboss.org/browse/EJBTHREE-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel ?
 
Manjunatha Murthy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We found out that the version we are using is a stripped version and not default version. On a different default version the EJB gets deployed. Now we are checking the differences in jar/ears/sars between the stripped and default version.
Any hints on what could have caused this?
 
Piotr Nowicki
Ranch Hand
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, no idea what could have caused this...

On what version of JBoss the deployment is successful?

By the way - what tool do you use to check differences between jar's? Jardiff?
 
Manjunatha Murthy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Earlier versions of our product didn't have any EJB3 beans, we had EJB2.1 beans. So, even after migrating to EJB5, EJB3 configurations were stripped off. EJB3 bean deployment worked after adding following 4 files.


ejb3-connectors-jboss-beans.xml
ejb3-container-jboss-beans.xml
ejb3-interceptors-aop.xml
ejb3-timerservice-jboss-beans.xml

we had not gone to the extent of checking difference in content of jar files. We were checking if some jars are missed. But in general, yes we use jardiff.

Thanks for your assistance
 
Piotr Nowicki
Ranch Hand
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's great to know it worked for you!

Hope there will be no wicked problems like this one :-)

Cheers!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic