• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB Deployment Issue - Unable to load a class specified in your ejb-jar.xml

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have seen people having similar issues but cannot find a suggested solution. I have a simple EAR that contains an ejb module. When I either attempt to deploy the EAR or the ejb module directly I get an error along the lines of :

Unable to deploy EJB: C:\build\Prototype\Prototype-ejb.jar from Prototype-ejb.jar: weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.oct.ejb.prototype.PrototypeEJB'

The Protoype-ejb.jar file contains a single stateless session bean with corresponding home/remotes etc along with all the necessary stubs that have been generated from an ANT build file using <ejbjar> (using the weblogic nested element).

Everything appears to be present and correct in the jar i.e the PrototypeEJB class is there and under the correct package structure.

Any pointers gratefully received - thx
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i just registered myself with this forum 2mins back.I have the same problem and that is why i joined this forum to search an answer for the same question.I dont say that i have the solution but i would say that i have some comment on this problem which i saw from other websites

Solution:The DTD used by ejb-jar.xml should be changed.Want to know what i am talking abt see below

ejb-jar.xml

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>Hello</ejb-name>
<home>examples.HelloHome</home>
<remote>examples.Hello</remote>
<local-home>examples.HelloLocalHome</local-home>
<local>examples.HelloLocal</local>
<ejb-class>examples.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bhatnagar,

I am also getting the same prblm.Did you find any solution to this problem.?
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Here are a few debug flags which might help you getting a better idea of the issue at hand.

Apply the following in the server startup scripts, bump up the server and monitor the logs to find out more details.

DebugDeploy
DebugDeployment
DebugDeploymentService
DebugDeploymentServiceInternal

DebugEjbDeployment
DebugEjbInvoke

Hope this helps you both.

Cheers!!

[EDIT]

And Welcome To Javaranch Mr. Bhatnagar
 
reply
    Bookmark Topic Watch Topic
  • New Topic