Menu

#1 make Davenport compatible with Java 6

open
nobody
None
5
2010-01-07
2010-01-07
No

when running davenport-0.9.11 with Java 6 in Debian Lenny, we encountered an exception

java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z

which seems to be a well-known issue with Java 6 and xerces. The solution to the problem is to get the davenport sources, add

System.setProperty("javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");

pretty early into public void init() throws ServletException { in src/java/smbdav/Davenport.java and compile davenport.jar (ant jar). If webapps/root/WEB-INF/lib/davenport.jar is replaced by the resulting davenport.jar, davenport will run fine with Java 6.

Discussion

  • Marcello Teodori

    in ubuntu 10.04 using openjdk-6-jre I just have to remove ext/xercesImpl.jar and ext/xml-apis.jar and I don't get the error anymore

     
  • Anonymous

    Anonymous - 2011-01-18

    solution from mteodori works also for sun's java 1.6.0.23 x86_64 on openSUSE 11.2

     

Log in to post a comment.