Subjects
Home
VOTE Move XML Commons to Xerces
Commented: (XERCESJ 589) Bug with pattern restriction on long strings
: Xerces J 2 8 1 Release on Wednesday, September 13th
: Xerces J 2 9 0 Release on Wednesday, November 22nd
Commented: (XERCESJ 1066) Restriction+choice+substitutionGroup error
Commented: (XERCESJ 1178) Error getting prefix for an attribute with no n
Updated: (XERCESJ 1244) XMLSchemaValidator does not contribute element 's
Some consideration about the xerces DOM implementation
Updated: (XERCESJ 1066) Restriction+choice+substitutionGroup error
Commented: (XERCESJ 1227) Poor performance / OutOfMemoryError for sequenc
retain exception stack traces
Updated: (XERCESJ 1193) NPE or hang when parsing using the "continue afte
Future of NekoHTML
Commented: (XERCESJ 1203) NPE in XMLDTDProcessor
DOM Level 3 APIs for Xalan J and a new Xalan release (2 7 1)
: xml commons external 1 3 04 Release on Wednesday, November 22nd
Commented: (XERCESJ 1247) Incorrect location information on SAX when usin
XInclude exceptions how to mirror Xerces J functionality into Xerces C++?
First proposal on SoC project "Add support for the StAX (JSR 173) cursor API
: xml commons resolver 1 2 Release on Wednesday, November 22nd
Typo in RangeToken java Please check
Validator features
java lang ClassCastException when adopting Node
using the org apache xerces impl xs identity package
Updated: (XERCESJ 1257) buffer overflow in UTF8Reader for characters out
Problem with ref attributes and schema validation
Updated: (XERCESJ 122) XMLSchemaValidator does not contribute element 's d
Performance problem under load Xerces with Weblogic 9 x
remove ignored memory allocation
Commented: (XERCESJ 1177) SAXXMLStreamReader doesn 't always report namesp
Commented: (XERCESJ 977) Null pointer exception during DOM parsing
Commented: (XERCESJ 1197) Code cleanup for org apache xml serialize
Commented: (XERCESJ 1201) Initial contribution for StAX Event API
Updated: (XERCESJ 1061) Regex "$ " and "^ " characters treated as special c
Commented: (XERCESJ 1199) SAXXMLStreamReader should attempt to register a
Commented: (XERCESJ 1061) Regex "$ " and "^ " characters treated as special
Updated: (XERCESJ 589) Bug with pattern restriction on long strings
StackOverflow
xerces Range unnecessarily not garbage collectable if not detached
Updated: (XERCESJ 1178) Error getting prefix for an attribute with no nam
Bug in xs:redefine
Commented: (XERCESJ 1204) Can not set XMLEntityResolver for LSParser
Updated: (XERCESJ 1253) Prototype for SoC2007 project "Add support for th
Updated: (XERCESJ 1259) Add SteamFilter Function to SoC2007 project "Add
Assigned: (XERCESJ 444) SAXException thrown by EntityResolver is reported
Google Summer of Code 2007
Xerces J and XInclude relative path issue
Assigned: (XERCESJ 206) Stack overflow when using a schema validation
Commented: (XERCESJ 1215) Restrictions involving two levels of substituti
Closed: (XERCESJ 1203) NPE in XMLDTDProcessor
non overriding equals methoda
Resolved: (XERCESJ 1079) invalid value returned for TOTALDIGITS facet in
Xerces AS3 port
Updated: (XERCESJ 325) Regular Expression; Pattern "| " clause order de
Updated: (XERCESJ 1196) Javadoc generation fails on Java SE 5 0
Closed: (XERCESJ 1202) DTD validation on XIncluded documents when the sch
Created: (XERCESJ 1124) Nonspecific schema error message
a bug in xerces
Updated: (XERCESJ 1201) Initial contribution for StAX Event API
Closed: (XERCESJ 1254) Empty uris in targetNamespace attribute not report
Links
Home
Oracle database error code
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Performance problem under load - Xerces with Weblogic 9.x

Performance problem under load - Xerces with Weblogic 9.x

2007-06-29       - By Rajesh Balamohan
Reply:     1     2     3  

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 &quot;SourceValidator.java
&quot; 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> &lt;<a href="mailto:mrglavas@(protected)
.com">mrglavas@(protected)</a>&gt; 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&#39;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>&quot;Rajesh Balamohan&quot; &lt;<a href="mailto:rajesh.balamohan@(protected)
">rajesh.balamohan@(protected)</a>&gt; wrote on 06/29/2007<br>04:57:13 AM:<br><br>
&gt; Hello Folks,<br>&gt;<br>&gt; We are using xerces parser for creating DOM
objects. The size of the
<br>&gt; xml is very small in the order or 1 or 2kb. Under load, most of the<br
>&gt; threads in weblogic are blocked like the following.<br>&gt;<br>&gt; And
the CPU of the box is at 98% in a 4 way box. Looking at the<br>&gt; stacktrace
below, I find that most of the time is spent in schema
<br>&gt; loading. There are lots of threads with similar stack trace. Are<br>
&gt; there any known workarounds for this problem?.<br>&gt;<br>&gt; Is there a
way to improve the XMLSchemaLoader?<br>&gt;<br>&gt; The options we use during
XML parser creation is as follows.. (Any
<br>&gt; help on this issue would be of great help folks).<br>&gt;<br>&gt;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Build a parser to order.<br>&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = new DOMParser();<br>&gt;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.setFeature(&quot;<a href="http://xml.org
/sax/features/validation">
http://xml.org/sax/features/validation</a><br>&gt; &quot;, true);<br>&gt;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.setFeature (&quot;<a href="http://apache"
>http://apache</a>.<br>&gt; org/xml/features/validation/schema&quot;, true);<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
p.setFeature(&quot; <a href="http://apache">http://apache</a>.<br>&gt; org/xml
/features/validation/schema/normalized-value&quot;, false);<br>&gt;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.setFeature(&quot;<a href="http://apache">http:/
/apache
</a>.<br>&gt; org/xml/features/dom/defer-node-expansion &quot;, false);<br>&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.setEntityResolver(this);<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.setErrorHandler(this);<br>&gt
;<br>&gt; &quot;[ACTIVE] ExecuteThread: &#39;12&#39; for queue: &#39;
weblogic.kernel.Default<br>&gt; (self-tuning)&#39;&quot; daemon prio=6 tid
=0x54777e60 nid=0x138<br>&gt; 0 waiting for monitor entry [0x544bf000.
.0x544bfb9c]<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java
.util.Hashtable.get(Hashtable.java:335)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - waiting to lock &lt
;0x0c54f0f8&gt; (a java.util.Hashtable)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers.XSAttributeChecker.
<br>&gt; checkAttributes (Unknown Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers.XSAttributeChecker
.<br>&gt; checkAttributes(Unknown Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers.<br>&gt;
XSDWildcardTraverser.traverseAny(Unknown Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers.<br>&gt;
XSDAbstractParticleTraverser.traverseSeqChoice(Unknown Source)<br>&gt;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs
.traversers.<br>&gt; XSDAbstractParticleTraverser.traverseSequence(Unknown
Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache
.xerces.impl.xs.traversers
.<br>&gt; XSDComplexTypeTraverser.processComplexContent(Unknown Source)<br>&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs
.traversers.<br>&gt; XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown
Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache
.xerces.impl.xs.traversers
.<br>&gt; XSDComplexTypeTraverser.traverseGlobal(Unknown Source)<br>&gt;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs
.traversers.XSDHandler.<br>&gt; getGlobalDecl(Unknown Source)<br>&gt;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers
.XSDElementTraverser
.<br>&gt; traverseNamedElement (Unknown Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers
.XSDElementTraverser.<br>&gt; traverseGlobal(Unknown Source)<br>&gt;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers
.XSDHandler
.<br>&gt; traverseSchemas(Unknown Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs.traversers.XSDHandler.<br>&gt;
parseSchema(Unknown Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; at org.apache.xerces.impl.xs.XMLSchemaLoader.<br>&gt; loadSchema(Unknown
Source)
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces
.impl.xs.XMLSchemaValidator.<br>&gt; findSchemaGrammar (Unknown Source)<br>&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.impl.xs
.XMLSchemaValidator.<br>&gt; handleStartElement(Unknown Source)<br>&gt;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.xerces.impl.xs.XMLSchemaValidator.<br>&gt; startElement(Unknown
Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache
.xerces.impl.XMLNSDocumentScannerImpl.<br>&gt; scanStartElement (Unknown Source)
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces
.impl
.<br>&gt; XMLNSDocumentScannerImpl$NSContentDispatcher.<br>&gt;
scanRootElementHook(Unknown Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; at org.apache.xerces.impl.<br>&gt; XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch<br>&gt; (Unknown Source)
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces
.impl.XMLDocumentFragmentScannerImpl.<br>&gt; scanDocument(Unknown Source)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces
.parsers.XML11Configuration.parse(Unknown<br>Source)<br>&gt;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.XML11Configuration
.parse
(Unknown<br>Source)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)<br>&gt;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.DOMParser
.parse(Unknown Source)<br>&gt;<br>&gt; --<br>&gt; ~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