Forum Stats

  • 3,734,027 Users
  • 2,246,861 Discussions
  • 7,857,001 Comments

Discussions

NoClassDefFoundError when attempting to debug in Eclipse but packaged EAR file deploy without issue

user651019
user651019 Member Posts: 2 Blue Ribbon

Hi, just inherited something and it seems like I have no issue with the "compilation" within Eclipse, as well as deploying the exported EAR file directly to WebLogic. However, when I attempted to deploy the EAR project to within Eclipse, it errored out with the following error. I tends to suspect there are some dependencies issue but again, since it complies without issue within eclipse, it is giving other signals... Any clue for me?

some additional points, ABC.jar is the product of another project within the same Eclipse workspace which gets build and I have already added that into the "EAR module assembly".

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Module named 'XYZ' failed to deploy. See Error Log view for more detail.

weblogic.application.ModuleException: Exception preparing module: EJBModule(ABC.jar)

Unable to deploy EJB: ABC.jar from ABC.jar:

There are 1 nested errors:

java.lang.NoClassDefFoundError: Class not found: Lxx/yy/zz/MessagePublisher;

at weblogic.ejb.container.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:340)

at weblogic.ejb.container.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:280)

at weblogic.ejb.container.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:789)

at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:222)

at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:461)

at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:428)

at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:437)

at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:795)

at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:683)

at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1254)

at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:442)

at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)

at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)

at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)

at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)

at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)

at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)

at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:59)

at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)

at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)

at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)

at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)

at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:221)

at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)

at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)

at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)

at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)

at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)

at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)

at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)

at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Tagged:

Answers

  • dvohra21
    dvohra21 Member Posts: 14,167 Gold Crown

    As indicated by error message a class is not found. Add the jar with the class to the runtime path of WebLogic.

    java.lang.NoClassDefFoundError: Class not found: Lxx/yy/zz/MessagePublisher;
    
  • user651019
    user651019 Member Posts: 2 Blue Ribbon

    @dvohra21, that would be what we would do as well if it is a 3rd party JAR. However, that JAR in question is actually part of the working set (see sample below) where it is in the "Utilities" project, and will be used by the rest of the EJB/WAR projects.

    We could of course export the JAR file from the Utilities project and put it into the APP-INF/lib folder under the EAR project but that is kind of counter productive since the Utilities project will need to be recompiled/exported for every tiny changes done.

    The tricky thing is that I do have other projects where it works perfect where any change to the "utilities" project will get picked up automatically.

  • dvohra21
    dvohra21 Member Posts: 14,167 Gold Crown

    I do have other projects where it works perfect where any change to the "utilities" project will get picked up automatically.


    What is different about the other projects as compared to the project that generates error message? Should identify the issue.

Sign In or Register to comment.