Certain characters in binding name cause runtime issues
-------------------------------------------------------
Key: JIBX-199
URL: http://jira.codehaus.org/browse/JIBX-199
Project: JiBX
Issue Type: Bug
Components: core
Affects Versions: JiBX 1.1.5
Environment: Windows XP, running from within Eclipse 3.3. JRE/JDK 1.5
Reporter: personwholives
Priority: Minor
Attachments: Jibx-huh.rar
I have a small test case where I was exploring the use of JiBX, and I decided
to try and use the name="whatever" format for the binding tag to name the
bindings. I selected two names "old-version" and "543 version" for the
restore. Both of these caused a runtime error like so:
org.jibx.runtime.JiBXException: Binding information for class
com.cdmtech.jibxtest.Library must be regenerated with current binding compiler
at
org.jibx.runtime.BindingDirectory.getFactoryFromName(BindingDirectory.java:134)
at
org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:174)
at
org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:193)
at com.foobar.jibxtest.Main.main(Main.java:19)
However, "543version" and "oldversion" worked just fine. If these characters
are not supported, there should be an error to this effect during the build
process. Also, the documentation makes no mention of unsupported characters.
Also, I recieved the following error during the build while trying it with
"5.4.3 version" for the name:
[echo] Binding JiBX bindings in Jibx-huh...
[bind] [Ljava.lang.String;@29ab3e
[bind] [Ljava.lang.String;@1a99561
[bind] Error running binding compiler
[bind]
[bind] *** Error during code generation for file
'C:\kmerrima\Java_Dev\workspace\Jibx-huh\bindings\restore2.jibx' - please enter
a bug report for this error in Jira if the problem is not listed as fixed on
the online status page ***
[bind] java.lang.IllegalStateException: Internal error: Expected
com.foobar.jibxtest.Book.JiBX_5.4 on stack, found com.foobar.jibxtest.Book
[bind] full stack:
[bind] 0: java.util.LinkedList
[bind] 1: com.foobar.jibxtest.Book
[bind] 2: org.jibx.runtime.impl.UnmarshallingContext
[bind] at
org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.java:420)
[bind] at
org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:537)
[bind] at
org.jibx.binding.classes.MethodBuilder.appendCallVirtual(MethodBuilder.java:894)
[bind] at
org.jibx.binding.def.ObjectBinding.genUnmarshalCall(ObjectBinding.java:579)
[bind] at
org.jibx.binding.def.ObjectBinding.genUnmarshalAttributeCall(ObjectBinding.java:676)
[bind] at
org.jibx.binding.def.ObjectBinding.genAttributeUnmarshal(ObjectBinding.java:933)
[bind] at
org.jibx.binding.def.ComponentProperty.genAttributeUnmarshal(ComponentProperty.java:149)
[bind] at
org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:290)
[bind] at
org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:167)
Both of these seem like pretty significant errors. I have attached my eclipse
project, though you will need to fix the dependencies and build process.
--
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
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs