I recently posted a problem concerning Apache Jena, xerces and the Netbeans
Platform. I have read about problems with xerces going back years but seen
no solution other than hacking the classloader.

The problem was a clash between the xerces libraries in Jena and those in
Netbeans leading to Linker error.

The solution was to leave the xerces jars in Jena out of the wrapped library
and replace them with the one included in Netbeans.

The correct jar was not easy to find. On my Macintosh the path to the jar
was:

Code:
/Applications/NetBeans/NetBeans
8.0.2.app/Contents/Resources/NetBeans/ide/modules/ext/xerces-2.8.0.jar

On a Macintosh the Netbeans installation lives inside a package in the
Applications folder. To see it you have to right click the Netbeans
application and choose ³show package contents².

I then searched inside ³Netbeans 8.0.2.app² using ³xerces² as a key. One of
the files located by the search was ³org-netbeans-libs-xerces.jar². Others
had suggested this was the file to use, but it turned out to be empty of
content and only 5kB in size.

The file ³xerces-2.8.0.jar² was 1.2MB in size and when copied to an
accessible location outside the Application package and included as a
wrapped library in my JenaWrapper module, everything worked!



David Moss


Reply via email to