Description

In wfs/src/main/java/org/geoserver/wfs/xml/GML2OutputFormat.java on line 144-145 the XML Transformer factory is being set System wide via System.setProperty(...). Because this property is set JVM wide it cripples Weblogic's Admin capabilities (even startup and shutdown) since it tries to instantiate the TransformerFactory when it doesn't have the specific TransformerFactory class in its classpath.

Activity

I guess you're right we shouldn't be tied to any specific xml api impl.
Setting the expected transformer factory impl via System.setProperty is there since the early days of geoserver, and since the reason is not documented I don't know if there is a specific need to expect that one, though as said, we shouldn't be doing that. That to say it is pretty much possible that the guilty for that line of code being there can well be myself... Or at least I remember letting it there because it scared me to remove it...

Now, I know there are at least one more place where a specific xml impl is referenced, this time through direct invocation, so it becomes a hard dependency over xerces. Guess it is the xml Encoder in geotools which directly calls xerces' XMLSerializer.

So the question is two fold:

does anybody knows if it is safe to remove the call to System.setProperty?

Gabriel Roldan
added a comment - 18/May/07 3:33 AM I guess you're right we shouldn't be tied to any specific xml api impl.
Setting the expected transformer factory impl via System.setProperty is there since the early days of geoserver, and since the reason is not documented I don't know if there is a specific need to expect that one, though as said, we shouldn't be doing that. That to say it is pretty much possible that the guilty for that line of code being there can well be myself... Or at least I remember letting it there because it scared me to remove it...
Now, I know there are at least one more place where a specific xml impl is referenced, this time through direct invocation, so it becomes a hard dependency over xerces. Guess it is the xml Encoder in geotools which directly calls xerces' XMLSerializer.
So the question is two fold:
does anybody knows if it is safe to remove the call to System.setProperty?
should we require no hard dependencies over a xml impl library?

Thankfully this time something XML related is not my fault . I am not
sure why that line is there... but +1 on removing it. It would be good
if we could verify that it does not break anything, testing cite in a
servlet container and in jetty.

Ben Caradoc-Davies wrote:
> Justin,
>
> is there any reason why we should not get rid of a troublesome Xalan
> System.setProperty in GML2OutputFormat?
> http://jira.codehaus.org/browse/GEOS-1094
>
> Kind regards,
>

Andrea Aime
added a comment - 04/Dec/09 5:46 AM Bouiaw, the 1.7.x series is dead, we won't make releases unless there is specific funding to do so. But you can still checkout the soruces, apply the patch youself and build GeoServer