I want to upload a file to a server from an html client.
Exception:
Caused by: java.lang.ClassNotFoundException:
org.glassfish.jersey.process.internal.RequestExecutorFactory
pom.xml:
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>${dropwizard.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-forms</artifactId>
<version>${dropwizard.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160212</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>2.21</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>1.18.3</version>
</dependency>
and this is run in the app class:
env.jersey().register(MultiPartFeature.class);
env.jersey().register(MultiPartConfigProvider.class);
Execute execute=new Execute();
env.jersey().register(execute);
I think the problem is by pom.xml
but after a lot of change in pom don't get any result before
this exception I have another exception that MultipartConfig class not exist so I register MultipartFeature.class
and multipartConfigProvider.class
but get this exception.
In the last exception (MultipartConfig
) program exit after exception but in this exception
program not exit.
project repository on github