Wildfly 8.1 and resteasy-multipart-provider ( maven project )
inkimannen Feb 19, 2015 1:12 PMHello,
Porting my application from Glassfish to Wildfly 8.1.
Environment is :
- Apache Maven 3.0.5
- Maven home: /usr/share/maven
- Java version: 1.7.0_75, vendor: Oracle Corporation
- Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
- Default locale: en_US, platform encoding: UTF-8
- OS name: "linux", version: "3.13.0-45-generic", arch: "amd64", family: "unix"
On Glassfish I have these dependencies:
GF1 - GF15
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxb-provider</artifactId>
- <version>3.0.6.Final</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-multipart-provider</artifactId>
- <version>2.3.1.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jackson-provider</artifactId>
- <version>3.0.5.Final</version>
- </dependency>
And I able to upload a stream using the following class
org.jboss.resteasy.annotations.providers.multipart.PartType;
@FormParam("selectedFile")
@PartType("application/octet-stream")
private byte[] fileData;
When Adding my dependencies when running in wildfly I use the following :
Wild1-Wild19
- <dependency>
- <groupId>org.jboss.spec.javax.ejb</groupId>
- <artifactId>jboss-ejb-api_3.2_spec</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- Import the JSON API to build JSON Objects -->
- <dependency>
- <groupId>org.jboss.spec.javax.json</groupId>
- <artifactId>jboss-json-api_1.0_spec</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- Import the JAX-RS API, we use provided scope as the API is included in JBoss WildFly -->
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>jaxrs-api</artifactId>
- <scope>provided</scope>
- </dependency>
The above is working ( <scope>provided</scope> ) and I able to upload data and retrieve data from the database:
Wildfly seems to be able to scan its 'modules' and everything works fine.
But When I add GF6-GF10 I am getting the following Exception.
- org.jboss.resteasy.core.AsynchronousDispatcher
providing the GF6-GF10 in this fashion does not help either
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-multipart-provider</artifactId>
- <scope>provided</scope>
- </dependency>
I am getting the dependency.version error - maven does not let this go through.
How can I use resteasy-multipart-provide in wildfly 8.1 ?
Regards, Ingo
Tomaz:
Seem to have reached some 'frequency limit' when trying to answer:
19:07:17,616 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./wildfly-ejb-in-ear: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./wildfly-ejb-in-ear: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/fasterxml/jackson/jaxrs/base/ProviderBase