axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: Status update: Axis w/Xerces2
Date Tue, 20 Nov 2001 14:07:07 GMT
Ted, Neil,

Here's a sample test case....It's a modified version of sax.Counter. See enclosed patch to
sax.Counter to reproduce the problem with any xml file + xerces2's jar (i used build.xml from
xerces2 to test). If you run the same with Xerces1's jar, you will not see the
NullPointerException. This is due to the URI that is stored...In Xerces2 getURI() returns
null, in
Xerces1 getURI() returns an empty string. If you need more information, shoot me a mail.

Thanks,
dims

--- "Theodore W. Leung" <twleung@sauria.com> wrote:
> Do you have the data valies for p1, p2 and p3 in the startElement method
> below?   Some of the original problems that I fixed in the X2 DOM were
> related to namespaces.  It would be good to know which element in the
> input document was causing the problem, and to know whether a prefixed
> attribute was involved.
> 
> Ted
> 
> On Mon, 2001-11-19 at 12:12, Sam Ruby wrote:
> > Doing performance measurements w/Xerces1, we are finding that approximately
> > 40% of the time is being spent in the parser.  Clearly this represents a
> > fertile  opportunity for improvment.  Measuring the same workloads with
> > Crimson resulted in a slight degradation.
> > 
> > I would like to measure Xerces2 and explore both XNI and constructing a
> > minimal pipeline which eliminates any unnecessary overhead (e.g., DTD
> > validation), but I am still unable to progress past the following problems
> > exposed by the unit tests.  Debugging, it looks like the Axis code which
> > causes the problem down stream is as follows:
> > 
> >        public int startElement(String p1, String p2, String p3, org.xml.sax.Attributes
p4) {
> >            if (numattrs == attrs.length) {
> >                Object[] nattrs = new Object[numattrs * 2];
> >                System.arraycopy(attrs, 0, nattrs, 0, numattrs);
> >                attrs = nattrs;
> >            }
> > 
> >            attrs[numattrs++] = new AttributesImpl(p4);
> >            return events.add(STATE_START_ELEMENT, st.addSymbol(p1), st.addSymbol(p2),
> st.addSymbol(p3), numattrs-1);
> >        }
> > 
> > Later attempts to reference the copied attributes results in:
> > 
> >      java.lang.NullPointerException
> >      at org.xml.sax.helpers.AttributesImpl.getValue(Unknown Source)
> >      at
>
org.apache.axis.encoding.DeserializationContext.getTypeFromAttributes(DeserializationContext.java:301)
> >      at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:160)
> >      at
> org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:606)
> >      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
> >      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:387)
> >      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:115)
> >      at org.apache.axis.message.RPCElement.getParam(RPCElement.java:124)
> >      at test.encoding.TestSer.doTestData(TestSer.java:87)
> >      at test.encoding.TestSer.testDataWithHrefs(TestSer.java:44)
> >      at java.lang.reflect.Method.invoke(Native Method)
> >      at junit.framework.TestCase.runTest(TestCase.java:157)
> >      at junit.framework.TestCase.runBare(TestCase.java:131)
> >      at junit.framework.TestResult$1.protect(TestResult.java:106)
> >      at junit.framework.TestResult.runProtected(TestResult.java:124)
> >      at junit.framework.TestResult.run(TestResult.java:109)
> >      at junit.framework.TestCase.run(TestCase.java:122)
> >      at junit.framework.TestSuite.runTest(TestSuite.java:173)
> >      at junit.framework.TestSuite.run(TestSuite.java:168)
> >      at junit.framework.TestSuite.runTest(TestSuite.java:173)
> >      at junit.framework.TestSuite.run(TestSuite.java:168)
> >      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:241)
> >      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:419)
> > 
> > I'll keep debugging, but I thought I would post this here to see if it generates
any thoughts
> or suggestions...
> > 
> > - Sam Ruby
> 
> 


=====
Davanum Srinivas - http://jguru.com/dims/

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
Mime
View raw message