java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker

Stack Overflow | Aakash Goyal | 2 months ago
  1. 0

    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker

    Stack Overflow | 2 months ago | Aakash Goyal
    java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
  2. 0

    Excel file is corrupted while running FileOutputStream using Apache POI in Selenium Java

    Stack Overflow | 3 months ago | Suds
    java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
  3. 0

    OpenXML Xalan dependencies : docx4j Java forum

    docx4java.org | 11 months ago
    java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Print preview triggers a java exception. The FOP:AWT windows then hangs empty,

    Scilab Bugzilla | 6 years ago | sgougeon
    java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
  6. 0

    If I add: {noformat} <dependency> <groupId>org.opensaml</groupId> <artifactId>opensaml</artifactId> <version>2.6.0</version> <optional>true</optional> <exclusions> <exclusion> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> </exclusion> <exclusion> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> </exclusion> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> <exclusion> <groupId>org.apache.xerces</groupId> <artifactId>xml-apis</artifactId> </exclusion> <exclusion> <groupId>org.apache.xerces</groupId> <artifactId>xercesImpl</artifactId> </exclusion> <exclusion> <groupId>org.apache.xerces</groupId> <artifactId>serializer</artifactId> </exclusion> </exclusions> </dependency> {noformat} to the projects dependency list the codegeneration: {noformat} <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf.version}</version> <dependencies> <dependency> <groupId>org.apache.cxf.xjcplugins</groupId> <artifactId>cxf-xjc-ts</artifactId> <version>${cxf.xjc.utils.version}</version> </dependency> <dependency> <groupId>net.java.dev.jaxb2-commons</groupId> <artifactId>jaxb-fluent-api</artifactId> <version>2.1.8</version> </dependency> <dependency> <groupId>org.jvnet.jaxb2_commons</groupId> <artifactId>jaxb2-basics</artifactId> <version>${jaxb2.commons.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-ws-addr</artifactId> <version>${cxf.version}</version> </dependency> </dependencies> <configuration> <defaultOptions> <catalog>${basedir}/src/main/resources/wsdl/catalog.xml</catalog> <validateWsdl>false</validateWsdl> <extraargs> <extraarg>-xjc-Xts</extraarg> <extraarg>-xjc-Xfluent-api</extraarg> <extraarg>-xjc-Xcopyable</extraarg> <extraarg>-mark-generated</extraarg> <extraarg>-verbose</extraarg> </extraargs> <bindingFiles> <bindingFile>${basedir}/src/main/resources/wsdl/jaxbbindings.xml</bindingFile> </bindingFiles> </defaultOptions> </configuration> <executions> <execution> <id>embedded-wsdls</id> <goals> <goal>wsdl2java</goal> </goals> </execution> <execution> <execution> <id>extracted-wsdls</id> <goals> <goal>wsdl2java</goal> </goals> <configuration> <wsdlRoot>${wsdlDir}/WEB-INF/wsdl</wsdlRoot> </configuration> </execution> </executions> </plugin> </plugins> {noformat} will fail with: {noformat} [ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java (embedded-wsdls) on project cxf-utils: org/apache/xml/serializer/TreeWalker: org.apache.xml.serializer.TreeWalker -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java (embedded-wsdls) on project cxf-utils: org/apache/xml/serializer/TreeWalker at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) 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:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357) Caused by: org.apache.maven.plugin.MojoExecutionException: org/apache/xml/serializer/TreeWalker at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.generate(WSDL2JavaMojo.java:447) at org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:310) at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:524) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:823) at org.apache.cxf.helpers.DOMUtils.writeXml(DOMUtils.java:606) at org.apache.cxf.tools.util.JAXBUtils.getPackageMappingSchemaBindingFile(JAXBUtils.java:134) at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:448) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:714) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:270) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164) at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412) at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86) at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.generate(WSDL2JavaMojo.java:427) ... 23 more Caused by: java.lang.ClassNotFoundException: org.apache.xml.serializer.TreeWalker at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 35 more [ERROR] {noformat}

    Apache's JIRA Issue Tracker | 3 years ago | David J. M. Karlsen
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java (embedded-wsdls) on project cxf-utils: org/apache/xml/serializer/TreeWalker

  1. andyglick 2 times, last 2 days ago
  2. richard77 1 times, last 5 days ago
  3. musketyr 2 times, last 5 days ago
  4. michallos 2 times, last 5 days ago
  5. batwalrus76 2 times, last 5 days ago
67 more registered users
28 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.apache.xml.serializer.TreeWalker

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    3. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    4 frames
  3. Xalan Java
    TransformerFactoryImpl.newTransformer
    1. org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:818)
    1 frame
  4. Apache POI
    OPCPackage.save
    1. org.apache.poi.openxml4j.opc.StreamHelper.getIdentityTransformer(StreamHelper.java:45)
    2. org.apache.poi.openxml4j.opc.StreamHelper.saveXmlInStream(StreamHelper.java:61)
    3. org.apache.poi.openxml4j.opc.internal.marshallers.ZipPartMarshaller.marshallRelationshipPart(ZipPartMarshaller.java:181)
    4. org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:507)
    5. org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1509)
    5 frames
  5. POI
    POIXMLDocument.write
    1. org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:237)
    1 frame
  6. Unknown
    WriteExcelPOI.main
    1. WriteExcelPOI.WriteExcelFile(WriteExcelPOI.java:53)
    2. WriteExcelPOI.main(WriteExcelPOI.java:66)
    2 frames