CodeGen cannot generate binding XMLs for schemas which reference other schemas
------------------------------------------------------------------------------
Key: JIBX-458
URL: https://jira.codehaus.org/browse/JIBX-458
Project: JiBX
Issue Type: Bug
Components: CodeGen
Affects Versions: JiBX 1.2.3
Environment: Mac OS X 10.6.8, java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
Reporter: James Athey
If CodeGen is run on a schema which references another schema, it fails to
generate binding XMLs (after code generation) with an error like the following:
Loaded and validated 1 specified schema(s) and 1 referenced schema(s)
Error: Error accessing included binding with path "schemas_pvisionBinding.xml":
<current working directory>/schemas_pvisionBinding.xml (No such file or
directory); on include element at (source unknown)
Error: Error accessing included binding with path "protocol_geolocBinding.xml":
<current working directory>/protocol_geolocBinding.xml (No such file or
directory); on include element at (source unknown)
Exception in thread "main" org.jibx.runtime.JiBXException: Terminating due to
errors in bindings
at org.jibx.schema.codegen.CodeGen.writeBindings(CodeGen.java:1618)
at org.jibx.schema.codegen.CodeGen.generate(CodeGen.java:1808)
at org.jibx.schema.codegen.CodeGen.main(CodeGen.java:2202)
The two schemas in this example are "pvision.xsd" and "geoloc.xsd"; pvision.xsd
references geoloc.xsd. It is possible (though cumbersome) to work around this
bug by generating the code and binding XMLs in two steps.
1. Generate the code for the referenced schema, using the -b switch to set a
different filename for the generated bindings XML.
2. Generate the code for the referencing schema, using the -i switch to pull in
the bindings XML from the previous step.
This workaround rapidly becomes onerous when more than two schemas are involved.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs