[platform-dev] Re: Newer/Different version of Xerces?

  • From: Jaroslav Tulach < >
  • To:
  • Subject: [platform-dev] Re: Newer/Different version of Xerces?
  • Date: Tue, 27 Nov 2012 22:46:21 +0100
  • Organization: Oracle

Dne Út 27. listopadu 2012 15:05:11, Cush1978 napsal(a):
> Hello,
> 
> I have a platform application and I'm trying to integrate a third party tool
> into it.  The third party tool relies on a beta version of Xerces that
> provides XML Schema 1.1 support.  NetBeans 7.2 ships with Xerces 2.8.0 as
> part of its core libraries.
> 
> My question is, how can I use the newer version of Xerces (2.11.0) with this
> third party tool without causing class loading issues?

I think the classloading problems are caused by 
javax.xml.parsers.DocumentBuilderFactory.newInstance() trying to find all 
implementations via 
META-INF/services/javax.xml.parsers.DocumentBuilderFactory 
file. The system is using classloader which sees "everything" and then it 
does 
not know whether to load the implementation class from 2.8.0 or 2.11.0. Does 
that match your experience?

What can be done with that? 

You can remove the META-INF/services/javax.xml.parsers.DocumentBuilderFactory 
file from your 2.11.0 and access its classes directly.

You can package 2.11.0 so it is seen as a newer version of 2.8.0 module. Then 
only the newer version should be enabled.

You can create a sample application, attach it to a bug/enhancement and hope 

will find some classloading trick to load the right implementation.
-jt



[platform-dev] Newer/Different version of Xerces?

Cush1978 11/27/2012

[platform-dev] Re: Newer/Different version of Xerces?

Jaroslav Tulach 11/27/2012

[platform-dev] Newer/Different version of Xerces?

Cush1978 11/28/2012

[platform-dev] Re: Newer/Different version of Xerces?

Benno Markiewicz 11/28/2012

[platform-dev] Newer/Different version of Xerces?

Cush1978 11/28/2012

[platform-dev] Newer/Different version of Xerces?

Cush1978 11/28/2012

[platform-dev] Newer/Different version of Xerces?

Cush1978 11/30/2012

Project Features

Project Links

About this Project

Platform was started in November 2009, is owned by Antonin Nebuzelsky, and has 138 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close