Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while deploying jar in Weblogic

 
Prasanth Pillai
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a MDB class. and created ejb-jar, weblogic-ejb-jar with following descriptors.

ejb-jar.xml

weblogic-ejb-jar.xml




I am creating a mdb.jar using the following command





C:\bin>jar cvf mdb.jar common/alertMgmt/mdb/AlertMDB.class common/alertMgmt/mdb/META-INF/ejb-jar.xml common/alertMgmt/mdb/META-INF/weblogic-ejb-jar.xml





Then I am placing the mdb.jar and META-INF folder under bea\weblogic81\server\bin\applications\alert.





when I am trying to deploy the mdb.jar. I am getting the following error.


weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException: prepare failed for alert
Module: alert Error: Exception preparing module: EJBModule(alert,status=NEW)


Unable to deploy EJB: C:\bea\weblogic81\server\bin\applications\alert from alert:

weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: common.alertMgmt.mdb.AlertMDB
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(Lweblogic/management/descriptors/toplevel/EJBDescriptorMBean;Lweblogic/utils/classloaders/GenericClassLoader V(MBeanDeploymentInfoImpl.java:550)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(Lweblogic/management/descriptors/toplevel/EJBDescriptorMBean;Lweblogic/utils/classloaders/GenericClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lweblogic/utils/jars/VirtualJarFile V(MBeanDeploymentInfoImpl.java:232)
at weblogic.ejb20.deployer.EJBDeployer.prepare(Lweblogic/utils/jars/VirtualJarFile;Ljava/lang/ClassLoader;Lweblogic/management/descriptors/toplevel/EJBDescriptorMBean;Ljavax/naming/Context;Ljava/util/Map V(EJBDeployer.java:1407)
at weblogic.ejb20.deployer.EJBModule.prepare(Ljava/lang/ClassLoader V(EJBModule.java:498)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(Lweblogic/utils/classloaders/GenericClassLoader;Lweblogic/j2ee/J2EEApplicationContainer$Component;Z)V(J2EEApplicationContainer.java:3149)
at weblogic.j2ee.J2EEApplicationContainer.prepareModules


///////////////////////////////////////////////////////////////////

I have open the jar file in winzip & the class has generated with proper path. Can anyone tell me what's wrong here in DD or code?
[ October 26, 2006: Message edited by: Prasanth Pillai ]
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. The META-INF dir in your jar should be at the top level in your jar, not in common/alertMgmt/mdb/ BEA's documentation on EJB directory layout

2. I'm confused when you say you put META-INF folder in your alert directory. Are you talking about META-INF with application.xml, but not same META-INF in your jar with the ejb-jar.xml and weblogic-ejb-jar.xml?

C:\bin>jar cvf mdb.jar
common/alertMgmt/mdb/AlertMDB.class
common/alertMgmt/mdb/META-INF/ejb-jar.xml
common/alertMgmt/mdb/META-INF/weblogic-ejb-jar.xml

Then I am placing the mdb.jar and META-INF folder under
bea\weblogic81\server\bin\applications\alert.
 
Pallavi Konapur
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

This post had been uploaded by my friend on my behalf. Now even I have registered in the site.


I have a MDB class. which is int he following path com.motorola.tpm.common.alertMgmt.mdb.AlertMDB and I have created a META-INF fodler with ejb-jar and weblogic-ejb-jar.xml. I have cretaed a jar using teh above files. The path info in the jar files is as follows.

AlertMDB.class com\motorola\tpm\common\alertMgmt\mdb
ejb-jar.xml meta-inf\
Manifest.mf meta-inf\
weblogic-ejb-jar.xml meta-inf\


I have placed the resulting alert.jar in bea\weblogic81\server\bin\applications. Through the console I am using EJB Deployments link to deploy the jar. and I am getting the above mentioned error.
 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You either specified the wrong class in your descriptors:

weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: common.alertMgmt.mdb.AlertMDB


or your class is in the wrong location in your JAR:

AlertMDB.class com\motorola\tpm\common\alertMgmt\mdb
ejb-jar.xml meta-inf\
Manifest.mf meta-inf\
weblogic-ejb-jar.xml meta-inf\
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic