問題:我有一個使用Intellij IDEA開發的Glassfish上運行的JAX-RS Web應用程序。 服務器工作正常,直到我添加了對Enunciate的支持。當我添加「闡明:docs enunciate:彙集」Maven目標在Make和Deploy Artifact步驟之前運行時,所有地獄都會崩潰。在每次重新部署時,我都會遇到以下錯誤。即使刪除了闡述maven的目標,我仍然得到它們...NoClassDefFoundError:com/sun/jersey/spi/spring/container/SpringComponentProviderFactory
問題:究竟是什麼原因造成這種情況,因爲我甚至不使用Spring(SpringComponentProviderFactory)?
編輯:這仍然沒有修復。任何其他想法?
Artifact project:war exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Ref<ContainerRequest>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject org.glassfish.jersey.server.internal.routing.UriRoutingContext(Ref<ContainerRequest>, ProcessingProviders)]. Please see server.log for more details.
同時,在服務器日誌中我得到:
[2014-04-15T20:31:29.252+0300] [glassfish 4.0] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583089252] [levelValue: 900] [[
Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: com/sun/jersey/spi/spring/container/SpringComponentProviderFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1183)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1728)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)
at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:585)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338)
at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91)
at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420)
at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:198)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:878)
[2014-04-15T20:31:30.214+0300] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583090214] [levelValue: 900] [[
The web application [unknown] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.]]
[2014-04-15T20:31:30.215+0300] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583090215] [levelValue: 900] [[
The web application [unknown] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.]]
[2014-04-15T20:31:31.947+0300] [glassfish 4.0] [WARNING] [] [org.glassfish.weld.BeanDeploymentArchiveImpl] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583091947] [levelValue: 900] [[
AS-CDI-005]]
[2014-04-15T20:31:36.583+0300] [glassfish 4.0] [WARNING] [] [org.jboss.weld.interceptor.util.InterceptionTypeRegistry] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583096583] [levelValue: 900] [[
Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled]]
[2014-04-15T20:31:36.584+0300] [glassfish 4.0] [WARNING] [] [org.jboss.weld.interceptor.util.InterceptionTypeRegistry] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583096584] [levelValue: 900] [[
Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled]]
[2014-04-15T20:31:37.341+0300] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583097341] [levelValue: 1000] [[
Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Ref<ContainerRequest>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject org.glassfish.jersey.server.internal.routing.UriRoutingContext(Ref<ContainerRequest>, ProcessingProviders)]
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:225)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
我有同樣的問題。我增加了'提供的 ',讓Maven認爲它提供了,然後刪除它,這樣它會下載我的依賴項。 –
taco