[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Assigned: (XMLBEANS-78) NPE when processing XMLStreamReader Midstream
From:       "Rajiv Bala (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2005-07-22 18:58:46
Message-ID: 1146993181.1122058726897.JavaMail.jira () ajax ! apache ! org
[Download RAW message or body]

     [ http://issues.apache.org/jira/browse/XMLBEANS-78?page=all ]

Rajiv Bala reassigned XMLBEANS-78:
----------------------------------

    Assign To: Lawrence Jones  (was: Rajiv Bala)

The IllegalArgumentException is still thrown. Please verify patch and checkin if \
appropriate. A test case for this issue can be found at misc.detailed. \
JiraRegression50_100Test. test_jira_xmlbeans78() 

> NPE when processing XMLStreamReader Midstream
> ---------------------------------------------
> 
> Key: XMLBEANS-78
> URL: http://issues.apache.org/jira/browse/XMLBEANS-78
> Project: XMLBeans
> Type: Bug
> Versions: Version 2
> Environment: Latest CVS, Windows XP, Java 1.5
> Reporter: Dan Diephouse
> Assignee: Lawrence Jones
> Priority: Blocker
> Fix For: Version 2
> Attachments: XMLStreamReaderBug.java, amazon2.xml, depth.patch, prefix.patch, \
> prefixanddepth.patch 
> I am attempting to read in a SOAP response into XmlBeans with an XMLStreamReader. \
> I've skipped to body in the XMLStreamReader.  When doing a XmlObject.Factory.parse( \
>                 streamReader ) it throws this:
> java.lang.IllegalArgumentException: prefix cannot be "null" when creating a QName
> 	at javax.xml.namespace.QName.<init>(Unknown Source)
> 	at com.bea.xml.stream.MXParser.getName(MXParser.java:1432)
> 	at org.apache.xmlbeans.impl.newstore2.Locale.loadXMLStreamReader(Locale.java:979)
> 	at org.apache.xmlbeans.impl.newstore2.Locale.parseToXmlObject(Locale.java:703)
> 	at org.apache.xmlbeans.impl.newstore2.Locale.parseToXmlObject(Locale.java:693)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:217)
>   at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:645)
> 	at XMLStreamReaderBug.testBug(XMLStreamReaderBug.java:25)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	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:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
>   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
>   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
>  This is fixed easily enough, by checking if the prefix is null in the Locale class \
> and acting accordingly.  Once this is done though, I get: \
> java.lang.NullPointerException  at \
> org.apache.xmlbeans.impl.newstore2.Cur$CurLoadContext.finish(Cur.java:3032)  at \
> org.apache.xmlbeans.impl.newstore2.Locale.loadXMLStreamReader(Locale.java:1069)  at \
> org.apache.xmlbeans.impl.newstore2.Locale.parseToXmlObject(Locale.java:703)  at \
> org.apache.xmlbeans.impl.newstore2.Locale.parseToXmlObject(Locale.java:693)  at \
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:217)
>   at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:645)
> 	at XMLStreamReaderBug.testBug(XMLStreamReaderBug.java:25)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	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:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
>   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
>   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
>  I'll attach a testcase showing this bug and my patch for Locale which checks for a \
> null prefix.  The null prefix bug could also be problem with the StAX RI - however \
> I'ved tried it with both the RI and Woodstox.  Both give me the same issue with the \
> prefix being null.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic