Discussion:
[jibx-users] Question of Compile time bindings and runtimebindigs
Sudhendra Seshachala
2004-04-30 21:41:44 UTC
Permalink
I have been working on jibx for past 4- 5 days in basically to use jibx
framework our marshalling and unmarshalling of XML-java objects

Since we are already ahead in development, I am just defining
binding.xml for our java objects and we have test xml files through
which we are able to test Roundtripping.

This is fine when we have all java class files "not" part of jar.

The way I do is as follows



I compile my java classes

Run JiBX binding compiler

Jar all the classes including the generated files.



During runtime when I try testing with org.jibx.extras.TestRoundtrip I
get the following error.



[java] org.jibx.runtime.JiBXException: Unable to access binding
information for class
com.stc.stcdbeway.repository.impl.StcdbDatabaseModelImpl

[java] Root cause: java.lang.ClassNotFoundException:
JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_i
mpl_StcdbDatabaseModel_bindingFactory <This is in Jar file>

[java] at
org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:141)

[java] at
org.jibx.extras.TestRoundtrip.runTest(TestRoundtrip.java:79)

[java] at
org.jibx.extras.TestRoundtrip.main(TestRoundtrip.java:137)

[java] Caused by: java.lang.ClassNotFoundException:
JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_i
mpl_StcdbDatabaseModel_bindingFactory

[java] at
java.net.URLClassLoader$1.run(URLClassLoader.java:199)

[java] at java.security.AccessController.doPrivileged(Native
Method)

[java] at
java.net.URLClassLoader.findClass(URLClassLoader.java:187)

[java] at
java.lang.ClassLoader.loadClass(ClassLoader.java:289)

[java] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

[java] at
java.lang.ClassLoader.loadClass(ClassLoader.java:235)

[java] at
org.jibx.runtime.BindingDirectory.getFactoryFromName(BindingDirectory.ja
va:73)

[java] at
org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:137)

[java] at
org.jibx.extras.TestRoundtrip.runTest(TestRoundtrip.java:79)

[java] at
org.jibx.extras.TestRoundtrip.main(TestRoundtrip.java:137)

[java] Cause: java.lang.ClassNotFoundException:
JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_i
mpl_StcdbDatabaseModel_bindingFactory

[java] at
java.net.URLClassLoader$1.run(URLClassLoader.java:199)

[java] at java.security.AccessController.doPrivileged(Native
Method)

[java] at
java.net.URLClassLoader.findClass(URLClassLoader.java:187)

[java] at
java.lang.ClassLoader.loadClass(ClassLoader.java:289)

[java] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

[java] at
java.lang.ClassLoader.loadClass(ClassLoader.java:235)

[java] at
org.jibx.runtime.BindingDirectory.getFactoryFromName(BindingDirectory.ja
va:73)

[java] at
org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:137)

[java] at
org.jibx.extras.TestRoundtrip.runTest(TestRoundtrip.java:79)

[java] at
org.jibx.extras.TestRoundtrip.main(TestRoundtrip.java:137)

[java] Error round-tripping class:
com.stc.stcdbeway.repository.impl.StcdbDatabaseModelImpl

[java] with input file example17/data.xml and output compared
to example17/data.xml

[java] Saved output document file path C:\jibx\tutorial\temp.xml

But when I run with all classes without jarring, it works perfectly
fine.

If any one can put some insight this ?

Or do I need to bind during runtime ?



Thanks

Sudhi
Dennis Sosnoski
2004-04-30 21:52:51 UTC
Permalink
Sudhendra Seshachala
2004-04-30 22:13:54 UTC
Permalink
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.

PS I could not open a issue on jira. Its kind of down I think ?

Thanks
Sudhi

-----Original Message-----
From: Dennis Sosnoski [mailto:***@sosnoski.com]
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Cc: jibx-***@lists.sourceforge.net
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Dennis Sosnoski
2004-04-30 22:35:32 UTC
Permalink
The workaround is to do the binding at build time, before the class
files are converted into a jar. This is the recommended way of doing
things anyway, since it avoids the overhead of processing the binding
definition every time you start up your program. The runtime binding is
really intended more for debugging than anything else.

I just checked Jira and didn't have any problem. You do need to register
before you can add an issue, though.

- Dennis
Post by Sudhendra Seshachala
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.
PS I could not open a issue on jira. Its kind of down I think ?
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Sudhendra Seshachala
2004-04-30 22:42:18 UTC
Permalink
I did follow the following steps
I compile my java classes
Post by Sudhendra Seshachala
Post by Sudhendra Seshachala
Run JiBX binding compiler
Jar all the classes including the generated files.
-----Original Message-----
From: Dennis Sosnoski [mailto:***@sosnoski.com]
Sent: Friday, April 30, 2004 3:36 PM
To: Sudhendra Seshachala
Cc: jibx-***@lists.sourceforge.net
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs

The workaround is to do the binding at build time, before the class
files are converted into a jar. This is the recommended way of doing
things anyway, since it avoids the overhead of processing the binding
definition every time you start up your program. The runtime binding is
really intended more for debugging than anything else.

I just checked Jira and didn't have any problem. You do need to register

before you can add an issue, though.

- Dennis
Post by Sudhendra Seshachala
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.
PS I could not open a issue on jira. Its kind of down I think ?
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Dennis Sosnoski
2004-04-30 23:14:23 UTC
Permalink
Oh, I'm sorry - I thought (partially from the subject line) that you
were using the runtime binding support. After reading it through again I
see that's not the case at all.

I don't know what *is* happening in this case, unless you've actually
got two sets of your class files in the class path and you're picking up
the wrong set (the ones that haven't had the binding compiler run on
them). That seems the most likely cause, if you're sure the JiBX files
are included in the jar file. Please double-check this issue.

If you can't find a problem with the classpath, send me (directly) the
jar file and I'll try it here.

- Dennis
Post by Sudhendra Seshachala
I did follow the following steps
I compile my java classes
Post by Sudhendra Seshachala
Post by Sudhendra Seshachala
Run JiBX binding compiler
Jar all the classes including the generated files.
-----Original Message-----
Sent: Friday, April 30, 2004 3:36 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
The workaround is to do the binding at build time, before the class
files are converted into a jar. This is the recommended way of doing
things anyway, since it avoids the overhead of processing the binding
definition every time you start up your program. The runtime binding is
really intended more for debugging than anything else.
I just checked Jira and didn't have any problem. You do need to register
before you can add an issue, though.
- Dennis
Post by Sudhendra Seshachala
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.
PS I could not open a issue on jira. Its kind of down I think ?
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Sudhendra Seshachala
2004-04-30 23:59:41 UTC
Permalink
Do I need to set any property before compiling bindings to generate *bindingFactory.class and *MungeAdapter.class ?

Thanks
Sudhi

-----Original Message-----
From: Sudhendra Seshachala
Sent: Friday, April 30, 2004 4:21 PM
To: 'Dennis Sosnoski'
Subject: RE: [jibx-users] Question of Compile time bindings and runtimebindigs

When I investigated the jar file and also compilation the following file is not getting generated "JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory"
I believe this is what is causing the issue


-----Original Message-----
From: Dennis Sosnoski [mailto:***@sosnoski.com]
Sent: Friday, April 30, 2004 4:14 PM
To: Sudhendra Seshachala
Cc: jibx-***@lists.sourceforge.net
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs

Oh, I'm sorry - I thought (partially from the subject line) that you
were using the runtime binding support. After reading it through again I
see that's not the case at all.

I don't know what *is* happening in this case, unless you've actually
got two sets of your class files in the class path and you're picking up
the wrong set (the ones that haven't had the binding compiler run on
them). That seems the most likely cause, if you're sure the JiBX files
are included in the jar file. Please double-check this issue.

If you can't find a problem with the classpath, send me (directly) the
jar file and I'll try it here.

- Dennis
Post by Sudhendra Seshachala
I did follow the following steps
I compile my java classes
Post by Sudhendra Seshachala
Post by Sudhendra Seshachala
Run JiBX binding compiler
Jar all the classes including the generated files.
-----Original Message-----
Sent: Friday, April 30, 2004 3:36 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
The workaround is to do the binding at build time, before the class
files are converted into a jar. This is the recommended way of doing
things anyway, since it avoids the overhead of processing the binding
definition every time you start up your program. The runtime binding is
really intended more for debugging than anything else.
I just checked Jira and didn't have any problem. You do need to register
before you can add an issue, though.
- Dennis
Post by Sudhendra Seshachala
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.
PS I could not open a issue on jira. Its kind of down I think ?
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Sudhendra Seshachala
2004-05-03 15:40:47 UTC
Permalink
I found the problem I think
I run with the binding with the following command

<target name="objectxml-bind">
<java classname="org.jibx.binding.Compile" fork="yes" dir="${module.classes.impl.dir}"
failonerror="true">
<classpath>
<pathelement location="${module.lib.dir}/${module.repositoryimpl.jar}"/>
<pathelement location="${stc.egateapi.dir}/com.stc.databasemodelapi.jar"/>
<pathelement location="${stc.egateapi.dir}/com.stc.repositoryapi.jar"/>
<pathelement location="${stc.egateapi.dir}/com.stc.commonmodelapi.jar"/>
<pathelement location="${stc.egateapi.dir}/com.stc.otd.frameworkapi.jar"/>
<pathelement location="${stc.lib.dir}/com.stc.sqlframework.jar"/>
<pathelement location="${module.classes.api.dir}"/>
<pathelement location="${module.classes.impl.dir}"/>

<pathelement location="${module.thirdparty.dir}/jibx-bind.jar"/>
<pathelement location="${module.thirdparty.dir}/jibx-run.jar"/>
<pathelement location="${module.thirdparty.dir}/bcel.jar"/>
<pathelement location="${module.thirdparty.dir}/xpp3.jar"/>
</classpath>
<arg value="${module.src.dir}/com/stc/stcdbeway/repository/impl/StcdbDatabaseModel-binding.xml"/>
</java>
</target>

The classes
JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory.class
JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingHashMapper_0.class
JiBX_MungeAdapter.class
are generated without the package names. I opened the class files in DJ decompiler. I am attaching the the three class files and the bindings

Hope this helps.

Thanks
Sudhi


-----Original Message-----
From: Dennis Sosnoski [mailto:***@sosnoski.com]
Sent: Friday, April 30, 2004 6:45 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs


No, these should be automatic. If you can send me your binding
definition file, the actual command you're using to run the binding
compiler, and a zip file of the classes in your package after running
the binding compiler I'll try to track down what's going wrong. Normally
the name of your binding factory class is not going to be such a long
string, so I think something strange is happening.

- Dennis
Post by Sudhendra Seshachala
Do I need to set any property before compiling bindings to generate
*bindingFactory.class and *MungeAdapter.class ?
Thanks
Sudhi
-----Original Message-----
From: Sudhendra Seshachala
Sent: Friday, April 30, 2004 4:21 PM
To: 'Dennis Sosnoski'
Subject: RE: [jibx-users] Question of Compile time bindings and runtimebindigs
When I investigated the jar file and also compilation the following
file is not getting generated "JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory"
I believe this is what is causing the issue
-----Original Message-----
Sent: Friday, April 30, 2004 4:14 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs
Oh, I'm sorry - I thought (partially from the subject line) that you
were using the runtime binding support. After reading it through again I
see that's not the case at all.
I don't know what *is* happening in this case, unless you've actually
got two sets of your class files in the class path and you're picking up
the wrong set (the ones that haven't had the binding compiler run on
them). That seems the most likely cause, if you're sure the JiBX files
are included in the jar file. Please double-check this issue.
If you can't find a problem with the classpath, send me (directly) the
jar file and I'll try it here.
- Dennis
Post by Sudhendra Seshachala
I did follow the following steps
I compile my java classes
Post by Sudhendra Seshachala
Post by Sudhendra Seshachala
Run JiBX binding compiler
Jar all the classes including the generated files.
-----Original Message-----
Sent: Friday, April 30, 2004 3:36 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
The workaround is to do the binding at build time, before the class
files are converted into a jar. This is the recommended way of doing
things anyway, since it avoids the overhead of processing the binding
definition every time you start up your program. The runtime binding is
really intended more for debugging than anything else.
I just checked Jira and didn't have any problem. You do need to
register
before you can add an issue, though.
- Dennis
Post by Sudhendra Seshachala
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.
PS I could not open a issue on jira. Its kind of down I think ?
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Sudhendra Seshachala
2004-05-03 15:51:33 UTC
Permalink
I think I got it. Pretty simple one.
It was just another ant task issue. Basically I have to give fully qualified package namw where the files will be generated.

Thanks
Sudhi

-----Original Message-----
From: Dennis Sosnoski [mailto:***@sosnoski.com]
Sent: Friday, April 30, 2004 6:45 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs


No, these should be automatic. If you can send me your binding
definition file, the actual command you're using to run the binding
compiler, and a zip file of the classes in your package after running
the binding compiler I'll try to track down what's going wrong. Normally
the name of your binding factory class is not going to be such a long
string, so I think something strange is happening.

- Dennis
Post by Sudhendra Seshachala
Do I need to set any property before compiling bindings to generate
*bindingFactory.class and *MungeAdapter.class ?
Thanks
Sudhi
-----Original Message-----
From: Sudhendra Seshachala
Sent: Friday, April 30, 2004 4:21 PM
To: 'Dennis Sosnoski'
Subject: RE: [jibx-users] Question of Compile time bindings and runtimebindigs
When I investigated the jar file and also compilation the following
file is not getting generated "JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory"
I believe this is what is causing the issue
-----Original Message-----
Sent: Friday, April 30, 2004 4:14 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs
Oh, I'm sorry - I thought (partially from the subject line) that you
were using the runtime binding support. After reading it through again I
see that's not the case at all.
I don't know what *is* happening in this case, unless you've actually
got two sets of your class files in the class path and you're picking up
the wrong set (the ones that haven't had the binding compiler run on
them). That seems the most likely cause, if you're sure the JiBX files
are included in the jar file. Please double-check this issue.
If you can't find a problem with the classpath, send me (directly) the
jar file and I'll try it here.
- Dennis
Post by Sudhendra Seshachala
I did follow the following steps
I compile my java classes
Post by Sudhendra Seshachala
Post by Sudhendra Seshachala
Run JiBX binding compiler
Jar all the classes including the generated files.
-----Original Message-----
Sent: Friday, April 30, 2004 3:36 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
The workaround is to do the binding at build time, before the class
files are converted into a jar. This is the recommended way of doing
things anyway, since it avoids the overhead of processing the binding
definition every time you start up your program. The runtime binding is
really intended more for debugging than anything else.
I just checked Jira and didn't have any problem. You do need to
register
before you can add an issue, though.
- Dennis
Post by Sudhendra Seshachala
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.
PS I could not open a issue on jira. Its kind of down I think ?
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Dennis Sosnoski
2004-05-04 03:25:59 UTC
Permalink
This didn't make it on the list before due to email issues at my end.
Here's the reply -

Yes, looking at your binding I see why this comes up - the first <mapping> is for java.util.HashMap, which is a package that we can't use directly. As it says in the documentation for the <binding> element package attribute:

"package - Java package used for created binding factory class. By default this is the same package as the class associated with the first mapping child element. If present, the value must be a Java package name (as in "org.jibx.runtime")."

We can't add stuff to the "java.util" package, so instead it winds up in the default package. If you reordered your <mapping> elements the classes would instead go into the package you're expecting automatically.

The file name conversion to a binding name is working as currently documented, but for beta 4 I think I'll change this to instead use only the base file name (with leading directory path information stripped off). This would make the added file names "JiBX_StcdbDatabaseModel_bindingFactory" rather than "JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory",
for instance, which seems more reasonable (especially since the same name string will be used for methods added to your classes).

- Dennis
Post by Sudhendra Seshachala
I think I got it. Pretty simple one.
It was just another ant task issue. Basically I have to give fully qualified package namw where the files will be generated.
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 6:45 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs
No, these should be automatic. If you can send me your binding
definition file, the actual command you're using to run the binding
compiler, and a zip file of the classes in your package after running
the binding compiler I'll try to track down what's going wrong. Normally
the name of your binding factory class is not going to be such a long
string, so I think something strange is happening.
- Dennis
Post by Sudhendra Seshachala
Do I need to set any property before compiling bindings to generate
*bindingFactory.class and *MungeAdapter.class ?
Thanks
Sudhi
-----Original Message-----
From: Sudhendra Seshachala
Sent: Friday, April 30, 2004 4:21 PM
To: 'Dennis Sosnoski'
Subject: RE: [jibx-users] Question of Compile time bindings and runtimebindigs
When I investigated the jar file and also compilation the following
file is not getting generated "JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory"
I believe this is what is causing the issue
Stefano Fornari
2004-05-04 07:11:16 UTC
Permalink
When trying to write big chunk of data (although not has big... few tens
of Kb).

Cheers,
Stefano

java.lang.ArrayIndexOutOfBoundsException: 4096
2004-05-03 16:09:46,382 ERROR [STDERR] at
org.jibx.runtime.impl.UTF8StreamWriter.writeTextContent(UTF8StreamWriter.java:277)
2004-05-03 16:09:46,402 ERROR [STDERR] at
org.jibx.runtime.impl.MarshallingContext.writeContent(MarshallingContext.java:705)
2004-05-03 16:09:46,422 ERROR [STDERR] at
sync4j.framework.core.Data.JiBX_sync4j_src_xml_jibx_binding_marshal_1_1(Data.java)
2004-05-03 16:09:46,442 ERROR [STDERR] at
sync4j.framework.core.ComplexData.JiBX_sync4j_src_xml_jibx_binding_marshal_2_0(ComplexData.java)
2004-05-03 16:09:46,462 ERROR [STDERR] at
sync4j.framework.core.JiBX_sync4j_src_xml_jibx_bindingComplexData_access.marshal()
2004-05-03 16:09:46,492 ERROR [STDERR] at
sync4j.framework.core.Item.JiBX_sync4j_src_xml_jibx_binding_marshal_1_0(Item.java)
2004-05-03 16:09:46,512 ERROR [STDERR] at
sync4j.framework.core.JiBX_sync4j_src_xml_jibx_bindingItem_access.marshal()
Dennis Sosnoski
2004-05-04 07:51:00 UTC
Permalink
Unless you've found a new variation, this was a problem that was fixed
for beta 3b: http://jira.codehaus.org/secure/ViewIssue.jspa?key=JIBX-12
Please try the latest version before reporting a bug.

Thanks,

- Dennis
Post by Stefano Fornari
When trying to write big chunk of data (although not has big... few tens
of Kb).
Cheers,
Stefano
java.lang.ArrayIndexOutOfBoundsException: 4096
2004-05-03 16:09:46,382 ERROR [STDERR] at
org.jibx.runtime.impl.UTF8StreamWriter.writeTextContent(UTF8StreamWriter.java:277)
2004-05-03 16:09:46,402 ERROR [STDERR] at
org.jibx.runtime.impl.MarshallingContext.writeContent(MarshallingContext.java:705)
2004-05-03 16:09:46,422 ERROR [STDERR] at
sync4j.framework.core.Data.JiBX_sync4j_src_xml_jibx_binding_marshal_1_1(Data.java)
2004-05-03 16:09:46,442 ERROR [STDERR] at
sync4j.framework.core.ComplexData.JiBX_sync4j_src_xml_jibx_binding_marshal_2_0(ComplexData.java)
2004-05-03 16:09:46,462 ERROR [STDERR] at
sync4j.framework.core.JiBX_sync4j_src_xml_jibx_bindingComplexData_access.marshal()
2004-05-03 16:09:46,492 ERROR [STDERR] at
sync4j.framework.core.Item.JiBX_sync4j_src_xml_jibx_binding_marshal_1_0(Item.java)
2004-05-03 16:09:46,512 ERROR [STDERR] at
sync4j.framework.core.JiBX_sync4j_src_xml_jibx_bindingItem_access.marshal()
Stefano Fornari
2004-05-04 08:45:01 UTC
Permalink
Sorry, I did not know about it. Thanks.

Stefano
Post by Dennis Sosnoski
Unless you've found a new variation, this was a problem that was fixed
for beta 3b: http://jira.codehaus.org/secure/ViewIssue.jspa?key=JIBX-12
Please try the latest version before reporting a bug.
Thanks,
- Dennis
Post by Stefano Fornari
When trying to write big chunk of data (although not has big... few
tens of Kb).
Cheers,
Stefano
java.lang.ArrayIndexOutOfBoundsException: 4096
2004-05-03 16:09:46,382 ERROR [STDERR] at
org.jibx.runtime.impl.UTF8StreamWriter.writeTextContent(UTF8StreamWriter.java:277)
2004-05-03 16:09:46,402 ERROR [STDERR] at
org.jibx.runtime.impl.MarshallingContext.writeContent(MarshallingContext.java:705)
2004-05-03 16:09:46,422 ERROR [STDERR] at
sync4j.framework.core.Data.JiBX_sync4j_src_xml_jibx_binding_marshal_1_1(Data.java)
2004-05-03 16:09:46,442 ERROR [STDERR] at
sync4j.framework.core.ComplexData.JiBX_sync4j_src_xml_jibx_binding_marshal_2_0(ComplexData.java)
2004-05-03 16:09:46,462 ERROR [STDERR] at
sync4j.framework.core.JiBX_sync4j_src_xml_jibx_bindingComplexData_access.marshal()
2004-05-03 16:09:46,492 ERROR [STDERR] at
sync4j.framework.core.Item.JiBX_sync4j_src_xml_jibx_binding_marshal_1_0(Item.java)
2004-05-03 16:09:46,512 ERROR [STDERR] at
sync4j.framework.core.JiBX_sync4j_src_xml_jibx_bindingItem_access.marshal()
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
jibx-users mailing list
https://lists.sourceforge.net/lists/listinfo/jibx-users
--
Stefano Fornari ***@funambol.com
Funambol CTO www.funambol.com

6472 Camden Ave #106 Via dei Valtorta 21
San Jose, CA 95120 (USA) 20127 Milano (Italy)
Tel.: +1 408 705 2044 Tel.: +39 02 2614 5383
Fax: +1 408 705 2044 Fax: +39 02 7005 60230

Your Synchronization Company
Sudhendra Seshachala
2004-05-04 18:51:53 UTC
Permalink
I have written a TreeSetMapper. If some one could review it will help me to move forward.

I am still stuck with

Basically I have a object which has HashMap of dbColumns and HAshMap of tableProperties.
My binding.xml is as follows. The data.xml is also attached.
When I try to run the TestRoundTrip I get the following error

runbindings:
[jar] Building jar: C:\jibx\lib\runtimebindings.jar

runTest16:
[java] org.jibx.runtime.JiBXException: Expected start tag, found end tag "e
ntry" (line 14, col 48)
[java] at org.jibx.runtime.impl.UnmarshallingContext.toStart(Unmarshall
ingContext.java:489)
[java] at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(U
nmarshallingContext.java:2561)
[java] at org.jibx.custombindings.HashMapper.unmarshal(HashMapper.java:
157)
[java] at example16.DBTable.JiBX_jibx_tutorial_example16_binding_unmars
hal_1_0(DBTable.java)
[java] at example16.JiBX_jibx_tutorial_example16_bindingDBTable_access.
unmarshal()
[java] at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(U
nmarshallingContext.java:2568)
[java] at org.jibx.custombindings.HashMapper.unmarshal(HashMapper.java:
157)
[java] at example16.DBModel.JiBX_jibx_tutorial_example16_binding_unmars
hal_1_0(DBModel.java)
[java] at example16.JiBX_jibx_tutorial_example16_bindingDBModel_access.
unmarshal()
[java] at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(U
nmarshallingContext.java:2568)
[java] at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(
UnmarshallingContext.java:2736)
[java] at org.jibx.extras.TestRoundtrip.runTest(TestRoundtrip.java:86)
[java] at org.jibx.extras.TestRoundtrip.main(TestRoundtrip.java:140)
[java] Error round-tripping class: example16.DBModel
[java] with input file example16/data.xml and output compared to example16
/data.xml
[java] Saved output document file path C:\jibx\tutorial\temp.xml

BUILD FAILED
file:C:/jibx/tutorial/build.xml:346: Java returned: 1

Any inputs or suggestions ?

Thanks in Advance
Sudhi

-----Original Message-----
From: Dennis Sosnoski [mailto:***@minddesigns.com]
Sent: Monday, May 03, 2004 10:05 AM
To: Sudhendra Seshachala
Cc: Dennis Sosnoski; jibx-***@lists.sourceforge.net
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs

Yes, looking at your binding I see why this comes up - the first
<mapping> is for java.util.HashMap, which is a package that we can't use
directly. As it says in the documentation for the <binding> element
package attribute:

"package - Java package used for created binding factory class. By
default this is the same package as the class associated with the first
mapping child element. If present, the value must be a Java package name
(as in "org.jibx.runtime")."

We can't add stuff to the "java.util" package, so instead it winds up in
the default package. If you reordered your <mapping> elements the
classes would instead go into the package you're expecting automatically.

The file name conversion to a binding name is working as currently
documented, but for beta 4 I think I'll change this to instead use only
the base file name (with leading directory path information stripped
off). This would make the added file names
"JiBX_StcdbDatabaseModel_bindingFactory" rather than
"JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory",
for instance, which seems more reasonable (especially since the same
name string will be used for methods added to your classes).

- Dennis
Post by Sudhendra Seshachala
I think I got it. Pretty simple one.
It was just another ant task issue. Basically I have to give fully qualified package namw where the files will be generated.
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 6:45 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs
No, these should be automatic. If you can send me your binding
definition file, the actual command you're using to run the binding
compiler, and a zip file of the classes in your package after running
the binding compiler I'll try to track down what's going wrong. Normally
the name of your binding factory class is not going to be such a long
string, so I think something strange is happening.
- Dennis
Post by Sudhendra Seshachala
Do I need to set any property before compiling bindings to generate
*bindingFactory.class and *MungeAdapter.class ?
Thanks
Sudhi
-----Original Message-----
From: Sudhendra Seshachala
Sent: Friday, April 30, 2004 4:21 PM
To: 'Dennis Sosnoski'
Subject: RE: [jibx-users] Question of Compile time bindings and runtimebindigs
When I investigated the jar file and also compilation the following
file is not getting generated "JiBX_hawaii_stcdbeway_repository_src_java_com_stc_stcdbeway_repository_impl_StcdbDatabaseModel_bindingFactory"
I believe this is what is causing the issue
-----Original Message-----
Sent: Friday, April 30, 2004 4:14 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and runtimebindigs
Oh, I'm sorry - I thought (partially from the subject line) that you
were using the runtime binding support. After reading it through again I
see that's not the case at all.
I don't know what *is* happening in this case, unless you've actually
got two sets of your class files in the class path and you're picking up
the wrong set (the ones that haven't had the binding compiler run on
them). That seems the most likely cause, if you're sure the JiBX files
are included in the jar file. Please double-check this issue.
If you can't find a problem with the classpath, send me (directly) the
jar file and I'll try it here.
- Dennis
Post by Sudhendra Seshachala
I did follow the following steps
I compile my java classes
Post by Sudhendra Seshachala
Post by Sudhendra Seshachala
Run JiBX binding compiler
Jar all the classes including the generated files.
-----Original Message-----
Sent: Friday, April 30, 2004 3:36 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
The workaround is to do the binding at build time, before the class
files are converted into a jar. This is the recommended way of doing
things anyway, since it avoids the overhead of processing the binding
definition every time you start up your program. The runtime binding is
really intended more for debugging than anything else.
I just checked Jira and didn't have any problem. You do need to
register
before you can add an issue, though.
- Dennis
Post by Sudhendra Seshachala
Is there a workaround to resolve this ?
We have started using this rocking framework and now we ran into this
issue.
Let me know if I can be of any help in implementing this stuff.
PS I could not open a issue on jira. Its kind of down I think ?
Thanks
Sudhi
-----Original Message-----
Sent: Friday, April 30, 2004 2:53 PM
To: Sudhendra Seshachala
Subject: Re: [jibx-users] Question of Compile time bindings and
runtimebindigs
Loading...