I am facing a weird error.I have set up my code in IntelliJ Idea.
While running a test case I am getting the following erro
java.lang.NoSuchMethodError: org.apache.xml.serializer.SerializationHandler.addAttribute(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
transformerHandler.getTransformer().transform(new StreamSource(sourceFile), result);
It seems to be a serializer error.I tried removing that too, but I am not able to get rid of this error.
Please help.
This kind of problem is typically because the compile-time classpath doesn’t match the run-time classpath, so a method that was present when you compiled isn’t present when you run. Check your IntelliJ project configuration.
It’s a Java problem, nothing to do with XML at all.