This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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.
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.
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.