I am having a strange problem with the translator ... the problem
seems to be related to the way Xerces has been used in the translator
...
I noticed that it is not invoked using JAXP but rather Xerces has been
used directly ... and since Xerces is also used by the editor ... this
leads to all kinds of classloader related exceptions as the JVM tries
to instantiate a second Xerces while one has already been loaded by
the editor class-loader ... This means i have to use a threadcontext
class loader ... or use a special classloader to run the translator in
its own classloader space (with its own classpath etc...)
There are 2 possible solutions ... either downgrade to Xerces 2.6 or
switch to using JAXP as the interface for accessing the Xml parser ...
Do you have any other ideas / suggestions ?
Ashok
You wouldnt have this problem because the unit-tests for the
translator are run in isolation independent of an external calling
application.
I am testing a custom post-operative url-classloader for integratiung
the translator now ... so it loads the translator in a different
classpath space than the editor ....
this will most probably work ... at least according to the simple test
cases i have done... it just means we have to package the translator
with its own libraries -- and load them independently of the main
application (the editor). the only limitation could be we cannot be
able to share complex objects between the editor and the translator
(which we are not doing at the moment anyway)
> So, the better way to use that is to ask produce the sections file at run
> time (i think that the validation class can do it) but I need to have the
> extractor library as a simple java library instead of a runnable
> application.
Sure i can ... let me just repackage it slightly and upload it into svn.
Ashok