Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MDB JBoss deployment problem

 
Jim Sera
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New to JBoss and I'm trying to deploy a test MDB and get this error:

12:24:10,504 INFO [EARDeployer] Init J2EE application: file:/H:/jboss/server/default/deploy/JMSTest.ear
12:25:11,663 WARN [verifier] EJB spec violation: JMSATestMDB: The ejbCreate() method must define no application exceptions.
12:25:11,673 ERROR [MainDeployer] could not create deployment: file:/H:/jboss/server/default/tmp/deploy/tmp21204JMSTest.ear-contents/JMSTestPkg-EJB.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)

I entirely removed the ejbCreate() method (which was not throwing exceptions in the first place) and it still gives this problem. I also tried turning the spec verifier off in ejb-deployer.xml and it did not make any difference which is bizzare.

Anyone have any ideas what is going on?
 
david diaz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem, the error was displayed even without the trows clause in the create method. I erased the throws clause from the ejbRemove method and everything worked just fine.

I don't understand this error, correct me if Ii'm wrong but the specification doesn't forbid to declare the ejbCreate method with the throws CreateException clause it forbids to actually throw the exception.
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MDB has no clients, so nobody to get an application exception. Not an issue of what you throw, but an issue of what you declare. EJB 2.0 spec section 15.7.3 states "The throws clause must not define any application exceptions". CreateException isn't a runtime exception, which is why the bean wouldn't deploy.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic