Thursday, April 23, 2009

Play with JBoss 5: ejb3.deployer not found

Like all other open source stuffs, you have to pull the scattered pieces together before you can actually get like a simple tutorial working. Recently I downloaded JBoss 5.0.1 AS and wanted to play with the ejb3. So I downloaded the EJB3Labs from JBoss community and just as I expected, it won't run without some tweaking. Here are the tricks:
  • In build.bat, comment out set ANT_HOME=..\..\..\ant-dist and set the variable in the environment.
  • Then run build runejb, and there you get:
JBossWorldBerlinLabs\lab-slsb-demo3\src\build\build.xml:44: jboss-5.0.1.GA\server\default\deploy\ejb3.deployer not found.
  • In build.xml, you have to change the classpath as it was restructured in JBoss AS5:
deploy/ejb3.deployer -> deployers/ejb3.deployer
deploy/jboss-aop-jdk50.deployer -> deployers/jboss-aop-jboss5.deployer

Then add:
<fileset dir="${jboss.home}/common/lib">
  <include name="**/*.jar">

  • Last, in
calculator = (Calculator) ctx.lookup("TODO:insert name");
should be changed to
calculator = (Calculator) ctx.lookup("CalculatorBean/remote");
Ref: JBoss EJB3 Tutorial

No comments: