[
http://jira.codehaus.org/browse/JIBX-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Sosnoski updated JIBX-198:
---------------------------------
Component/s: core
> java.lang.IndexOutOfBoundsException: only START_TAG can have attributes TEXT
> seen
> ---------------------------------------------------------------------------------
>
> Key: JIBX-198
> URL: http://jira.codehaus.org/browse/JIBX-198
> Project: JiBX
> Issue Type: Bug
> Components: core
> Affects Versions: JiBX 1.1.5
> Environment: Windows XP SP 2, JDK 1.4.2
> Reporter: Günther Wieser
> Assignee: Dennis Sosnoski
> Fix For: JiBX 1.1.6
>
> Attachments: JBUsageOptReq.zip
>
>
> we found a problem with using nillable="true" and optional="true" on
> the very same value tag.
> think about the following example binding:
> <?xml version="1.0" encoding="ISO-8859-2"?>
> <binding>
> <mapping name="Data" class="usageoptreq.UsageOptReqData"
> ordered="false" flexible="true">
> <value name="optional1" field="optional1" nillable="true"
> usage="optional"/>
> <value name="optional2" field="optional2" nillable="true"
> usage="optional"/>
> <value name="optional3" field="optional3" nillable="true"
> usage="optional"/>
> <value name="optional4" field="optional4" nillable="true"
> usage="optional"/>
> </mapping>
> </binding>
> we get the following error during runtime (compilation works fine):
> java.lang.IndexOutOfBoundsException: only START_TAG can have attributes TEXT
> seen ...<optional1>OO Optional1<... @6:26
> at org.xmlpull.mxp1.MXParser.getAttributeValue(MXParser.java:927)
> at
> org.jibx.runtime.impl.XMLPullReaderFactory$XMLPullReader.getAttributeValue(XMLPullReaderFactory.java:395)
> at
> org.jibx.runtime.impl.UnmarshallingContext.getAttributeValue(UnmarshallingContext.java:356)
> at
> org.jibx.runtime.impl.UnmarshallingContext.attributeBoolean(UnmarshallingContext.java:1881)
> at
> usageoptreq.UsageOptReqData.JiBX_binding_unmarshal_1_2(UsageOptReqData.java)
> at usageoptreq.JiBX_bindingUsageOptReqData_access.unmarshal()
> at
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
> at
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2680)
> at
> usageoptreq.UsageOptReqTest.testCompileAndTransform(UsageOptReqTest.java:34)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> 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.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> so far the only workaround we found is either not to use
> nillable="true" or not to use optional="true". you can guess that this
> is not what we wanted ;-)
> Explanantion for the attached zip archive:
> run the ant build file in srcipts/, then call the unit test. this produces
> the error.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs