1

I have developed a project using jersey 2 and spring 4,but i had to replace jersey 2 with jersey 1.19,when I did this i am getting an exception called "java.lang.ClassNotFoundException: com.sun.jersey.core.util.FeaturesAndProperties", when running on tomcat server.Is the migration from jersey 2 to jersey 1.19 causing this exception?.Thanks

My web.xml

<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
          http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0">

    <!-- Spring Listener -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <!-- Jersey Servlet -->
    <servlet>
        <servlet-name>FITransXT</servlet-name>
        <servlet-class>
            com.sun.jersey.spi.spring.container.servlet.SpringServlet
        </servlet-class>
        <!-- Register resources and providers -->
        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>com.mobileware.fitransxt</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>FITransXT</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

    <!-- loading Spring Context for registering beans with ApplicationContext -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>WEB-INF/FITransXT-servlet.xml</param-value>
    </context-param>



</web-app> 

my Pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <!-- <dependencyManagement>
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-framework-bom</artifactId>
    <version>4.3.1.RELEASE</version>
</dependency>
  </dependencyManagement> -->
  <parent>
    <groupId>com.mobileware.fitransxt</groupId>
    <artifactId>FITransXT</artifactId>
    <version>0.0.1</version>
  </parent>
  <artifactId>FITransXT-Impl</artifactId>
  <dependencies>
  <dependency>
   <groupId>com.mobileware.fitransxt</groupId>
 <artifactId>FITransXT-Type</artifactId>
 <version>0.0.1</version>
 </dependency> 
 <dependency>
 <groupId>com.mobileware.fitransxt</groupId>
 <artifactId>FITransXT-BOImpl</artifactId>
 <version>0.0.1</version>
 </dependency>
 <!--  <dependency>
 <groupId>com.mobileware.fitransxt</groupId>
 <artifactId>FITransXT-DaoImpl</artifactId>
 <version>0.0.1</version>
 </dependency> -->
    <!-- Jersey core Servlet 2.x implementation -->
<!--     <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-servlet-core</artifactId>
        <version>${jersey.version}</version>
          <scope>compile</scope> 
    </dependency> -->
     <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-server</artifactId>
        <version>${jersey.version}</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-core -->
<dependency>
    <groupId>com.sun.jersey</groupId>
    <artifactId>jersey-core</artifactId>
    <version>${jersey.version}</version>
</dependency>
    <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-servlet -->
<dependency>
    <groupId>com.sun.jersey</groupId>
    <artifactId>jersey-servlet</artifactId>
    <version>${jersey.version}</version>
</dependency>

   <!-- Jersey JSON Jackson (2.x) entity providers support module -->
  <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.7.3</version>
</dependency>
  <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.7.3</version>
</dependency>


    <!-- Jersey extension module providing support for Spring 3 integration -->
    <dependency>
        <groupId>com.sun.jersey.contribs</groupId>
        <artifactId>jersey-spring</artifactId>
        <version>${jersey.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
            </exclusion>
             <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
            </exclusion>
              <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
            </exclusion>
              <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
            </exclusion>
             <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
            </exclusion>
             <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-asm</artifactId>
            </exclusion>
            <exclusion>
             <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
 <!-- https://mvnrepository.com/artifact/org.glassfish.jersey.ext/jersey-bean-validation -->


    <!-- Spring Framework-4.x -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>
     <dependency>  
<groupId>org.springframework</groupId>  
<artifactId>spring-aop</artifactId>  
<version>${spring.version}</version>  
  </dependency> 
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
    </dependency>
</dependencies>
<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring.version>4.3.1.RELEASE</spring.version>
        <jersey.version>1.19</jersey.version>
        <slf4j.version>1.7.2</slf4j.version>
        <jdk.source.version>1.8</jdk.source.version>
        <jdk.target.version>1.8</jdk.target.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
</project> 

Dependency Tree

-- maven-dependency-plugin:2.8:tree (default-cli) @ FITransXT-Web ---
[INFO] com.mobileware.fitransxt:FITransXT-Web:war:0.0.1
[INFO] +- com.mobileware.fitransxt:FITransXT-Impl:jar:0.0.1:compile
[INFO] |  +- com.mobileware.fitransxt:FITransXT-Type:jar:0.0.1:compile
[INFO] |  |  +- (org.springframework:spring-context:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context-support:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (com.google.code.gson:gson:jar:2.3.1:compile - omitted for duplicate)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.6:compile - omitted for duplicate)
[INFO] |  |  +- (org.slf4j:slf4j-log4j12:jar:1.7.5:compile - omitted for duplicate)
[INFO] |  |  \- (org.json:json:jar:20160810:compile - omitted for duplicate)
[INFO] |  +- com.mobileware.fitransxt:FITransXT-BOImpl:jar:0.0.1:compile
[INFO] |  |  +- com.mobileware.fitransxt:FITransXT-BOIntf:jar:0.0.1:compile
[INFO] |  |  |  +- (com.mobileware.fitransxt:FITransXT-Type:jar:0.0.1:compile - omitted for duplicate)
[INFO] |  |  |  +- (com.google.code.gson:gson:jar:2.3.1:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.6:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.slf4j:slf4j-log4j12:jar:1.7.5:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.json:json:jar:20160810:compile - omitted for duplicate)
[INFO] |  |  +- com.mobileware.fitransxt:FITransXT-DaoImpl:jar:0.0.1:compile
[INFO] |  |  |  +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] |  |  |  |  \- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] |  |  |  +- com.mobileware.fitransxt:FITransXT-Dao:jar:0.0.1:compile
[INFO] |  |  |  |  +- (com.mobileware.fitransxt:FITransXT-Type:jar:0.0.1:compile - omitted for duplicate)
[INFO] |  |  |  |  +- mysql:mysql-connector-java:jar:5.1.6:compile
[INFO] |  |  |  |  +- org.apache.commons:commons-dbcp2:jar:2.1:compile
[INFO] |  |  |  |  |  +- org.apache.commons:commons-pool2:jar:2.3:compile
[INFO] |  |  |  |  |  \- (commons-logging:commons-logging:jar:1.2:compile - omitted for duplicate)
[INFO] |  |  |  |  +- (com.google.code.gson:gson:jar:2.3.1:compile - omitted for duplicate)
[INFO] |  |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.6:compile - omitted for duplicate)
[INFO] |  |  |  |  +- (org.slf4j:slf4j-log4j12:jar:1.7.5:compile - omitted for duplicate)
[INFO] |  |  |  |  \- (org.json:json:jar:20160810:compile - omitted for duplicate)
[INFO] |  |  |  +- com.oracle:ojdbc6:jar:11.2.0:compile
[INFO] |  |  |  +- (com.google.code.gson:gson:jar:2.3.1:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.6:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.slf4j:slf4j-log4j12:jar:1.7.5:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.json:json:jar:20160810:compile - omitted for duplicate)
[INFO] |  |  +- (org.json:json:jar:20160810:compile - omitted for duplicate)
[INFO] |  |  +- (log4j:log4j:jar:1.2.14:compile - omitted for conflict with 1.2.17)
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.3.4:compile
[INFO] |  |  |  +- org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[INFO] |  |  |  +- (commons-logging:commons-logging:jar:1.1.3:compile - omitted for conflict with 1.2)
[INFO] |  |  |  \- commons-codec:commons-codec:jar:1.6:compile
[INFO] |  |  +- (com.google.code.gson:gson:jar:2.3.1:compile - omitted for duplicate)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.6:compile - omitted for duplicate)
[INFO] |  |  \- (org.slf4j:slf4j-log4j12:jar:1.7.5:compile - omitted for duplicate)
[INFO] |  +- com.sun.jersey:jersey-server:jar:1.19:compile
[INFO] |  |  \- (com.sun.jersey:jersey-core:jar:1.19:compile - omitted for duplicate)
[INFO] |  +- com.sun.jersey:jersey-core:jar:1.19:compile
[INFO] |  |  \- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] |  +- com.sun.jersey:jersey-servlet:jar:1.19:compile
[INFO] |  |  \- (com.sun.jersey:jersey-server:jar:1.19:compile - omitted for duplicate)
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.7.3:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.7.0:compile
[INFO] |  |  \- (com.fasterxml.jackson.core:jackson-core:jar:2.7.3:compile - omitted for duplicate)
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.7.3:compile
[INFO] |  +- com.sun.jersey.contribs:jersey-spring:jar:1.19:compile
[INFO] |  |  \- (com.sun.jersey:jersey-servlet:jar:1.19:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-core:jar:4.3.1.RELEASE:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  +- org.springframework:spring-context:jar:4.3.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-aop:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- org.springframework:spring-beans:jar:4.3.1.RELEASE:compile
[INFO] |  |  |  \- (org.springframework:spring-core:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-core:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- org.springframework:spring-expression:jar:4.3.1.RELEASE:compile
[INFO] |  |     \- (org.springframework:spring-core:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-context-support:jar:4.3.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-web:jar:4.3.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-aop:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-aop:jar:4.3.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-webmvc:jar:4.3.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-aop:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-core:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-expression:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-web:jar:4.3.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- (com.google.code.gson:gson:jar:2.3.1:compile - omitted for duplicate)
[INFO] |  +- (org.slf4j:slf4j-api:jar:1.7.6:compile - omitted for duplicate)
[INFO] |  +- (org.slf4j:slf4j-log4j12:jar:1.7.5:compile - omitted for duplicate)
[INFO] |  \- (org.json:json:jar:20160810:compile - omitted for duplicate)
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- com.google.code.gson:gson:jar:2.3.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.6:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.5:compile
[INFO] |  +- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for conflict with 1.7.6)
[INFO] |  \- log4j:log4j:jar:1.2.17:compile
[INFO] \- org.json:json:jar:20160810:compile 

Edited: on console:

java.lang.ClassNotFoundException: com.sun.jersey.core.util.FeaturesAndProperties
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1141)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1141)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1141)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
    at java.lang.Class.getConstructor0(Class.java:3075)
    at java.lang.Class.newInstance(Class.java:412)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1116)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:558)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:255)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 
23
  • update maven in your project Commented Feb 28, 2017 at 11:36
  • Do you get this when running something built by maven, or when running in IDE? Commented Feb 28, 2017 at 11:38
  • @Durgpal Singh,How to update maven? i mean is it the version or what? Commented Feb 28, 2017 at 13:03
  • @Tobb. I got this exception while running project on tomcat. Commented Feb 28, 2017 at 13:04
  • @MohdToufeeqkhan update maven means download all the dependency of project threw maven. Commented Feb 28, 2017 at 13:10

1 Answer 1

1

Ways to handle these kind of problem-

First close your IDE and remove target, .setting and .classpath from your project directory.

1) Double check if you have multiple dependency of same with different version in pom.xml, if yes remove it and run command mvn clean install -U. If it's not work then

2) Find .m2 directory and inside this directory search for lastupdate file and remove all these files and run command mvn clean install -U. If it's not work then

3) Remove .m2 direcory and clean and install maven.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.