Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > EJB
| Search | Today's Posts | Mark Forums Read
EJB Be sure to indicate the version you use.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the EJB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 18th, 2007, 05:28 AM
Registered User
 
Join Date: Jan 2007
Location: Hyderabad, AP, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to afroz_online777
Default EJB Deployment problem

hi all,

When iam trying to deply the jar file iam getting the following problems can any one help me out

Please see the below Error , iam also sending u the xml file


        at weblogic.kernel.ExecuteThread.run()V(ExecuteThread .java:178)
        at java.lang.Thread.startThreadFromVM(Ljava.lang.Thre ad;)V(Unknown Source)
--------------- nested within: ------------------
weblogic.management.ManagementException: - with nested exception:
[weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException : prepare failed for HelloBeanTest
        Module: HelloBeanTest Error: Exception preparing module: EJBModule(HelloBeanTest,status=NEW)


Unable to deploy EJB: .\myserver\stage\_appsdir_HelloBeanTest_jar\HelloB eanTest.jar from HelloBeanTest.
jar:

weblogic.ejb20.deployer.DeploymentDescriptorExcept ion: Unable to load a class specified in your ejb-jar
.xml: Class bytes found but defineClass()failed for: 'com.jwhitlock.ejb.HelloBean'
        at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.in itializeBeanInfos(Lweblogic.management.des
criptors.toplevel.EJBDescriptorMBean;Lweblogic.uti ls.classloaders.GenericClassLoader;)V(MBeanDeploym ent
InfoImpl.java:550)
        at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<i nit>(Lweblogic.management.descriptors.topl
evel.EJBDescriptorMBean;Lweblogic.utils.classloade rs.GenericClassLoader;Ljava.lang.String;Ljava.lang .St
ring;Ljava.lang.String;Lweblogic.utils.jars.Virtua lJarFile;)V(MBeanDeploymentInfoImpl.java:232)
        at weblogic.ejb20.deployer.EJBDeployer.prepare(Lweblo gic.utils.jars.VirtualJarFile;Ljava.lang.C
lassLoader;Lweblogic.management.descriptors.toplev el.EJBDescriptorMBean;Ljavax.naming.Context;Ljava. uti
l.Map;)V(EJBDeployer.java:1324)
        at weblogic.ejb20.deployer.EJBModule.prepare(Ljava.la ng.ClassLoader;)V(EJBModule.java:498)
        at weblogic.j2ee.J2EEApplicationContainer.prepareModu le(Lweblogic.utils.classloaders.GenericCla
ssLoader;Lweblogic.j2ee.J2EEApplicationContainer$C omponent;Z)V(J2EEApplicationContainer.java:3142)
        at weblogic.j2ee.J2EEApplicationContainer.prepareModu les([Lweblogic.j2ee.J2EEApplicationContain
er$Component;Ljava.lang.String;Z)V(J2EEApplication Container.java:1583)
        at weblogic.j2ee.J2EEApplicationContainer.prepare([Lweblogic.j2ee.J2EEApplicationContainer$Comp
onent;[Ljava.lang.String;Ljava.lang.String;Ljava.lang.Str ing;)V(J2EEApplicationContainer.java:1227)
        at weblogic.j2ee.J2EEApplicationContainer.prepare(Lja va.lang.String;[Lweblogic.management.confi
guration.ComponentMBean;[Ljava.lang.String;)V(J2EEApplicationContainer.java :1070)
        at weblogic.management.deploy.slave.SlaveDeployer$Com ponentActivateTask.prepareContainer()V(Sla
veDeployer.java:2513)
        at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.createContainer()Z(SlaveDeployer
.java:2463)
        at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.prepare()V(SlaveDeployer.java:23
79)
        at weblogic.management.deploy.slave.SlaveDeployer.pro cessPrepareTask(Lweblogic.management.deplo
y.OamVersion;Lweblogic.management.runtime.Deployme ntTaskRuntimeMBean;Z)V(SlaveDeployer.java:866)
        at weblogic.management.deploy.slave.SlaveDeployer.pre pareDelta(Lweblogic.management.deploy.OamD
elta;Lweblogic.management.deploy.OamVersion;ZLjava .lang.StringBuffer;)Z(SlaveDeployer.java:594)
        at weblogic.management.deploy.slave.SlaveDeployer.pre pareUpdate(Ljava.util.ArrayList;Z)V(SlaveD
eployer.java:508)
        at weblogic.drs.internal.SlaveCallbackHandler$1.execu te(Lweblogic.kernel.ExecuteThread;)V(Slave
CallbackHandler.java:25)
        at weblogic.kernel.ExecuteThread.execute(Lweblogic.ke rnel.ExecuteRequest;)V(ExecuteThread.java:
219)
        at weblogic.kernel.ExecuteThread.run()V(ExecuteThread .java:178)
        at java.lang.Thread.startThreadFromVM(Ljava.lang.Thre ad;)V(Unknown Source)



]
        at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.prepare()V(SlaveDeployer.java:23
96)
        at weblogic.management.deploy.slave.SlaveDeployer.pro cessPrepareTask(Lweblogic.management.deplo
y.OamVersion;Lweblogic.management.runtime.Deployme ntTaskRuntimeMBean;Z)V(SlaveDeployer.java:866)
        at weblogic.management.deploy.slave.SlaveDeployer.pre pareDelta(Lweblogic.management.deploy.OamD
elta;Lweblogic.management.deploy.OamVersion;ZLjava .lang.StringBuffer;)Z(SlaveDeployer.java:594)
        at weblogic.management.deploy.slave.SlaveDeployer.pre pareUpdate(Ljava.util.ArrayList;Z)V(SlaveD
eployer.java:508)
        at weblogic.drs.internal.SlaveCallbackHandler$1.execu te(Lweblogic.kernel.ExecuteThread;)V(Slave
CallbackHandler.java:25)
        at weblogic.kernel.ExecuteThread.execute(Lweblogic.ke rnel.ExecuteRequest;)V(ExecuteThread.java:
219)
        at weblogic.kernel.ExecuteThread.run()V(ExecuteThread .java:178)
        at java.lang.Thread.startThreadFromVM(Ljava.lang.Thre ad;)V(Unknown Source)
>


----xml.file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
    'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
  <enterprise-beans>
    <session>
      <ejb-name>Hello</ejb-name>
      <home>com.jwhitlock.ejb.HelloHome</home>
      <remote>com.jwhitlock.ejb.HelloObject</remote>
      <ejb-class>com.jwhitlock.ejb.HelloBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
    </session>
  </enterprise-beans>
  <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>Hello</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>


----ejb-jar

<?xml version="1.0" encoding="UTF-8"?>
<!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>Hello</ejb-name>
    <jndi-name>HelloEJB</jndi-name>
  </weblogic-enterprise-bean>
</weblogic-ejb-jar>

Thanks &amp; regards
 
Old April 20th, 2007, 01:43 PM
Authorized User
 
Join Date: Apr 2005
Location: , , India.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

The error message:

weblogic.ejb20.deployer.DeploymentDescriptorExcept ion: Unable to load a class specified in your ejb-jar
.xml: Class bytes found but defineClass()failed for: 'com.jwhitlock.ejb.HelloBean'

Suggests that it failed to instantiate your class from your class file. I would recommend a clean compilation again, package it and try deploying it again.

Let me know if that helps.

Regards,
eNJay




Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem while running EJB Q4Java EJB 2 June 12th, 2011 11:42 AM
EJB Deployment Errors Q4Java EJB 0 February 27th, 2008 01:30 AM
EJB problem g_svadla EJB 0 April 26th, 2007 03:48 PM
problem in deployment shupiR ASP.NET 1.0 and 1.1 Basics 0 December 22nd, 2005 01:45 AM
Problem with EJB(Session+Entity bean) hiparry_m J2EE 1 October 15th, 2004 01:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.