• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to deploy my EJB application  RSS feed

 
Nirmal Mukundan
Ranch Hand
Posts: 37
Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am a beginner to EJB and I have tried to deploy my EJB application in Weblogic 10. But when i give the activate changes it gives me the following error:

Unable to deploy EJB: E:\My Programs\MyProjects\EJB\Stateful\jars\Shop.jar from Shop.jar:

Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.ejb.stateful.ShopEJ
B'

'
weblogic.application.ModuleException: Exception preparing module: EJBModule(Shop)


Unable to deploy EJB: E:\My Programs\MyProjects\EJB\Stateful\jars\Shop.jar from Shop.jar:

Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.ejb.stateful.ShopEJ
B'


at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:399)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
Truncated. see log file for complete stacktrace
weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class by
tes found but defineClass()failed for: 'com.ejb.stateful.ShopEJB'
at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:501)
at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:224)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1186)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
Truncated. see log file for complete stacktrace
>
<Jul 21, 2010 5:14:28 AM GMT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating distribute task for
application 'ShopEJB2'.>
<Jul 21, 2010 5:14:28 AM GMT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Exception preparing module: EJBModule(Shop)


Unable to deploy EJB: E:\My Programs\MyProjects\EJB\Stateful\jars\Shop.jar from Shop.jar:

Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.ejb.stateful.ShopEJ
B'


at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:399)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
Truncated. see log file for complete stacktrace
weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class by
tes found but defineClass()failed for: 'com.ejb.stateful.ShopEJB'
at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:501)
at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:224)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1186)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
Truncated. see log file for complete stacktrace
>
<Jul 21, 2010 5:14:28 AM GMT> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.application.Mo
duleException: Exception preparing module: EJBModule(Shop)


Unable to deploy EJB: E:\My Programs\MyProjects\EJB\Stateful\jars\Shop.jar from Shop.jar:

Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.ejb.stateful.ShopEJ
B'


at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:399)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.jav
a:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentRece
iverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCal
lbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallback
Deliverer.java:45)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.lang.Throwable: Substituted for the exception weblogic.ejb.container.deployer.DeploymentDescriptorException w
hich lacks a String contructor, original message - Unable to load a class specified in your ejb-jar.xml: Class bytes found bu
t defineClass()failed for: 'com.ejb.stateful.ShopEJB'
at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:501)
at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:224)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1186)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
>




I installed the jar file as an application and not as a library. I have attached the DD along with the request. Could some one help me with this.
The name while I gave for deployment is ShopEJB2.


ejb-jar.xml
==========================

<?xml version="1.0"?>

<!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>statefulSession</ejb-name>
<home>com.ejb.stateful.ShopHome</home>
<remote>com.ejb.stateful.ShopCart</remote>
<ejb-class>com.ejb.stateful.ShopEJB</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>statefulSession</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
=========================================


weblogic-ejb-jar.xml
========================
<?xml version="1.0"?>

<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN'
'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>statefulSession</ejb-name>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>ShopEJB2</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
==================================================

Thanks






 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!