users@glassfish.java.net

Re: Stax API Conflict

From: Bhakti Mehta <Bhakti.Mehta_at_Sun.COM>
Date: Wed, 17 Oct 2007 16:17:04 -0700

The problem is not with GF. The problem is the JDK. Whenever classes are
present in the rt.jar there is no way to override them other than using
endorsed standards.
You can try with jdk 1.5 and that should work with the delegate or just
use the endorsed.
Regards,
Bhakti

allen_a_george wrote:
> Yes, I'm using JDK 6. I could shift to using an older version of the JDK, or
> I can try out the endorsed standards method.
>
> Isn't the problem however, that glassfish is using its bundled parser
> instead of the parser supplied in my web app?
>
> Regards,
> Allen
>
> Bhakti Mehta wrote:
>
>> Are you using JDK 6? Stax is already integrated in JDK 6 so in that case
>> the only way to override it is using endorsed standards, one way is
>> copying the new stax-api jar to $JAVA_HOME/jre/lib/endorsed?
>> Regards,
>> Bhakti
>>
>> allen_a_george wrote:
>>
>>> Hi,
>>>
>>> I'm trying to deploy a war generated using Apache Muse. Apache Muse
>>> relies
>>> on Axis2. The generated .war bundles all the Axis2 jars, xml parsers,
>>> StaX
>>> apis etc. that the application would use. However, when invoking the web
>>> app, I get the following error:
>>>
>>> description: The server encountered an internal error () that prevented
>>> it
>>> from fulfilling this request.</p>
>>> exception javax.servlet.ServletException: PWC1244: Servlet execution
>>> threw
>>> an exception
>>> root cause
>>>
>>> java.lang.NoSuchMethodError:
>>> javax.xml.stream.XMLOutputFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/stream/XMLOutputFactory;
>>>
>>> Reading around, I _think_ this is because the Java EE 5 RI uses the StaX
>>> 1.0
>>> API, which has a different (buggy) signature for this method.
>>>
>>> I would like to have my deployed web application use the locally bundled,
>>> i.e. in WEB-INF/lib/, parsers and other implementation classes. How
>>> would I
>>> do this?
>>>
>>> Notes:
>>> I thought I could do this by setting <delegate="false"/> in sun-web.xml,
>>> but
>>> that didn't work out...
>>>
>>> Thanks,
>>> Allen
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>>
>>
>
>