Hi,

Just want to share my workaround for the following issue. I have a cocoon web app being run under tomcat with jdk6. After some changes (including maven 2 -> maven 3 migration and some code changes) I keep getting this error while executing maven jetty:run goal:

Error
DOMSource cannot be processed: check that saxon8-dom.jar is on the classpath Dec 14, 2011 11:27:41 AM com.sun.xml.internal.messaging.saaj.soap.MessageImpl saveChanges
SEVERE: SAAJ0539: Unable to get header stream in saveChanges
Dec 14, 2011 11:27:42 AM com.sun.xml.internal.messaging.saaj.soap.MessageImpl saveChanges
SEVERE: SAAJ0540: Error during saving a multipart message

Having searched in the web, I've come across this thread: http://forum.springsource.org/archive/index.php/t-41774.html

Indeed, cocoon-core and some other cocoon components (e.g. cocoon-sitemap-impl, cocoon-fop-ng-impl) have xerces, xalan and xml-apis transitive dependencies. Thus, I've tried different ways and ended up with excluding these dependencies for cocoon-core like this:
<dependency>
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-core</artifactId>
<version>2.2.0</version>
<exclusions>
<exclusion>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>

It solved the issue and jetty:run works fine now. However, I'm not totally sure why this way works as the same dependencies exist in other places as well (moreover, the final application build didn't change at all with my modifications). So the only guess I have is it may be related to the loading order of libraries in the classpath. If anybody has a better understanding on this, please share your ideas.

Best regards,
Ivan Lagunov

Reply via email to