<include> tag won't work on Windows
-----------------------------------
Key: JIBX-57
URL: http://jira.codehaus.org/browse/JIBX-57
Project: JiBX
Type: Bug
Components: core
Versions: 1.0-RC0
Environment: WinNT
Reporter: Arnaud Lenfant
Fix For: 1.0-RC0
The following binding
<?xml version='1.0' encoding='UTF-8'?>
<binding>
<include path="contact/Contact.jibx.xml"/>
<mapping name="customer" class="Customer">
<structure field="contact"/>
</mapping>
</binding>
Produces the following error:
Using bindings:
config/Customer.jibx.xml
Running binding compiler version jibx-rc0
java.net.UnknownHostException: C
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:452)
...
at java.net.URL.openStream(URL.java:913)
...
at org.jibx.binding.Utility.loadFileBinding(Utility.java:389)
at org.jibx.binding.Compile.compile(Compile.java:294)
at org.jibx.binding.Compile.main(Compile.java:382)
The problem seems to be the way the base url is constructed, in
Utility.java:389
return loadBinding(fname, sname, new FileInputStream(file), new
URL("file://" + file.getAbsolutePath()), valid);
the resulting url �file://C:/xxx� appears to be
badly escaped, resulting in incorrect URL.
The following change seems to work
return loadBinding(fname, sname, new FileInputStream(file),
file.toURL(), valid);
--
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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs