JiBX is probably generating this file (the long name with a .class extension) in a place you don't expect, too. It would normally go into the package of the first <mapping> class, but in this case that's a system package so it instead gets dumped in the default package. It may be output directly to the current directory of where you're running, or to the default package directory of your classpath entry.
As for the basic question of whether this will work - it won't. The problem is that TypedArrayMapper is intended for use with arrays of some object type, where the object type has a <mapping> defined. You can't do that for java.lang.String (or other java.* classes) in a way that will work here. Your choices are either to use the TypedArrayMapper example as a base for doing your own StringArrayMapper or use the size-method/get-method/add-method user methods to do the array handling within the containing object. Sorry; I realize this is fairly ugly, and hope to clean it up soon.
- Dennis
???e??? ?a???t?a??? wrote:
Hi Scott, are sure that this isn't what it says it is ? a classpath issue ? Before looking at anything else, I'd make sure that this weird extremely long-named class that jiBX generates is actually on the classpath.
If it's really not a classpath problem ... you're in trouble i suspect :}
Anyhow, hope I've helped out a bit at least ...
Angel
O:]
----- Original Message ----- *From:* Scott Stevenson <mailto:[EMAIL PROTECTED]> *To:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> *Sent:* Friday, July 30, 2004 7:30 PM *Subject:* [jibx-users] TypedArrayMapper of Strings
I’m trying to write a binding that uses the org.jibx.extras.TypedArrayMapper to marshal/unmarchal an array of java.lang.String[]. The binding compiles OK, but I get the following exception when trying to run a test:
ERRORwriteXMLFile , org.jibx.runtime.JiBXException: Unable to access binding information for class boeing.engineering.leangi3.metadata.ClassInfo
Make sure classes generated by the binding compiler are available at runtime
Root cause: java.lang.ClassNotFoundException: JiBX_U__cvsProjects_ltk_src_boeing_engineering_leangi3_metadata_bindingFactory
Do I need a custom mapper for String to make this work, or could there be some other problem?
Thanks in advance,
Scott…
<mapping class="java.lang.String[]" name="String[]"
marshaller="org.jibx.extras.TypedArrayMapper"
unmarshaller="org.jibx.extras.TypedArrayMapper"/>
------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
