Blog Compass Lite 2.0 - personal blog About Me Album Bookmarks

Thursday, February 02, 2006

EJB Deployment Error under Weblogic

Problem Scenario:

Deploy an EJB under weblogic environment and encountered the following exception:

[Deployer:149033]preparing application iic2 on Server1
[Deployer:149033]failed application iic2 on Server1
[Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application iic2 on Server1.:
Exception:weblogic.management.ApplicationException: prepare failed for iic-ejb.jar
Module: iic-ejb.jar Error: Exception preparing module: EJBModule(iic-ejb.jar,status=NEW)
Unable to deploy EJB: iic-ejb.jar from iic-ejb.jar:
Class not found: Lorg/apache/commons/logging/Log;
java.lang.NoClassDefFoundError: Class not found: Lorg/apache/commons/logging/Log;
at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:287)
at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:232)
:

In EJB statelessSession, the stateless session bean class must define a single ejbCreate method that takes no parameters.
at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:268)
at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:232)
:

Solution:

Even though there is no error or warning during compilation you must manual add an ejbCreate() method in EJB bean class like the following:

 public void ejbCreate() throws CreateException {
  if (log.isDebugEnabled()) {
   log.debug("ApplicationRegistrationServiceImpl.ejbCreate()");
  } 
 }

1 Comments:

Post a Comment

<< Home