users@glassfish.java.net

Re: Using Xalan native jars in Glassfish V3 - WHY?

From: Sanjeeb Sahoo <Sahoo_at_Sun.COM>
Date: Fri, 05 Nov 2010 23:53:42 +0530

Have you actually verified Apache Xalan contains
com.sun.org.apache.xalan classes? I doubt.

I have already told that you can place your JAXP parser implementation
in glassfish/lib/endorsed to override platform supplied one.

The error makes me think that some code has coded the provider name as
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl, so
no matter what you configure somewhere else, it's not going to work. I
could be wrong, because I am guessing from the limited information
supplied here. I am copying admin console engineer who should be able to
tell why they need com.sun.org.apache classes. More over, can you post
the stack trace?

Sahoo
On Thursday 04 November 2010 10:40 PM, Pete Helgren wrote:
> My prior post may not have made it back to the list so I am reposting
> as I need to resolve this soon:
>
> The IBM J9 JVM that I have to use doesn't contain the
> com.sun.org.apache.xalan.* classes as far as I can tell and that
> causes the Administration Console to fail. So I was going to
> "manually" include them. *Just* for Glassfish.
>
> So I still need to know: Where do I put the jars? What configuration
> changes/directives do I need to make?
>
> The jvm-options entry is in the email below . I put the jars in
> several different places to no avail. The error still points to
> missing xalan classes that are only found in Sun's implementation of
> the JVM:
>
> javax.xml.transform.TransformerFactoryConfigurationError: Provider
> com. sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
> not found
>
> Just need to implement the standalone Xalan from Apache to work around
> this issue. How do I do that?
>
> Pete Helgren
> Value Added Software, Inc
> www.asaap.com
> www.opensource4i.com
>
>
> On 10/29/2010 8:29 PM, Sanjeeb Sahoo wrote:
>> Can you elaborate why you have to use a different JAXP
>> implementation? Do you want to replace it JVM wide or you want it to
>> be used only by some applications? If you want JVM wide, then you can
>> place the jar in glassfish/lib/endorsed or glassfish/lib/ext.
>>
>> On Saturday 30 October 2010 03:07 AM, Pete Helgren wrote:
>>> I have posted this as part of a problem with the Administration
>>> Console but perhaps this approach will bear more fruit:
>>>
>>> Because of the JVM I am using, I have to include the native Xalan
>>> jars from Apache rather than relying on the ones in Java 6. Can
>>> anyone give me a pointer or two on how to accompish that in
>>> Glassfish V3? I *think* I need to add the following to the
>>> java-config section of the domain.xml:
>>>
>>> <jvm-options>-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl</jvm-options>
>>>
>>>
>>> What I am having difficulty with is where to place the jar so that
>>> they will be picked up in the classpath. Where should they go?
>>>
>>> Thanks
>>>
>>
>>