When I deploy a Spring Boot application packaged in an ear in Jboss 7.x EAP I get the following error:
server.default-host./pepe: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./pepe: java.lang.RuntimeException: java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.xml'
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.xml'
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:231)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
Caused by: java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.xml'
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadIntoGroup(ConfigFileApplicationListener.java:476)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:465)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:386)
at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:225)
at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:195)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:182)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:168)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:296)
at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:154)
at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:134)
at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:184)
The structure of the ear is as follows:
├── META-INF
│ ├── application.xml
│ └── jboss-deployment-structure.xml
├── evaluateboot_be-web-0.0.1-SNAPSHOT.war
└── lib
├── asm-5.0.4.jar
├── aspectjweaver-1.8.13.jar
├── bcpkix-jdk15on-1.55.jar
├── bcprov-jdk15on-1.55.jar
├── bval-core-1.1.2.jar
├── cache-api-1.0.0.jar
├── ccf2-8.0.0.4_MAPFRE.jar
├── cxf-core-3.1.12.jar
├── cxf-rt-bindings-soap-3.1.12.jar
├── cxf-rt-databinding-jaxb-3.1.12.jar
├── cxf-rt-frontend-jaxws-3.1.12.jar
├── cxf-rt-frontend-simple-3.1.12.jar
├── cxf-rt-security-3.1.12.jar
├── cxf-rt-security-saml-3.1.12.jar
├── cxf-rt-transports-http-3.1.12.jar
├── cxf-rt-ws-security-3.1.12.jar
├── cxf-rt-wsdl-3.1.12.jar
├── cxf-spring-boot-autoconfigure-3.1.12.jar
├── cxf-spring-boot-starter-jaxws-3.1.12.jar
├── dom4j-1.6.1.jar
├── ehcache-2.10.4.jar
├── evaluateboot-bo-0.0.1-SNAPSHOT.jar
├── evaluateboot_be-commons-0.0.1-SNAPSHOT.jar
├── evaluateboot_be-crud-dl-api-0.0.1-SNAPSHOT.jar
├── evaluateboot_be-crud-sr-api-0.0.1-SNAPSHOT.jar
├── evaluateboot_be-crud-sr-impl-0.0.1-SNAPSHOT.jar
├── evaluateboot_be.zeroConfig-0.0.1-SNAPSHOT.jar
├── guava-19.0.jar
├── hibernate-validator-5.3.6.Final.jar
├── httpclient-4.5.3.jar
├── httpcore-4.4.8.jar
├── jackson-annotations-2.8.0.jar
├── jackson-core-2.8.10.jar
├── jackson-databind-2.8.10.jar
├── jasypt-1.9.2.jar
├── jaxen-1.1.1_CXF_MAPFRE.jar
├── jboss-logging-3.3.1.Final.jar
├── jcl-over-slf4j-1.7.25.jar
├── jdom-1.1.jar
├── joda-time-2.9.9.jar
├── jul-to-slf4j-1.7.25.jar
├── log4j-over-slf4j-1.7.25.jar
├── logback-classic-1.1.11.jar
├── spring-aspects-4.3.13.RELEASE.jar
├── spring-beans-4.3.13.RELEASE.jar
├── spring-boot-1.5.9.RELEASE.jar
├── spring-boot-actuator-1.5.9.RELEASE.jar
├── spring-boot-autoconfigure-1.5.9.RELEASE.jar
├── spring-boot-starter-1.5.9.RELEASE.jar
...
The version of spring boot that I am using is 1.5.9.
Why is Spring Boot trying to load the ear deployment descriptor, which is in the META-INF folder?
This same ear deploys correctly in Websphere 8.5.5.x
After carefully reviewing the generated artifacts, I have found that the problem that causes this error is because one of the artifacts has the following plugin:
<plugin>
<groupId> org.apache.maven.plugins </ groupId>
<artifactId> maven-jar-plugin </ artifactId>
<configuration>
<archive>
<manifest>
<addClasspath> true </ addClasspath>
</ manifest>
<manifestEntries>
<Class-Path> ./ META-INF / </ Class-Path>
</ manifestEntries>
</ archive>
</ configuration>
</ plugin>
This is causing it to generate the META-INF file:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: jose
Class-Path: ./ META-INF/ bval-core-1.1.2.jar gaia-core-2.4.0-SNAPSHOT.
jar gaia-commons-devutils-2.4.0-SNAPSHOT.jar gaiafrontend-proxy-2.4.0
-SNAPSHOT.jar gaia-commons-2.4.0-SNAPSHOT.jar MAPFRE_ARQOS_CORE_VIDA.
ArquitecturaCoreVidaFramework-14.1.12.jar MAPFRE_ARQOS_COMMONS_STANDA
LONE.CommonsExceptions-14.1.12.jar MAPFRE_ARQOS_COMMONS_STANDALONE.En
cryptionServiceProvider-14.1.12.jar MAPFRE_ARQOS_COMMONS_STANDALONE.U
tils-14.1.12.jar MAPFRE_ARQOS_COMMONS_STANDALONE.Log4M-14.1.12.jar MA
PFRE_ARQOS_COMMONS_STANDALONE.CacheServiceProvider-14.1.12.jar MAPFRE
_ARQOS_COMMONS_STANDALONE.Tron21ConnectorErrorExchange-14.1.12.jar do
m4j-1.6.1.jar jaxen-1.1.1_CXF_MAPFRE.jar xercesImpl-2.8.0.jar jdom-1.
1.jar ctgclient-8.0.0.4_MAPFRE.jar ctgserver-8.0.0.4_MAPFRE.jar ccf2-
8.0.0.4_MAPFRE.jar cicseci-8.0.0.4_MAPFRE.jar cicsecitools-8.0.0.4_MA
PFRE.jar cicsframe-8.0.0.4_MAPFRE.jar security-8.0.0.4_MAPFRE.jar spr
ing-aspects-4.3.13.RELEASE.jar spring-core-4.3.13.RELEASE.jar commons
-logging-1.2.jar spring-context-4.3.13.RELEASE.jar spring-context-sup
port-4.3.13.RELEASE.jar spring-beans-4.3.13.RELEASE.jar spring-expres
sion-4.3.13.RELEASE.jar spring-aop-4.3.13.RELEASE.jar spring-oxm-4.3.
13.RELEASE.jar spring-tx-4.3.13.RELEASE.jar spring-web-4.3.13.RELEASE
.jar spring-webmvc-4.3.13.RELEASE.jar spring-security-core-4.2.3.RELE
ASE.jar aopalliance-1.0.jar spring-security-ldap-4.2.3.RELEASE.jar sp
ring-ldap-core-2.3.2.RELEASE.jar spring-security-config-4.2.3.RELEASE
.jar spring-security-web-4.2.3.RELEASE.jar spring-boot-1.5.9.RELEASE.
jar spring-boot-autoconfigure-1.5.9.RELEASE.jar jackson-core-2.8.10.j
ar jackson-databind-2.8.10.jar jackson-annotations-2.8.0.jar cxf-core
-3.1.12.jar woodstox-core-asl-4.4.1.jar stax2-api-3.1.4.jar xmlschema
-core-2.2.2.jar cxf-rt-bindings-soap-3.1.12.jar cxf-rt-databinding-ja
xb-3.1.12.jar cxf-rt-frontend-simple-3.1.12.jar cxf-rt-frontend-jaxws
-3.1.12.jar asm-5.0.4.jar cxf-rt-transports-http-3.1.12.jar cxf-rt-ws
-security-3.1.12.jar cxf-rt-security-saml-3.1.12.jar cxf-rt-security-
3.1.12.jar wss4j-policy-2.1.10.jar neethi-3.0.3.jar wss4j-ws-security
-stax-2.1.10.jar wss4j-bindings-2.1.10.jar wss4j-ws-security-policy-s
tax-2.1.10.jar cxf-rt-wsdl-3.1.12.jar wsdl4j-1.6.3.jar logback-core-1
.1.11.jar logback-classic-1.1.11.jar slf4j-api-1.7.25.jar commons-io-
2.4.jar commons-codec-1.10.jar commons-pool-1.6.jar commons-lang-2.6.
jar commons-lang3-3.3.2.jar commons-collections-3.2.2.jar commons-bea
nutils-1.9.3.jar validation-api-1.1.0.Final.jar cache-api-1.0.0.jar j
oda-time-2.9.9.jar swagger-annotations-1.5.10.jar lombok-1.16.18.jar
guava-19.0.jar aspectjweaver-1.8.13.jar coherence-12.1.2.0.jar ehcach
e-2.10.4.jar wss4j-1.6.7.jar wss4j-ws-security-common-2.0.9.jar xmlse
c-2.0.7.jar jasypt-1.9.2.jar wss4j-ws-security-dom-2.0.9.jar gaiaback
end-core-2.4.0-SNAPSHOT.jar gaia-context-2.4.0-SNAPSHOT.jar spring-jd
bc-4.3.13.RELEASE.jar springfox-swagger2-2.6.1.jar swagger-models-1.5
.10.jar springfox-spi-2.6.1.jar springfox-core-2.6.1.jar springfox-sc
hema-2.6.1.jar springfox-swagger-common-2.6.1.jar springfox-spring-we
b-2.6.1.jar classmate-1.3.4.jar spring-plugin-core-1.2.0.RELEASE.jar
spring-plugin-metadata-1.2.0.RELEASE.jar mapstruct-1.0.0.Final.jar sp
ringfox-swagger-ui-2.6.1.jar gaiabackend-remote-2.4.0-SNAPSHOT.jar ga
ia-plinvoker-2.4.0-SNAPSHOT.jar plinvoker-1.0.0-20180208.232239-4.jar
cxf-spring-boot-starter-jaxws-3.1.12.jar spring-boot-starter-1.5.9.R
ELEASE.jar spring-boot-starter-logging-1.5.9.RELEASE.jar jul-to-slf4j
-1.7.25.jar log4j-over-slf4j-1.7.25.jar snakeyaml-1.17.jar spring-boo
t-starter-web-1.5.9.RELEASE.jar spring-boot-starter-tomcat-1.5.9.RELE
ASE.jar tomcat-embed-core-8.5.23.jar tomcat-annotations-api-8.5.23.ja
r tomcat-embed-el-8.5.23.jar tomcat-embed-websocket-8.5.23.jar hibern
ate-validator-5.3.6.Final.jar jboss-logging-3.3.1.Final.jar cxf-sprin
g-boot-autoconfigure-3.1.12.jar jcl-over-slf4j-1.7.25.jar
Created-By: Apache Maven 3.5.0
Build-Jdk: 1.8.0_20
Removing the entry from the plugin:
<manifestEntries>
<Class-Path> ./ META-INF / </ Class-Path>
</ manifestEntries>
The application.xml file of the ear device is no longer scanned
Actually the application.xml and jboss-deployment-structure.xml file should be present inside the WEB-INF. Could you please check the project structure. If it is a new project, you can use this URL (https://start.spring.io/) to create the project structure. Can you refer the below URL:
https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch01s04s02.html
verify the complete structure including the war packaging.
Related
I have a Gradle multi module project that uses the Mapstruct annotation processor for data type mapping across Java modules. The Gradle build works fine but when I import the project into IntellJ IDEA 2019.3 I get an unexpected annotation processor configuration.
The project structure looks like this
.
├── build.gradle
├── module1
│ └── src
│ └── main
│ └── java
│ └── io
│ └── wangler
│ └── mapstruct
│ ├── ApplicationModule1.java
│ ├── Person.java
│ ├── PersonDTO.java
│ └── PersonMapper.java
├── module2
│ └── src
│ └── main
│ ├── generated
│ │ └── ch
│ │ └── silviowangler
│ │ └── mapstruct
│ │ └── CarMapperImpl.java
│ └── java
│ └── ch
│ └── silviowangler
│ └── mapstruct
│ ├── ApplicationModule2.java
│ ├── Car.java
│ ├── CarDTO.java
│ └── CarMapper.java
└── settings.gradle
and the build.gradle that registers the annotation processor for module1 and module2.
subprojects { p ->
apply plugin: 'java-library'
apply plugin: 'groovy'
repositories {
jcenter()
}
dependencies {
annotationProcessor 'org.mapstruct:mapstruct-processor:1.3.1.Final'
implementation 'org.mapstruct:mapstruct:1.3.1.Final'
testImplementation 'org.codehaus.groovy:groovy-all:2.5.8'
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
testImplementation 'junit:junit:4.12'
}
}
When I compile the project using ./gradlew compileJava all works out fine and I get no compilation errors.
But when I run Rebuild Project withing IntelliJ I get a compilation error in module1 since IntelliJ does not have an annotation processor registered for module1.
Error:(6, 35) java: cannot find symbol
symbol: class PersonMapperImpl
location: class io.wangler.mapstruct.ApplicationModule1
Am I doing something wrong here or is this a known IntelliJ issue? The source code for this example can be found at https://github.com/saw303/idea-annotation-processors
I faced the same issue in IDEA 2019.3. Looks like a bug.
It occurs only if two modules has the same set of annotation processors.
To solve the problem you need to add any library using annotationProcessor directive to one of modules. It does not have to be a real annotation processor. This one is working for me:
annotationProcessor "commons-io:commons-io:${commonsIoVersion}"
I have created a defect in JerBrains bugtracker: IDEA-230337
I have a Spring project with the following structure:
.
├── pom.xml
├── core-module
│ ├── pom.xml
│ └── src
│ ├── main
│ │ ├── java
│ │ └── resources
│ │ ├── applicationContext.xml
│ │ └── file.xml
│ └── test
│ ├── java
│ └── resources
│ ├── file.xml
│ └── foo.xml
└── web-module
├── pom.xml
└── src
├── main
│ └── java
└── test
└── java
In my applicationContext.xml file, I have the following import:
<import resource="classpath:file.xml" />
In production I want to use the file.xml defined in main, and during tests I want to use the one defined in the test folder; it's actually what is happenning when I run the tests of the core-module.
However, when I run the tests of the web-module, this is not the case, the file used is the one of the main folder.
How to perform what I want?
Some notes:
web-module has a test-jar dependency to core-module, so tests resources are included;
if I go inside the target directory, the file.xml is the good one in the test-classes folder;
when running web-module tests, if I put a breakpoint in the Spring code, then a getClass().getClassLoader().getResource() on file.xml returns the one defined in main, but if I run the same method on the foo.xml file it returns me the only one available in the test folder, so both files seems to be present, but it acts as if the main takes over the test resource...
Thank you!
I run my app.jar as java -jar app.jar and see the next error:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/thrift/transport/TTransportException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.thrift.transport.TTransportException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
app.jar structure:
.
├── lib
│ ├── ... (some *.jar files)
│ ├── libthrift-0.9.3.jar
│ └── ... (some *.jar files)
├── META-INF
│ ├── MANIFEST.MF
│ └── maven
│ └── groupId-name
│ └── artifactId-name
│ ├── pom.properties
│ └── pom.xml
└── ... *.class files of app
In META-INF/MANIFEST.MF declared a classpath as:
Class-Path: lib/libthrift-0.9.3.jar lib/...(other *.jar's from lib/ folder)
libthrift-0.9.3.jar structure:
.
├── META-INF
│ ├── LICENSE.txt
│ ├── MANIFEST.MF
│ └── NOTICE.txt
└── org
└── apache
└── ... some packages with files
├── transport
│ ├── ... some files
│ ├── TTransportException.class
│ └── ...
└── ...
As are you see, class org.apache.transport.TTransportException exists and must be accessible in runtime. But don't. Why so?
First: by default in java if you have not used any special tools/frameworks (like spring-boot) you cannot have jars inside jar.
Second: The entries in in your Manifest file (like Class-Path: lib/libthrift-0.9.3.jar etc) reference not the jars inside jar but the jars in file system near the jar. I.e the file structure to run your app with java -jar app.jar should be:
./
/libs --> all 3-d party jars here
app.jar
If you want to have all in one jar one of the variants is to use so called 'uber-jar' - in that case all the 3-d party classes are extracted from their jars and packaged together with your own classes in one jar.
For example for maven build Shade Plugin can be used.
While packaging the app.jar, simply put the external/3rd party libraries like libthrift-0.9.3.jar in a folder/directory called "lib" just beside the app.jar. Let you Manifest entries remain the same. While executing, use java -cp . -jar app.jar. Else, like inigo said, simply use a tool like eclipse and pack all libraries inside the jar. Another option is simply to extract all class files from the external jars like thrift and package them into your app.jar. In that case you can run it simply like you want.
I have the following directly structure:
mp1
├── lib
│ └── kryonet-2.21-all.jar
├── mp1.iml
├── out
│ ├── artifacts
│ │ └── UX
│ │ ├── META-INF
│ │ │ └── MANIFEST.MF
│ │ └── UX.jar
├── src
│ ├── [.class files]
│ └── cs425
│ └── mp1
│ ├── agent
│ │ ├── [handlers].java
│ ├── common
│ │ ├── [commons].java
│ ├── main
│ │ └── UX.java
│ └── network
│ ├── [networks].java
I'm completely new to mainfest files, and am just trying to get a .jar to run on a remote box. My manifest looks like this right now:
Manifest-Version: 1.0
Main-Class: cs425.mp1.main.UX
But I just keep getting,
~/mp1$ java -jar UX.jar
Error: Invalid or corrupt jarfile UX.jar
Any help? I'm not sure what options to add for my external library and how to define my classpath.
It appears as though the only thing I was missing was the classpath to my external .jar file. My manifest now looks like:
Manifest-Version: 1.0
Main-Class: cs425.mp1.main.UX
Class-Path: kryonet-2.21-all.jar
After making sure all of my required files are part of the artifact package (my manifest file, external jar, etc), the issue seems to have gone away.
I have a tree that looks like this:
In the java folder, I have a package, com.example.project which has a Main class and an Application class that subclasses ResourceConfig
#ApplicationPath("api")
public class Application extends ResourceConfig {
public Application() {
packages("com.example.project");
property(MustacheMvcFeature.TEMPLATE_BASE_PATH, "templates");
register(MustacheMvcFeature.class);
register(MyRequestFilter.class);
}
}
In development, I run the Main class and start a Grizzly server:
public class Main {
public static HttpServer startServer(String BASE_URI) {
final Application app = new Application();
return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), app);
}
public static void main(String[] args) throws IOException {
String BASE_URI = "http://localhost:8080/api";
final HttpServer server = startServer(BASE_URI);
server.getServerConfiguration().addHttpHandler(
new StaticHttpHandler("src/main/webapp"), "/");
System.out.println(String.format(
"Jersey app started with WADL available at "
+ "%s/application.wadl\nHit enter to stop it...", BASE_URI)
);
System.in.read();
}
}
Everything works fine with the Grizzly server. I'm now trying to deploy to tomcat.
I use mvn package to create a war file. In my pom file, I have:
<build>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
I put the war file in the webapps directory under a tomcat instance and it gets exploded there. My static content is served.
The layout of the directory that comes from the WAR file looks like this:
[vagrant#vagrant-centos6 project]$ tree .
.
├── index.html
| ... <webapp content>
├── META-INF
│ ├── MANIFEST.MF
│ └── maven
│ └── com.example.project
│ └── project
│ ├── pom.properties
│ └── pom.xml
└── WEB-INF
├── classes
│ ├── com
│ │ └── example
│ │ └── project
│ │ ├── Application.class
│ │ ├── Main.class
| | ...
│ ├── filter-dev.properties
│ ├── filter-test.properties
│ ├── hibernate.cfg.xml
│ └── templates
│ └── foo.mustache
└── lib
...
I can not locate any of my REST services. Everything I try is 404.
Directory in tomcat webapps is project, javax.ws.rs.ApplicationPath is api, #Path is service. So, I would hope to get a response from /project/api/service, for instance. But, after trying many combinations, everything is 404.
You need to add jersey-servlet.jar to your war file.
In pom.xml, that might look like this:
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>