Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

java.lang.NoClassDefFoundError while deployment to glassfish 5

Mariam_KemoAug 29 2019 — edited Aug 29 2019

Hello

I have an application created with jDev 12.2.1.0 , and glassfish 5

when i deploy through the Connection between glassfish and Jdeveloper everything is fine and working properly after deployment .

but when I go to create EAR file as the following steps which mentioned at https://docs.oracle.com/middleware/1221/adf/develop/GUID-482FD8E7-1AB7-4231-8FAB-5805BA1FBDD8.htm#ADFFD23838 :

   In the Applications window, right-click the application and choose New and then From Gallery.

    You will create an EAR profile for the application.

    In the New Gallery, expand General, select Deployment Profiles and then EAR File, and click OK.

    If you don't see Deployment Profiles in the Categories tree, click the All Features tab.

    In the Create Deployment Profile -- EAR File dialog, enter a name for the application deployment profile and click OK.

    In the Edit EAR Deployment Profile Properties dialog, choose items in the left pane to open dialog pages in the right pane. Configure the profile by setting property values in the pages of the dialog.

        Select File Groups > Application Descriptors > Filters and deselect weblogic-application.xml.

        Select Application Assembly and then in the Java EE Modules list, select all the project profiles that you want to include in the deployment, including any WAR profiles.

        Select Platform, select the application server you are deploying to, and then select the target application connection from the Target Connection dropdown list. For GlassFish, select GlassFish 3.1.

    Click OK again to exit the Edit EAR Deployment Profile Properties dialog.

    Click OK again to exit the Application Properties dialog.

I got this exception in glassfish log:

[2019-08-29T23:56:25.051+0200] [glassfish 5.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1567115785051] [levelValue: 1000] [[

  Exception during lifecycle processing

java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: oracle/adf/controller/v2/lifecycle/PagePhaseListener

    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:136)

    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)

    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)

    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)

    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)

    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)

    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:536)

    at java.security.AccessController.doPrivileged(Native Method)

    at javax.security.auth.Subject.doAs(Subject.java:360)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:535)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:566)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:558)

    at java.security.AccessController.doPrivileged(Native Method)

    at javax.security.auth.Subject.doAs(Subject.java:360)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:557)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1465)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:110)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1847)

    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1723)

    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:254)

    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:232)

    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:276)

    at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:134)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:497)

    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)

    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$$Lambda$170/1266107986.invoke(Unknown Source)

    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)

    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)

    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)

    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)

    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)

    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)

    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)

    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:316)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:298)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:268)

    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)

    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)

    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)

    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:377)

    at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)

    at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)

    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:463)

    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:168)

    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)

    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)

    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:242)

    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)

    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)

    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)

    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)

    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)

    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)

    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)

    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)

    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)

    at java.lang.Thread.run(Thread.java:745)

]]

[2019-08-29T23:56:25.052+0200] [glassfish 5.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1567115785052] [levelValue: 1000] [[

  Exception while loading the app]]

[2019-08-29T23:56:25.052+0200] [glassfish 5.0] [SEVERE] [AS-WEB-GLUE-00192] [javax.enterprise.web] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1567115785052] [levelValue: 1000] [[

  Undeployment failed for context /quick]]

[2019-08-29T23:56:25.052+0200] [glassfish 5.0] [SEVERE] [AS-WEB-GLUE-00192] [javax.enterprise.web] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1567115785052] [levelValue: 1000] [[

  Undeployment failed for context /quickApps]]

[2019-08-29T23:56:25.093+0200] [glassfish 5.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1567115785093] [levelValue: 1000] [[

  Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: oracle/adf/controller/v2/lifecycle/PagePhaseListener]]

[2019-08-29T23:56:31.266+0200] [glassfish 5.0] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=142 _ThreadName=admin-listener(7)] [timeMillis: 1567115791266] [levelValue: 800] [[

  Exception Occurred :Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: oracle/adf/controller/v2/lifecycle/PagePhaseListener. Please see server.log for more details.      ]]

Regards

Comments

Post Details

Added on Aug 29 2019
1 comment
836 views