aspose file tools*
The moose likes BEA/Weblogic and the fly likes Error while deploying jar in Weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Error while deploying jar in Weblogic" Watch "Error while deploying jar in Weblogic" New topic
Author

Error while deploying jar in Weblogic

Prasanth Pillai
Ranch Hand

Joined: Oct 16, 2006
Posts: 52
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

Joined: Oct 10, 2000
Posts: 1364
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

Joined: Oct 31, 2006
Posts: 1
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.


Pallavi Konapur
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8997
    
    9

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\


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while deploying jar in Weblogic