Hi everyone,

  I'm working on a simple solution where I have two projects and one
reuses classes already bound (precompiled) in the other project. I'm
using JiBX version 1.2.1

  Let's say I have a precompiled binding in projectA, projecta-binding.xml

  <binding package="com.projecta">
      <mapping name="a" class="...A">
      ....
      </mapping>
  </binding>

  Then projectB defines a binding that requires using class A from
projectA already compiled, projectb-binding.xml

  <binding>
     <include path="projecta-binding.xml" precompiled="true" />

     <mapping name="b" class="....B">
       <structure .... map-as="...A" />
     </mapping>
  </binding>

  However when I do "mvn clean install" (using the 1.2.1 JiBX maven
plugin) I get the following error:

  "Classloader conflict for binding 'projecta_binding' - factory does not
implement required interface"

  The exception is thrown from BindingDirectory.getFactory() method. I've
checked the binding factory generated by JiBX does implement
IBindingFactory, so I'm assumming it is really a class loader issue but
I'm not doing anything fancy, just a "mvn clean install".

  I'd appreciate any help or advice regarding the use of precompiled
binding as shown in this example.

  Also, as a second suggestion, is it possible to include a precompiled
binding doing <include path="classpath:binding.xml"/> ? in that way
other projects don't have to manually copy the precompiled binding
definition to the project directory.

  Thanks in advance,

  Karel

------------------------------------------------------------------------------
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to