I'm trying to upload a file from the client (JSE) to the server application (Java EE, EJB, Wildfly). I'm trying use first example from this page, but when I try to run the server applications on the Wildfly server - I get this error:
19:08:30,077 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."ProjectEngineerServer.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ProjectEngineerServer.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "ProjectEngineerServer.jar" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.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_20] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_20] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20] Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.system.main.HandlingBean with ClassLoader ModuleClassLoader for Module "deployment.ProjectEngineerServer.jar:main" from Service Module Loader at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.2.0.Final.jar:8.2.0.Final] at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final] ... 5 more Caused by: java.lang.NoClassDefFoundError: com/healthmarketscience/rmiio/RemoteInputStream at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.8.0_20] at java.lang.Class.privateGetDeclaredMethods(Class.java:2688) [rt.jar:1.8.0_20] at java.lang.Class.getDeclaredMethods(Class.java:1962) [rt.jar:1.8.0_20] at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.(ClassReflectionIndex.java:65) [wildfly-server-8.2.0.Final.jar:8.2.0.Final] at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.2.0.Final.jar:8.2.0.Final] ... 10 more Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.rmiio.RemoteInputStream from [Module "deployment.ProjectEngineerServer.jar:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final] ... 15 more 19:08:31,657 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014613: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ProjectEngineerServer.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ProjectEngineerServer.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"ProjectEngineerServer.jar\" Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.system.main.HandlingBean with ClassLoader ModuleClassLoader for Module \"deployment.ProjectEngineerServer.jar:main\" from Service Module Loader Caused by: java.lang.NoClassDefFoundError: com/healthmarketscience/rmiio/RemoteInputStream Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.rmiio.RemoteInputStream from [Module \"deployment.ProjectEngineerServer.jar:main\" from Service Module Loader]"}}
I don't understand why the class cannot be found (com/healthmarketscience/rmiio/RemoteInputStream
). I use a Maven and I added this to my pom.xml:
<dependency>
<groupId>com.healthmarketscience.rmiio</groupId>
<artifactId>rmiio</artifactId>
<version>2.0.5</version>
</dependency>
So I've got the rmiio library in my project.
How can I solve this problem?