java.lang.NoClassDefFoundError при развертывании войны на GlassFish / Payara - PullRequest
0 голосов
/ 27 декабря 2018
Info:   WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
            WARN:   WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType<?>) used for class org.glassfish.jersey.ext.cdi1x.servlet.internal.CdiExternalRequestScope is deprecated from CDI 1.1!
            WARN:   WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType<?>) used for class org.glassfish.jersey.ext.cdi1x.transaction.internal.WebAppExceptionHolder is deprecated from CDI 1.1!
            WARN:   WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType<?>) used for class org.glassfish.jersey.ext.cdi1x.transaction.internal.WebAppExceptionInterceptor is deprecated from CDI 1.1!
            WARN:   WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType<?>) used for class org.glassfish.jersey.ext.cdi1x.transaction.internal.TransactionalExceptionMapper is deprecated from CDI 1.1!
            WARN:   WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType<?>) used for class org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider$JaxRsParamProducer is deprecated from CDI 1.1!
            Severe:   Error invoking ServletContainerInitializer org.jboss.weld.environment.servlet.EnhancedListener
            java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManager
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1093)
                at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1624)
                at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1505)
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1093)
                at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1624)
                at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1505)
                at org.jboss.weld.environment.tomcat.TomcatContainer.initialize(TomcatContainer.java:43)
                at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:213)
                at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:62)
                at org.apache.catalina.core.StandardContext.callServletContainerInitializers(StandardContext.java:5825)
                at com.sun.enterprise.web.WebModule.callServletContainerInitializers(WebModule.java:737)
                at org.apache.catalina.core.StandardContext.start(StandardContext.java:5722)
                at com.sun.enterprise.web.WebModule.start(WebModule.java:618)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:956)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:939)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:684)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2105)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1750)
                at com.sun.enterprise.web.WebApplication.start(WebApplication.java:107)
                at org.glassfish.internal.data.EngineRef.start(EngineRef.java:123)
                at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:294)
                at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:357)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.initialize(ApplicationLifecycle.java:541)
                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:542)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:549)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:545)
                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:544)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:575)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:567)
                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:566)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1475)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1857)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1733)
                at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:564)
                at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:251)
                at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:166)
                at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:516)
                at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:213)
                at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
                at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
                at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
                at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
                at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
                at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
                at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
                at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
                at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
                at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
                at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
                at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
                at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
                at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
                at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
                at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
                at java.lang.Thread.run(Thread.java:748)
            Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager
    I'm
                at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1659)
                at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1505)
                ... 66 more

            Severe:   Startup of context /nrd failed due to previous errors
            Severe:   Exception during cleanup after start failed

Я пытаюсь развернуть войну на веб-сервере payara5 / glassfish.Приложение запускается с tomcat, но выдает ошибку выше, когда я пытаюсь развернуть файл war.Проект Clean Build не помогает.Зачем мне включать в проект банку, содержащую класс Tomcat Instance Manager, при ее развертывании на Glassfish?Какую банку я должен включить в проект?Спасибо

1 Ответ

0 голосов
/ 27 декабря 2018

Ну из StackTrace, вы используете Weld с Tomcat.Использование Weld в Tomcat требует конфигурации для интеграции Weld и Tomcat.Однако такая интеграция больше не требуется при переходе на GlassFish / Payara, поскольку они уже поддерживают Weld "из коробки".

Итак, я думаю, вам нужно сначала удалить все настройки, связанные с интеграцией Tomcat и Weld.Я советую вам сначала удалить все упомянутые конфигурации здесь .

...