Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Darren Witham
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
SamratSubroto Bhatnagar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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>
 
Ouney Gags
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bhatnagar,

I am also getting the same prblm.Did you find any solution to this problem.?
 
sudipto shekhar
Ranch Hand
Posts: 826
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic