2014-10-28 87 views
1

我試圖將我的REST客戶端寫入Jersey 2.13WildFly 8.1應用程序服務器。我知道WF8有自己的REST客戶端實現(RestEasy)。它接近WF8不會讓澤西活着。它攔截澤西島並取代自己的班級。在WildFly 8.1上運行Jersey2 REST客戶端時出現問題

這裏是我的異常日誌:

java.lang.LinkageError: org/glassfish/jersey/media/multipart/internal/FormDataParamValueFactoryProvider 
org.glassfish.jersey.media.multipart.internal.FormDataParameterInjectionFeature.configure(FormDataParameterInjectionFeature.java:77) 
org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1673) 
org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1310) 
org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1232) 
org.jboss.resteasy.spi.ResteasyProviderFactory.register(ResteasyProviderFactory.java:2364) 
org.jboss.resteasy.spi.ResteasyProviderFactory.register(ResteasyProviderFactory.java:97) 
org.jboss.resteasy.util.FeatureContextDelegate.register(FeatureContextDelegate.java:37) 
org.jboss.resteasy.util.FeatureContextDelegate.register(FeatureContextDelegate.java:12) 
org.glassfish.jersey.media.multipart.MultiPartFeature.configure(MultiPartFeature.java:64) 
org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1673) 
org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1310) 
org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1232) 
org.jboss.resteasy.spi.ResteasyProviderFactory.register(ResteasyProviderFactory.java:2364) 
org.jboss.resteasy.client.jaxrs.internal.ClientConfiguration.register(ClientConfiguration.java:168) 
org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.register(ClientWebTarget.java:351) 
org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.register(ClientWebTarget.java:23) 
com.jaspersoft.jasperserver.jaxrs.client.core.JerseyRequest.<init>(JerseyRequest.java:104) 
com.jaspersoft.jasperserver.jaxrs.client.core.JerseyRequest.buildRequest(JerseyRequest.java:62) 
com.jaspersoft.jasperserver.jaxrs.client.core.JerseyRequest.buildRequest(JerseyRequest.java:55) 
com.jaspersoft.jasperserver.jaxrs.client.apiadapters.serverInfo.ServerInfoService.buildServerInfoRequest(ServerInfoService.java:44) 
com.jaspersoft.jasperserver.jaxrs.client.apiadapters.serverInfo.ServerInfoService.edition(ServerInfoService.java:51) 
il.alex.jboss.example.MainServlet.doGet(MainServlet.java:26) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:687) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) 
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) 
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) 
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) 
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) 
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) 
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) 
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) 
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) 
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) 
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) 
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) 
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) 
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) 
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) 
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) 
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) 
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) 
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) 
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) 
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) 
io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) 
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 

是否有任何解決方案來解決這個問題?

UPDATE

jboss-deployment-structure文件的修改:

<?xml version="1.0" encoding="UTF-8"?> 
<jboss-deployment-structure> 
    <deployment> 
     <exclude-subsystems> 
      <subsystem name="resteasy" xmlns="urn:jboss:domain:jaxrs:1.0"/> 
     </exclude-subsystems> 
    </deployment> 
</jboss-deployment-structure> 

2014-10-28 05:20:14,308] Artifact jboss-another-example:war exploded: Artifact is being deployed, please wait... 
[0m17:20:14,570 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "jboss_another_example_war_exploded.war" (runtime-name: "jboss_another_example_war_exploded.war") 
[0m[31m17:20:15,571 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."jboss_another_example_war_exploded.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss_another_example_war_exploded.war".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "jboss_another_example_war_exploded.war" 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40-ea] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40-ea] 
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40-ea] 
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018748: Error loading jboss-deployment-structure.xml from /Users/alex/IdeaProjects/jboss-another-example/out/artifacts/jboss_another_example_war_exploded.war/WEB-INF/jboss-deployment-structure.xml 
    at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:322) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:294) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.deploy(DeploymentStructureDescriptorParser.java:158) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    ... 5 more 
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[5,13] 
Message: JBAS018754: Unexpected content of type 'element start', name is '{urn:jboss:domain:jaxrs:1.0}subsystem', text is: 'null' 
    at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.unexpectedContent(JBossDeploymentStructureParser12.java:1194) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseExcludeSubsystem(JBossDeploymentStructureParser12.java:1100) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseModuleStructureSpec(JBossDeploymentStructureParser12.java:366) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseDeployment(JBossDeploymentStructureParser12.java:267) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.readElement(JBossDeploymentStructureParser12.java:244) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.readElement(JBossDeploymentStructureParser12.java:69) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) 
    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) 
    at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:316) [wildfly-server-8.1.0.Final.jar:8.1.0.Final] 
    ... 8 more 

[0m[31m17:20:15,578 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "jboss_another_example_war_exploded.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jboss_another_example_war_exploded.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jboss_another_example_war_exploded.war\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"jboss_another_example_war_exploded.war\" 
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018748: Error loading jboss-deployment-structure.xml from /Users/alex/IdeaProjects/jboss-another-example/out/artifacts/jboss_another_example_war_exploded.war/WEB-INF/jboss-deployment-structure.xml 
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[5,13] 
Message: JBAS018754: Unexpected content of type 'element start', name is '{urn:jboss:domain:jaxrs:1.0}subsystem', text is: 'null'"}} 
[0m[31m17:20:15,582 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "jboss_another_example_war_exploded.war" was rolled back with the following failure message: 
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jboss_another_example_war_exploded.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jboss_another_example_war_exploded.war\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"jboss_another_example_war_exploded.war\" 
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018748: Error loading jboss-deployment-structure.xml from /Users/alex/IdeaProjects/jboss-another-example/out/artifacts/jboss_another_example_war_exploded.war/WEB-INF/jboss-deployment-structure.xml 
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[5,13] 
Message: JBAS018754: Unexpected content of type 'element start', name is '{urn:jboss:domain:jaxrs:1.0}subsystem', text is: 'null'"}} 
[0m[0m17:20:15,586 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment jboss_another_example_war_exploded.war (runtime-name: jboss_another_example_war_exploded.war) in 4ms 
[0m[0m17:20:15,589 INFO [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report 
JBAS014777: Services which failed to start:  service jboss.deployment.unit."jboss_another_example_war_exploded.war".STRUCTURE 

[0m[2014-10-28 05:20:15,667] Artifact jboss-another-example:war exploded: Error during artifact deployment. See server log for details. 
[2014-10-28 05:20:15,669] Artifact jboss-another-example:war exploded: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jboss_another_example_war_exploded.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jboss_another_example_war_exploded.war\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"jboss_another_example_war_exploded.war\" 
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018748: Error loading jboss-deployment-structure.xml from /Users/alex/IdeaProjects/jboss-another-example/out/artifacts/jboss_another_example_war_exploded.war/WEB-INF/jboss-deployment-structure.xml 
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[5,13] 
Message: JBAS018754: Unexpected content of type 'element start', name is '{urn:jboss:domain:jaxrs:1.0}subsystem', text is: 'null'"}} 

回答

0

不知道是否會工作,但儘量評論

<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/> 

來自您的野蠻配置文件。

如果您wildfly在獨立模式下編輯它standalone.xml運行 否則domain.xml中

+0

它不工作。查看更新。 – Alex 2014-10-28 15:22:23

+0

我們看到的新錯誤就像更多的xml驗證錯誤一樣。經過這個https://github.com/javaee-samples/javaee7-samples/issues/93看起來像你有麻煩:) – jitsonfire 2014-10-28 15:48:13

+0

哦,我現在看到:( – Alex 2014-10-28 16:21:40

相關問題