java.lang.NoSuchMethodError

javax.xml.stream.XMLInputFactory.newFactory() error for 2.1-SNAPSHOT and 2.0-RELEASE ------------------------------------------------------------------------------------------------------------------ Key: MTOMCAT-183 URL: https://issues.apache.org/jira/browse/MTOMCAT-183 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0 Environment: os: win7-64x jdk: jdk1.6.0_12 maven:apache-maven-3.0.4 Reporter: ZHANG Frank Assignee: Olivier Lamy (*$^¨%`£) Labels: maven Original Estimate: 12h Remaining Estimate: 12h when run tomcat7:run, errors as follow: ... urls[45] = file:/C:/Users/Administrator/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar urls[46] = file:/C:/Users/Administrator/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]] -----------------------------------------------------

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web3452

  • /plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar urls[46] = file:/C:/Users/Administrator/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar Number of foreign imports: 1 import: Entry[import  from realm ClassRealm[maven.api, parent: null]] -----------------------------------------------------
  • URL: https://issues.apache.org/jira/browse/MTOMCAT-183 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0 Environment: os: win7-64x jdk: jdk1.6.0_12
  • via Stack Overflow by Vimal Dhaduk
    , 8 months ago
    org.apache.spark.streaming.scheduler.ReceivedBlockTracker (loaded from file:/C:/Users/Administrator/.m2/repository/org/apache/spark/spark-streaming_2.11/1.6.2/spark-streaming_2.11-1.6.2.jar by sun.misc.Launcher$AppClassLoader@4b69b358).
  • Stack trace

    • java.lang.NoSuchMethodError: javax.xml.stream.XMLInputFactory.newFactory() error for 2.1-SNAPSHOT and 2.0-RELEASE ------------------------------------------------------------------------------------------------------------------ Key: MTOMCAT-183 URL: https://issues.apache.org/jira/browse/MTOMCAT-183 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0 Environment: os: win7-64x jdk: jdk1.6.0_12 maven:apache-maven-3.0.4 Reporter: ZHANG Frank Assignee: Olivier Lamy (*$^¨%`£) Labels: maven Original Estimate: 12h Remaining Estimate: 12h when run tomcat7:run, errors as follow: ... urls[45] = file:/C:/Users/Administrator/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar urls[46] = file:/C:/Users/Administrator/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]] ----------------------------------------------------- at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:139) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) Caused by: org.apache.maven.plugin.PluginContainerException: An API incompatibility was encountered while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.1-SNAPSHOT:run: java.lang.NoSuchMethodError: javax.xml.stream.XMLInputFactory.newFactory()Ljavax/xml/stream/XMLInputFactory; ----------------------------------------------------- realm = plugin>org.apache.tomcat.maven:tomcat7-maven-plugin:2.1-SNAPSHOT strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/C:/Users/Administrator/.m2/repository/org/apache/tomcat/maven/tomcat7-maven-plugin/2.1-SNAPSHOT/tomcat7-maven-plugin-2.1-SNAPSHOT.jar urls[1] = file:/C:/Users/Administrator/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.32/tomcat-embed-core-7.0.32.jar urls[2] = file:/C:/Users/Administrator/.m2/repository/org/apache/tomcat/tomcat-util/7.0.32/tomcat-util-7.0.32.jar ... urls[45] = file:/C:/Users/Administrator/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar urls[46] = file:/C:/Users/Administrator/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]] ----------------------------------------------------- at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) ... 2 more Caused by: java.lang.NoSuchMethodError: javax.xml.stream.XMLInputFactory.newFactory()Ljavax/xml/stream/XMLInputFactory; at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.parseContextFile(AbstractRunMojo.java:589) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.createContext(AbstractRunMojo.java:539) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:929) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:478) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 3 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.