Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Error while deploying jar in Weblogic

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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\

 
See where your hand is? Not there. It's next to this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic