is it possible for me to have a separate resource loader for .xsb? it
looks like JNLP class loader is not thread safe. It is trying to call
"put" on HashMap but hash map is not thread safe. It may cause the CPU
to spin. Please advice and it is really appreciated. We are really happy
with xml bean performance but this issue is causing lot of noise on our
side.
 
Thanks for your time.

________________________________

From: Mohan Thurairajah 
Sent: Wednesday, June 04, 2008 1:39 AM
To: dev@xmlbeans.apache.org
Subject: RE: Help with XML Beans


In this case: two threads are parsing two different byte arrays to
generate java objects. yes, xml bean is looking for a .xsb resource but
it is spinning. I don't set unsync option, so what is the default
behavior?
 
we use xml beans 2.3.

we don't validate the using xml bean. What we have is server is
generating xml using xml beans and send it over http. The client is
reading it off the output stream and generate bytes array and try to
parse using xml beans.
________________________________

From: Jacob Danner [mailto:[EMAIL PROTECTED]
Sent: Wed 6/4/2008 1:26 AM
To: dev@xmlbeans.apache.org
Subject: Re: Help with XML Beans



So your application is "generating xml messages or parsing byte arrays
to generate java objects"? Can you determine which one? From the stack
trace you posted is looked like XMLBeans is trying to resolve
something from the SchemaTypeSystem and the hang is caused by the way
JNLP is getting the resource. Can you confirm? Which resource is it
trying to get?

What is the option you have set for
http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlO
ptions.html#setUnsynchronized()

Which version are you using?

Is it possibly related to:
http://issues.apache.org/jira/browse/XMLBEANS-46
http://issues.apache.org/jira/browse/XMLBEANS-328
http://issues.apache.org/jira/browse/XMLBEANS-345
(it didn't look related, but I thought I'd mention anyways)

-jacobd


On Tue, Jun 3, 2008 at 10:05 PM, Mohan Thurairajah
<[EMAIL PROTECTED]> wrote:
>
> Thanks for the quick reply. cpu is at 100% and we needs to restart the
> application. it is very hard to reproduce at times as well. The swing
gui is
> generating xml messages or parsing byte arrays to generate java
objects.
> ________________________________
> From: Jacob Danner [mailto:[EMAIL PROTECTED]
> Sent: Wed 6/4/2008 1:02 AM
> To: dev@xmlbeans.apache.org
> Subject: Re: Help with XML Beans
>
> What is happening in your application when this issue occurs?
> -jacobd
>
> On Tue, Jun 3, 2008 at 9:57 PM, Mohan Thurairajah
> <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> We are using XML Beans in a multithreaded environment. We use
webstart and
>> xml beans on the client side. It looks like xml beans is having
trouble
>> with
>> jnlp class loader and it is causing two or more threads to spin 100%
CPU.
>> Could you help plz? we need to go to prod soon but this is causing
lots of
>> trouble:
>>
>> "HB-Requestor" daemon prio=6 tid=0x0478cc00 nid=0x1110 runnable
>> [0x0612e000..0x0612fd14]
>>    java.lang.Thread.State: RUNNABLE
>> at java.util.HashMap.put(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry.access$300(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry$2.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at com.sun.deploy.cache.CacheEntry.getJarFile(Unknown Source)
>> at com.sun.deploy.net.DownloadEngine.getCachedJarFile(Unknown Source)
>> at com.sun.deploy.net.DownloadEngine.getCachedJarFile(Unknown Source)
>> at com.sun.jnlp.JNLPClassLoader$3.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at com.sun.jnlp.JNLPClassLoader.getJarFile(Unknown Source)
>> at com.sun.jnlp.JNLPCachedJarURLConnection.connect(Unknown Source)
>> at com.sun.jnlp.JNLPCachedJarURLConnection.getInputStream(Unknown
Source)
>> at java.net.URL.openStream(Unknown Source)
>> at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.crackEntry(SchemaTy
peLoaderImpl.java:337)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.typeSystemForCompon
ent(SchemaTypeLoaderImpl.java:256)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.findDocumentTypeRef
(SchemaTypeLoaderImpl.java:430)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.findDocumentType(Sc
hemaTypeLoaderBase.java:129)
>> at
org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:312)
>> at
>>
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1273)
>> at
>>
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
>> - locked <0x078a0500> (a org.apache.xmlbeans.impl.store.Locale)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoa
derBase.java:345)
>> at org.fixprotocol.fixml50.FIXMLDocument$Factory.parse(Unknown
Source)
>> at
>>
>>
com.cpex.ptms.gateway.FixMLGatewayMessageFactory.createGatewayMessage(Fi
xMLGatewayMessageFactory.java:131)
>> at
>>
>>
com.cpex.ptms.gateway.transport.AbstractGatewayConnection.receive(Abstra
ctGatewayConnection.java:56)
>> at
>>
>>
com.cpex.ptms.gateway.client.ClientGateway.sendAndReceive(ClientGateway.
java:314)
>> at
>>
>>
com.cpex.ptms.gateway.client.ClientGateway.marshalSendAndReceive(ClientG
ateway.java:237)
>> at
>>
>>
com.cpex.ptms.gateway.client.ClientGateway.marshalSendAndReceive(ClientG
ateway.java:230)
>> at
>>
>>
com.cpex.ptms.gateway.client.ClientGateway.marshalSendAndReceive(ClientG
ateway.java:220)
>> at
>>
>>
com.cpex.ptms.client.gateway.HeartBeatManager$HeartBeatRequestor.run(Hea
rtBeatManager.java:279)
>> at java.lang.Thread.run(Unknown Source)
>>
>> "HB-Monitor" daemon prio=6 tid=0x0478b800 nid=0x12b4 waiting on
condition
>> [0x04c3f000..0x04c3fd94]
>>    java.lang.Thread.State: TIMED_WAITING (sleeping)
>> at java.lang.Thread.sleep(Native Method)
>> at
>>
>>
com.cpex.ptms.client.gateway.HeartBeatManager$1.run(HeartBeatManager.jav
a:130)
>> at java.lang.Thread.run(Unknown Source)
>>
>> "PTMSStreamer" prio=6 tid=0x031d4400 nid=0x970 runnable
>> [0x033de000..0x033dfa14]
>>    java.lang.Thread.State: RUNNABLE
>> at java.util.HashMap.put(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry.access$300(Unknown Source)
>> at com.sun.deploy.cache.CacheEntry$2.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at com.sun.deploy.cache.CacheEntry.getJarFile(Unknown Source)
>> at com.sun.deploy.net.DownloadEngine.getCachedJarFile(Unknown Source)
>> at com.sun.deploy.net.DownloadEngine.getCachedJarFile(Unknown Source)
>> at com.sun.jnlp.JNLPClassLoader$3.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at com.sun.jnlp.JNLPClassLoader.getJarFile(Unknown Source)
>> at com.sun.jnlp.JNLPCachedJarURLConnection.connect(Unknown Source)
>> at com.sun.jnlp.JNLPCachedJarURLConnection.getInputStream(Unknown
Source)
>> at java.net.URL.openStream(Unknown Source)
>> at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.crackEntry(SchemaTy
peLoaderImpl.java:337)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.typeSystemForCompon
ent(SchemaTypeLoaderImpl.java:256)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.findElementRef(Sche
maTypeLoaderImpl.java:480)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.findElement(SchemaT
ypeLoaderBase.java:169)
>> at
>>
>>
org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaT
ypeImpl.java:970)
>> at
>>
>>
org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObj
ectBase.java:893)
>> at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1657)
>> at
org.apache.xmlbeans.impl.store.Xobj.find_element_user(Xobj.java:2071)
>> at
>>
>>
org.fixprotocol.fixml50.impl.FIXMLDocumentImpl$FIXMLImpl.getMessage(Unkn
own
>> Source)
>> - locked <0x132f39d8> (a org.apache.xmlbeans.impl.store.Locale)
>> at
>>
>>
com.cpex.ptms.gateway.client.ClientGateway.startStreamer(ClientGateway.j
ava:440)
>> at
>>
>>
com.cpex.ptms.gateway.client.ClientGateway.startStreamer(ClientGateway.j
ava:383)
>> at
>>
>>
com.cpex.ptms.gateway.client.ClientGateway.startStreamer(ClientGateway.j
ava:370)
>> at
>>
>>
com.cpex.ptms.client.gateway.FixMLClientGateway.startStreamerConnection(
FixMLClientGateway.java:44)
>> at
>>
>>
com.cpex.ptms.client.service.PtmsClientServiceImpl.startStreamerConnecti
on(PtmsClientServiceImpl.java:176)
>> at app.Comm.PtmsMsgHandler$3.run(PtmsMsgHandler.java:368)
>> at java.lang.Thread.run(Unknown Source)
>> Thanks,
>> Mohan
>>
>> Mohan Thurairajah - Manager, Development
>> IntercontinentalExchange | ICE
>> 2100 RiverEdge Pkwy | 5th Floor | Atlanta, GA 30328
>> Tel: 770.738.2148 | Fax: 770.951.1307
>> [EMAIL PROTECTED]
>>
>> 24-hour ice helpdesk 770.738.2101
>> www.theice.com
>>
>> ________________________________
>>
>> This message may contain confidential information and is intended for
>> specific recipients unless explicitly noted otherwise. If you have
reason
>> to
>> believe you are not an intended recipient of this message, please
delete
>> it
>> and notify the sender. This message may not represent the opinion of
>> IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates,
and
>> does not constitute a contract or guarantee. Unencrypted electronic
mail
>> is
>> not secure and the recipient of this message is expected to provide
>> safeguards from viruses and pursue alternate means of communication
where
>> privacy or a binding message is desired.
>
>
>
> --
> I'm competing in a Half-Ironman distance triathlon to raise money for
> the fight against cancer!
> Please help support my efforts by going to:
> http://www.active.com/donate/tntwaak/jacobd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ________________________________
>
> This message may contain confidential information and is intended for
> specific recipients unless explicitly noted otherwise. If you have
reason to
> believe you are not an intended recipient of this message, please
delete it
> and notify the sender. This message may not represent the opinion of
> IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates,
and
> does not constitute a contract or guarantee. Unencrypted electronic
mail is
> not secure and the recipient of this message is expected to provide
> safeguards from viruses and pursue alternate means of communication
where
> privacy or a binding message is desired.



--
I'm competing in a Half-Ironman distance triathlon to raise money for
the fight against cancer!
Please help support my efforts by going to:
http://www.active.com/donate/tntwaak/jacobd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
--------------------------------------------------------
This message may contain confidential information and is intended for specific 
recipients unless explicitly noted otherwise. If you have reason to believe you 
are not an intended recipient of this message, please delete it and notify the 
sender. This message may not represent the opinion of IntercontinentalExchange, 
Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract 
or guarantee. Unencrypted electronic mail is not secure and the recipient of 
this message is expected to provide safeguards from viruses and pursue 
alternate means of communication where privacy or a binding message is desired.

Reply via email to