File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes EJB Deployment Issue - Unable to load a class specified in your ejb-jar.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "EJB Deployment Issue - Unable to load a class specified in your ejb-jar.xml" Watch "EJB Deployment Issue - Unable to load a class specified in your ejb-jar.xml" New topic
Author

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

Darren Witham
Greenhorn

Joined: Dec 21, 2004
Posts: 2
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

Joined: Jan 28, 2005
Posts: 1
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

Joined: Jan 23, 2011
Posts: 8
Hi Bhatnagar,

I am also getting the same prblm.Did you find any solution to this problem.?
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

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


Regards, Sud.
SCJP 5 ScjpFAQ JLS
 
GeeCON Prague 2014
 
subject: EJB Deployment Issue - Unable to load a class specified in your ejb-jar.xml