Hi,
We'd like to reopen this topic for consideration.
Old topic: http://marc.info/?l=jibx-users&m=117866534917771&w=4
We have a nearly identical problem/situation, and our question is two-fold:
* Are there plans to implement the functionality discussed in the above topic?
* Either way, we'd like some advice on a problem with our workaround(described
below)
The Situation:
We have a number of common objects(Organization, Person, etc) in one project.
These objects have not been compiled in jibx.
We have multiple implementations of a common Message interface(Let's say ImplA,
ImplB, etc), each with its own binding file, and each in its own project. All
implementations use the common objects as sub-elements in different
configurations throughout the xml.
When we receive a Message of a certain type, we load the appropriate binding,
and map our xml.
Due to the limitation discussed in the above topic, we've done the following
workaround:
To build any Message Implementation ImplX:
* The common objects' packages are copied into ImplX's project
* ImplX's project is built using the jibx bindings.
When all is said and done:
* We have ImplA.jar, ImplB.jar, etc
* Both jars contain, among other classes, a bindingfactory and jibx-bound
objects(including common objects).
* If the jibx-bound common objects' .class files are decompiled, one can see
that they differ only by one thing: a string referencing the particular
bindingfactory.
At Runtime:
* all ImplX.jar files are on the classpath
* If a message of type A is encountered, everything works fine.
* If the next message encountered is of type B, the common objects from class
A are still loaded, and the mismatch causes the following error(edited to
indicate [ImplA/ImplB]):
java.lang.NoSuchMethodError:
com.cerner.healthe.interop.messages._1_0.common.organization.Organization.JiBX_hhb_messages_1_0_[implb]message_newinstance_1_0(Lorg/jibx/runtime/impl/UnmarshallingContext;)Lcom/cerner/healthe/interop/messages/_1_0/common/organization/Organization;
at
com.cerner.healthe.interop.messages._1_0.common.organization.JiBX_hhb_messages_1_0_[implb]messageOrganization_access.unmarshal()
at
com.cerner.healthe.interop.messages._1_0.JiBX_MungeAdapter.JiBX_hhb_messages_1_0_[implb]message_unmarshal_1_0()
at
com.cerner.healthe.interop.messages._1_0.[implb]message.[ImplB]Message.JiBX_hhb_messages_1_0_[implb]message_unmarshal_2_0([ImplB]Message.java)
at
com.cerner.healthe.interop.messages._1_0.[implb]message.JiBX_hhb_messages_1_0_[implb]message[ImplB]Message_access.unmarshal()
at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2773)
at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2964)
at .........
* It works the other way around: If B is the first message type encountered,
B will work, while A fails with the same error
Thanks in advance for any help,
Ryan Scheidter | Software Engineer | Cerner Corporation | 816.201.1323 |
ryan.scheid...@cerner.com | http://www.cerner.com <http://www.cerner.com/>
----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from
Cerner Corporation and are intended only for the addressee. The information
contained in this message is confidential and may constitute inside or
non-public information under international, federal, or state securities laws.
Unauthorized forwarding, printing, copying, distribution, or use of such
information is strictly prohibited and may be unlawful. If you are not the
addressee, please promptly delete this message and notify the sender of the
delivery error by e-mail or you may call Cerner's corporate offices in Kansas
City, Missouri, U.S.A at (+1) (816)221-1024.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users