2

我的项目配置我的 Jboss-Deployment-Structure.xml

<deployment>
    <dependencies>
        <module name="by.mobile.lib" meta-inf="export" export="true"/>
    </dependencies>
    <exclusions>
        <module name="com.fasterxml.jackson.core.jackson-databind"/>
        <module name="com.fasterxml.jackson.core.jackson-core"/>
        <module name="com.fasterxml.jackson.core.jackson-annotations"/>
        <module name="org.jboss.resteasy.resteasy-jackson-provider"/>
        <module name="org.jboss.resteasy.resteasy-jackson2-provider"/>
    </exclusions>
    <exclude-subsystems>
        <subsystem name="logging"/>
    </exclude-subsystems>
</deployment>

我的 module.xml

  <?xml version="1.0" encoding="UTF-8" ?> 
 <module xmlns="urn:jboss:module:1.3" name="by.mobile.lib">
 <resources>
  <resource-root path="apache-any23-api-1.1.jar" /> 
  <resource-root path="apache-any23-encoding-1.1.jar" /> 
  <resource-root path="commons-beanutils-1.9.3.jar" /> 
  <resource-root path="commons-codec-1.10.0.redhat-5.jar" /> 
  <resource-root path="commons-collections-3.2.2.jar" /> 
  <resource-root path="commons-digester-2.1.jar" /> 
  <resource-root path="commons-lang-2.3.jar" /> 
  <resource-root path="commons-lang3-3.5.jar" /> 
  <resource-root path="commons-logging-1.1.1.jar" /> 
  <resource-root path="gson-2.8.0.jar" /> 
  <resource-root path="jackson-annotations-2.8.6.jar" /> 
  <resource-root path="jackson-core-2.8.6.jar" /> 
  <resource-root path="jackson-databind-2.8.6.jar" /> 
  <resource-root path="jackson-module-jaxb-annotations-2.8.6.jar" /> 
  <resource-root path="jasperreports-6.4.0.jar" /> 
  <resource-root path="jasperreports-fonts-6.0.0.jar" /> 
  <resource-root path="joda-time-2.9.6.jar" /> 
  <resource-root path="json-simple-1.1.jar" /> 
  <resource-root path="log4j-1.2.17.jar" /> 
  <resource-root path="ojdbc6-11.2.0.4.jar" /> 
  <resource-root path="opencsv-3.8.jar" /> 
  <resource-root path="primefaces-6.0.jar" /> 
  <resource-root path="slf4j-api-1.7.22.jar" /> 
  <resource-root path="slf4j-log4j12-1.7.22.jar" /> 
  <resource-root path="tika-parsers-1.4.jar" /> 
  <resource-root path="unitils-core-3.4.3.jar" /> 
  <resource-root path="xercesImpl-2.8.1.jar" /> 
  </resources>
 <dependencies>
  <module name="javax.faces.api" /> 
  <module name="javax.api" /> 
  </dependencies>
  </module>

我的 pom.xml

<jackson-module-jaxb-annotations.version>2.8.6</jackson-module-jaxb-annotations.version>
<jackson-databind.version>2.8.6</jackson-databind.version>
<jackson-core.version>2.8.6</jackson-core.version>
<jackson-annotations.version>2.8.6</jackson-annotations.version>

所有范围 - 提供

在 Wildfly10 上部署时出现错误

18:15:07,217 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 65) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    by/services/rest/provider/ConfiguredRESTProvider.<init>()V @40: invokestatic
  Reason:
    Type 'com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector' (current frame, stack[1]) is not assignable to 'com/fasterxml/jackson/databind/AnnotationIntrospector'
  Current Frame:
    bci: @40
    flags: { }
    locals: { 'by/services/rest/provider/ConfiguredRESTProvider', 'com/fasterxml/jackson/databind/introspect/JacksonAnnotationIntrospector', 'com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector' }
    stack: { 'com/fasterxml/jackson/databind/introspect/JacksonAnnotationIntrospector', 'com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector' }
  Bytecode:
    0x0000000: 2ab7 0001 2abb 0002 59b7 0003 b500 04bb
    0x0000010: 0005 59b7 0006 4cbb 0007 592a b400 04b6
    0x0000020: 0008 b700 094d 2b2c b800 0a4e 2ab4 0004
    0x0000030: 2db6 000b 572a b400 04b2 000c 04b6 000d
    0x0000040: 572a b400 04b2 000e 04b6 000d 572a b400
    0x0000050: 04b2 000f 04b6 0010 572a b400 04b2 0011
    0x0000060: 03b6 0012 572a b400 04b2 0013 b600 1457
    0x0000070: b1                                     

    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    by/services/rest/provider/ConfiguredRESTProvider.<init>()V @40: invokestatic
  Reason:
    Type 'com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector' (current frame, stack[1]) is not assignable to 'com/fasterxml/jackson/databind/AnnotationIntrospector'
  Current Frame:
    bci: @40
    flags: { }
    locals: { 'by/services/rest/provider/ConfiguredRESTProvider', 'com/fasterxml/jackson/databind/introspect/JacksonAnnotationIntrospector', 'com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector' }
    stack: { 'com/fasterxml/jackson/databind/introspect/JacksonAnnotationIntrospector', 'com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector' }
  Bytecode:
    0x0000000: 2ab7 0001 2abb 0002 59b7 0003 b500 04bb
    0x0000010: 0005 59b7 0006 4cbb 0007 592a b400 04b6
    0x0000020: 0008 b700 094d 2b2c b800 0a4e 2ab4 0004
    0x0000030: 2db6 000b 572a b400 04b2 000c 04b6 000d
    0x0000040: 572a b400 04b2 000e 04b6 000d 572a b400
    0x0000050: 04b2 000f 04b6 0010 572a b400 04b2 0011
    0x0000060: 03b6 0012 572a b400 04b2 0013 b600 1457
    0x0000070: b1                                     

    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
    at java.lang.Class.getConstructors(Class.java:1651)
    at org.jboss.resteasy.util.PickConstructor.pickSingletonConstructor(PickConstructor.java:30)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.createConstructorInjector(ResteasyProviderFactory.java:2252)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2244)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.addContextResolver(ResteasyProviderFactory.java:1130)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1667)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1368)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1290)
    at org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:571)
    at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:347)
    at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:250)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
    at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
    at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
    at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
    at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)
    at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)
    at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:546)
    at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:517)
    at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
    at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:559)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
    ... 6 more

错误在哪里?

我能够在范围 - 编译时运行,但我想使用范围 - 编译

4

0 回答 0