From: Sudhendra S. <sseshachala@SeeBeyond.com> - 2004-04-30 21:41:50
|
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.=20 This is fine when we have all java class files "not" part of jar. The way I do is as follows =20 I compile my java classes Run JiBX binding compiler Jar all the classes including the generated files. =20 During runtime when I try testing with org.jibx.extras.TestRoundtrip I get the following error.=20 =20 [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 ?=20 Or do I need to bind during runtime ? =20 Thanks Sudhi =20 =20 =20 |