  | |  | Performance problem under load - Xerces with Weblogic 9.x | Performance problem under load - Xerces with Weblogic 9.x 2007-06-29 - By Rajesh Balamohan
Thankx for the quick reply Michael. I had a look at "SourceValidator.java" written by you. I will check if its possible to do this way.
We are using SAML and trying to validate it. So hopefully these should be possible to cache.
~Rajesh.B
On 6/29/07, Michael Glavassevich <mrglavas@(protected)> wrote: > > Hi Rajesh, > > If the documents you're parsing refer to the same schema documents you can > significantly improve the performance by doing grammar caching. The JAXP > 1.3 validation API [1] provides a standard mechanism for doing this. > > Thanks. > > [1] > > http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/package -summary.html > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: mrglavas@(protected) > E-mail: mrglavas@(protected) > > "Rajesh Balamohan" <rajesh.balamohan@(protected)> wrote on 06/29/2007 > 04:57:13 AM: > > > Hello Folks, > > > > We are using xerces parser for creating DOM objects. The size of the > > xml is very small in the order or 1 or 2kb. Under load, most of the > > threads in weblogic are blocked like the following. > > > > And the CPU of the box is at 98% in a 4 way box. Looking at the > > stacktrace below, I find that most of the time is spent in schema > > loading. There are lots of threads with similar stack trace. Are > > there any known workarounds for this problem?. > > > > Is there a way to improve the XMLSchemaLoader? > > > > The options we use during XML parser creation is as follows.. (Any > > help on this issue would be of great help folks). > > > > // Build a parser to order. > > p = new DOMParser(); > > p.setFeature("http://xml.org/sax/features/validation > > ", true); > > p.setFeature ("http://apache. > > org/xml/features/validation/schema", true); > > p.setFeature(" http://apache. > > org/xml/features/validation/schema/normalized-value", false); > > p.setFeature("http://apache. > > org/xml/features/dom/defer-node-expansion ", false); > > > > p.setEntityResolver(this); > > p.setErrorHandler(this); > > > > "[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default > > (self-tuning)'" daemon prio=6 tid=0x54777e60 nid=0x138 > > 0 waiting for monitor entry [0x544bf000..0x544bfb9c] > > at java.util.Hashtable.get(Hashtable.java:335) > > - waiting to lock <0x0c54f0f8> (a java.util.Hashtable) > > at org.apache.xerces.impl.xs.traversers.XSAttributeChecker. > > checkAttributes (Unknown Source) > > at org.apache.xerces.impl.xs.traversers.XSAttributeChecker. > > checkAttributes(Unknown Source) > > at org.apache.xerces.impl.xs.traversers. > > XSDWildcardTraverser.traverseAny(Unknown Source) > > at org.apache.xerces.impl.xs.traversers. > > XSDAbstractParticleTraverser.traverseSeqChoice(Unknown Source) > > at org.apache.xerces.impl.xs.traversers. > > XSDAbstractParticleTraverser.traverseSequence(Unknown Source) > > at org.apache.xerces.impl.xs.traversers. > > XSDComplexTypeTraverser.processComplexContent(Unknown Source) > > at org.apache.xerces.impl.xs.traversers. > > XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown Source) > > at org.apache.xerces.impl.xs.traversers. > > XSDComplexTypeTraverser.traverseGlobal(Unknown Source) > > at org.apache.xerces.impl.xs.traversers.XSDHandler. > > getGlobalDecl(Unknown Source) > > at org.apache.xerces.impl.xs.traversers.XSDElementTraverser. > > traverseNamedElement (Unknown Source) > > at org.apache.xerces.impl.xs.traversers.XSDElementTraverser. > > traverseGlobal(Unknown Source) > > at org.apache.xerces.impl.xs.traversers.XSDHandler. > > traverseSchemas(Unknown Source) > > at org.apache.xerces.impl.xs.traversers.XSDHandler. > > parseSchema(Unknown Source) > > at org.apache.xerces.impl.xs.XMLSchemaLoader. > > loadSchema(Unknown Source) > > at org.apache.xerces.impl.xs.XMLSchemaValidator. > > findSchemaGrammar (Unknown Source) > > at org.apache.xerces.impl.xs.XMLSchemaValidator. > > handleStartElement(Unknown Source) > > at org.apache.xerces.impl.xs.XMLSchemaValidator. > > startElement(Unknown Source) > > at org.apache.xerces.impl.XMLNSDocumentScannerImpl. > > scanStartElement (Unknown Source) > > at org.apache.xerces.impl. > > XMLNSDocumentScannerImpl$NSContentDispatcher. > > scanRootElementHook(Unknown Source) > > at org.apache.xerces.impl. > > XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch > > (Unknown Source) > > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl. > > scanDocument(Unknown Source) > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > > at org.apache.xerces.parsers.XML11Configuration.parse (Unknown > Source) > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) > > > > -- > > ~Rajesh.B > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-dev-unsubscribe@(protected) > For additional commands, e-mail: j-dev-help@(protected) > >
-- ~Rajesh.B
Thankx for the quick reply Michael. I had a look at "SourceValidator.java " written by you. I will check if its possible to do this way.<br><br>We are using SAML and trying to validate it. So hopefully these should be possible to cache. <br><br>~Rajesh.B<br><br><div><span class="gmail_quote">On 6/29/07, <b class= "gmail_sendername">Michael Glavassevich</b> <<a href="mailto:mrglavas@(protected) .com">mrglavas@(protected)</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi Rajesh,<br><br>If the documents you're parsing refer to the same schema documents you can<br>significantly improve the performance by doing grammar caching. The JAXP<br>1.3 validation API [1] provides a standard mechanism for doing this. <br><br>Thanks.<br><br>[1]<br><a href="http://xerces.apache.org/xerces2-j /javadocs/api/javax/xml/validation/package-summary.html">http://xerces.apache .org/xerces2-j/javadocs/api/javax/xml/validation/package-summary.html</a> <br><br>Michael Glavassevich<br>XML Parser Development<br>IBM Toronto Lab<br>E -mail: <a href="mailto:mrglavas@(protected)">mrglavas@(protected)</a><br>E-mail: <a href="mailto:mrglavas@(protected)">mrglavas@(protected)</a><br> <br>"Rajesh Balamohan" <<a href="mailto:rajesh.balamohan@(protected) ">rajesh.balamohan@(protected)</a>> wrote on 06/29/2007<br>04:57:13 AM:<br><br> > Hello Folks,<br>><br>> We are using xerces parser for creating DOM objects. The size of the <br>> xml is very small in the order or 1 or 2kb. Under load, most of the<br >> threads in weblogic are blocked like the following.<br>><br>> And the CPU of the box is at 98% in a 4 way box. Looking at the<br>> stacktrace below, I find that most of the time is spent in schema <br>> loading. There are lots of threads with similar stack trace. Are<br> > there any known workarounds for this problem?.<br>><br>> Is there a way to improve the XMLSchemaLoader?<br>><br>> The options we use during XML parser creation is as follows.. (Any <br>> help on this issue would be of great help folks).<br>><br>>  ; // Build a parser to order.<br>> p = new DOMParser();<br>> p.setFeature("<a href="http://xml.org /sax/features/validation"> http://xml.org/sax/features/validation</a><br>> ", true);<br>> p.setFeature ("<a href="http://apache" >http://apache</a>.<br>> org/xml/features/validation/schema", true);<br> > p.setFeature(" <a href="http://apache">http://apache</a>.<br>> org/xml /features/validation/schema/normalized-value", false);<br>> p.setFeature("<a href="http://apache">http:/ /apache </a>.<br>> org/xml/features/dom/defer-node-expansion ", false);<br>> <br>> p.setEntityResolver(this);<br> > p.setErrorHandler(this);<br>> ;<br>> "[ACTIVE] ExecuteThread: '12' for queue: ' weblogic.kernel.Default<br>> (self-tuning)'" daemon prio=6 tid =0x54777e60 nid=0x138<br>> 0 waiting for monitor entry [0x544bf000. .0x544bfb9c]<br>> at java .util.Hashtable.get(Hashtable.java:335)<br> > - waiting to lock < ;0x0c54f0f8> (a java.util.Hashtable)<br>> at org.apache.xerces.impl.xs.traversers.XSAttributeChecker. <br>> checkAttributes (Unknown Source)<br>> at org.apache.xerces.impl.xs.traversers.XSAttributeChecker .<br>> checkAttributes(Unknown Source)<br>> at org.apache.xerces.impl.xs.traversers.<br>> XSDWildcardTraverser.traverseAny(Unknown Source)<br>>   ; at org.apache.xerces.impl.xs.traversers.<br>> XSDAbstractParticleTraverser.traverseSeqChoice(Unknown Source)<br>> at org.apache.xerces.impl.xs .traversers.<br>> XSDAbstractParticleTraverser.traverseSequence(Unknown Source)<br>> at org.apache .xerces.impl.xs.traversers .<br>> XSDComplexTypeTraverser.processComplexContent(Unknown Source)<br>> at org.apache.xerces.impl.xs .traversers.<br>> XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown Source)<br>> at org.apache .xerces.impl.xs.traversers .<br>> XSDComplexTypeTraverser.traverseGlobal(Unknown Source)<br>> at org.apache.xerces.impl.xs .traversers.XSDHandler.<br>> getGlobalDecl(Unknown Source)<br>>   ; at org.apache.xerces.impl.xs.traversers .XSDElementTraverser .<br>> traverseNamedElement (Unknown Source)<br>> at org.apache.xerces.impl.xs.traversers .XSDElementTraverser.<br>> traverseGlobal(Unknown Source)<br>> at org.apache.xerces.impl.xs.traversers .XSDHandler .<br>> traverseSchemas(Unknown Source)<br>> at org.apache.xerces.impl.xs.traversers.XSDHandler.<br>> parseSchema(Unknown Source)<br>> at org.apache.xerces.impl.xs.XMLSchemaLoader.<br>> loadSchema(Unknown Source) <br>> at org.apache.xerces .impl.xs.XMLSchemaValidator.<br>> findSchemaGrammar (Unknown Source)<br>> at org.apache.xerces.impl.xs .XMLSchemaValidator.<br>> handleStartElement(Unknown Source)<br>> at org.apache.xerces.impl.xs.XMLSchemaValidator.<br>> startElement(Unknown Source)<br>> at org.apache .xerces.impl.XMLNSDocumentScannerImpl.<br>> scanStartElement (Unknown Source) <br>> at org.apache.xerces .impl .<br>> XMLNSDocumentScannerImpl$NSContentDispatcher.<br>> scanRootElementHook(Unknown Source)<br>> at org.apache.xerces.impl.<br>> XMLDocumentFragmentScannerImpl $FragmentContentDispatcher.dispatch<br>> (Unknown Source) <br>> at org.apache.xerces .impl.XMLDocumentFragmentScannerImpl.<br>> scanDocument(Unknown Source)<br> > at org.apache.xerces .parsers.XML11Configuration.parse(Unknown<br>Source)<br>> at org.apache.xerces.parsers.XML11Configuration .parse (Unknown<br>Source)<br>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)<br>> at org.apache.xerces.parsers.DOMParser .parse(Unknown Source)<br>><br>> --<br>> ~Rajesh.B<br><br>------------- -------------------------------------------------------- <br>To unsubscribe, e-mail: <a href="mailto:j-dev-unsubscribe@(protected) ">j-dev-unsubscribe@(protected)</a><br>For additional commands, e-mail: <a href="mailto:j-dev-help@(protected)">j-dev-help@(protected) </a><br><br></blockquote></div><br><br clear="all"><br>-- <br>~Rajesh.B
|
|
 |