Error while using Dependent Objects

Discussions

EJB programming & troubleshooting: Error while using Dependent Objects

  1. Error while using Dependent Objects (1 messages)

    Hi ,

    while deployig a bean which is using a dependent class i get error.

     <EJB> Could not deploy: 'C:/weblogic/myserver/processpayment1.jar': file is not a valid jar file, or does not
     contain a valid bean

    weblogic.ejb.common.DeploymentException: DeploymentException opening JAR file C:\weblogic\myserver\processpayment1.jar; nested exception is:
    weblogic.ejb.deployment.JarLoadException - with nested exception:
    [weblogic.ejb.common.DeploymentException: Problem creating deployment C:/weblogic/myserver/processpayment1.jar from C:\weblogic\myserver\processpayment1.jar; nested exception is:
    java.lang.NoClassDefFoundError: com/titan/processpayment/CreditCard]
    weblogic.ejb.common.DeploymentException: Problem creating deployment C:/weblogic/myserver/processpayment1.jar from C:\weblogic\myserver\processpayment1.jar; nested exception is:
    java.lang.NoClassDefFoundError: com/titan/processpayment/CreditCard
    java.lang.NoClassDefFoundError: com/titan/processpayment/CreditCard
    at java.lang.Class.getMethods0(Native Method)
    at java.lang.Class.getMethods(Class.java:718)
    at weblogic.ejb.deployment.dd.DeploymentUnit.initializeMethodInfos(DeploymentUnit.java, Compiled Code)
    at weblogic.ejb.internal.EJBJarLoader.initializeMethodInfos(EJBJarLoader.java:126)
    at weblogic.ejb.internal.EJBJarDeployment.setupJar(EJBJarDeployment.java, Compiled Code)
    at weblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:211)
    at weblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:182)
    at weblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:164)
    at weblogic.ejb.internal.EJBDeploymentImpl.<init>(EJBDeploymentImpl.java:172)
    at weblogic.ejb.internal.EJBJarDeployment.<init>(EJBJarDeployment.java:122)
    at weblogic.ejb.internal.EJBJarDeployment.<init>(EJBJarDeployment.java:112)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:305)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java, Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    at weblogic.NTServiceHelper.run(NTServiceHelper.java:19)
    at java.lang.Thread.run(Thread.java:479)
    --------------- nested within: ------------------
    weblogic.ejb.deployment.JarLoadException - with nested exception:
    [weblogic.ejb.common.DeploymentException: Problem creating deployment C:/weblogic/myserver/processpayment1.jar from C:\weblogic\myserver\processpayment1.jar; nested exception is:
    java.lang.NoClassDefFoundError: com/titan/processpayment/CreditCard]
    at weblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:313)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java, Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    at weblogic.NTServiceHelper.run(NTServiceHelper.java:19)
    at java.lang.Thread.run(Thread.java:479)

    Even though in the Jar i can see the dependent class...Any help wld be appreciated ..

    Thanks in advance
    Rinku




  2. hi rinku
    dependent objects should be put in the <weblogic home>\classes folder
    still u have problem let me know