My problem is very similar to: Jersey exception only thrown when depencencies assembled into a single jar
I run my application (jetty embedded + jersey) and everything works. When i try to create a executable JAR i get the error:
org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor aroundWriteTo GRAVE: MessageBodyWriter not found for media type=application/json, type=class
My POM.XML:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>server.application.DeepDig</mainClass>
</transformer>
</transformers>
<filters>
<!-- filter to address "Invalid signature file" issue - see https://stackoverflow.com/a/6743609/589215 -->
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>