On Fri, Mar 21, 2014 at 8:34 PM, Nair, Madhu <nair.ma...@aoins.com> wrote:
> Using a JVM system property to specify woodstox as the Stax parser seems to 
> result in a pushback from the server admin to do this. Is there any way we 
> can specify this in Camel?  Woodstox internally uses the Stax and Stax2 jars 
> which have their own version of the Stax parser which seem to be getting 
> loaded before the woodstox implementation. Specifying the implementation in 
> META-INF/services doesn't work in this case since we have multiple 
> implementations. Is there a way besides using the system property to specify 
> this?
>

You can create a bean that sets the JVM system property and call this
bean when your application startup, so the property is set before
Camel startup.



>
>
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ib...@gmail.com]
> Sent: Tuesday, March 18, 2014 12:01 PM
> To: users@camel.apache.org
> Subject: Re: Seeing Info message all over log file related to Woodstox
>
> Hi
>
> Yeah Camel uses
> javax.xml.stream.XMLInputFactory#newInstance()
>
> to get the factory, and that uses that system property to lookup the factory. 
> So you can switch to use woodstock then. Though that is for the entire JVM.
>
> Otherwise it ought to fallback to JAR classpath scanning. But I guess 
> woodstock and other xml parsers have that documented. You can search the web 
> for details. That would allow you to do this for this deployment unit only. 
> And leave the others as-is. In case using a jvm system property is not 
> possible.
>
> On Tue, Mar 18, 2014 at 4:48 PM, Nair, Madhu <nair.ma...@aoins.com> wrote:
>> Thanks for the quick response.  I do have the woodstox jar in the classpath 
>> but still get this message. Do I force Camel to use the woodstox parser by 
>> setting the system property javax.xml.stream.XMLInputFactory to the Woodstox 
>> parser?
>>
>>
>>
>> -----Original Message-----
>> From: Claus Ibsen [mailto:claus.ib...@gmail.com]
>> Sent: Tuesday, March 18, 2014 11:38 AM
>> To: users@camel.apache.org
>> Subject: Re: Seeing Info message all over log file related to Woodstox
>>
>> Hi
>>
>> Yeah we should tone this down, so the INFO logging only happen once
>> https://issues.apache.org/jira/browse/CAMEL-7309
>>
>> To use woodstock you just add it to the classpath i think
>> http://woodstox.codehaus.org/
>>
>> On Tue, Mar 18, 2014 at 3:21 PM, Nair, Madhu <nair.ma...@aoins.com> wrote:
>>> Hi,
>>> I see the following info message all over the log file and it occurs only 
>>> in one environment and not in the other. I am assuming it occurs in one 
>>> environment because of the randomness with which the server loads the jar 
>>> files.
>>>
>>> The message is:-
>>> 2014-03-06 22:23:47,401 | INFO | APPW111A:mmZreRm_-q |
>>> XmlErrorListener | Msg: DOMSource is known to have issues with {0}.
>>> We suggest using Woodstox
>>>
>>>
>>> The concern is with this part of the message "DOMSource is known to
>>> have issues with {0}. We suggest using Woodstox".
>>>
>>> How do I get rid of this message? Looking at the source code for Camel it 
>>> seems like this message occurs since we are not using the Woodstox parser.
>>>
>>> Do I specify to Camel the Stax parser to use by using the system property 
>>> javax.xml.stream.XMLInputFactory? Is there any other way?
>>>
>>>
>>> Camel version is 2.9.2 and application server is WAS 7. JDK is 1.6.
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Madhu
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cib...@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen Make your
>> Camel applications look hawt, try: http://hawt.io
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen Make your Camel 
> applications look hawt, try: http://hawt.io



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to