Hi Dennis, unfortunately I can't help you with this, because it's beyond my understanding of JiBX.
Thanks for your help anyway, Guido On 9/28/07, Dennis Sosnoski <[EMAIL PROTECTED]> wrote: > Hi Guido, > > I haven't got any idea offhand why this would be happening. I know JiBX > is able to correctly handle multiple abstract <mapping>s for the same > class, but perhaps having these in different included bindings causes > the confusion. I'll try to duplicate the problem and investigate. > > - Dennis > > Dennis M. Sosnoski > SOA and Web Services in Java > Training and Consulting > http://www.sosnoski.com - http://www.sosnoski.co.nz > Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 > > > > Guido Wischrop wrote: > > Hello, > > I'm using JiBX 1.1.5 with axis2 1.2 on a quite complex wsdl. Now I > > have several elements which use different namespaces and some of these > > elements are recursive, e.g. the Block structure. I created three > > binding files each using a different namespace but the same prefix > > > > File 1: > > <namespace uri="http://ns1" prefix="coord" default="all"/> > > > > <mapping class="Block" abstract="true" type-name="blockNs1" > > marshaller="BlockMarshaller" unmarshaller="BlockMarshaller" /> > > [...] > > > > File 2: > > <namespace uri="http://ns2" prefix="coord" default="all"/> > > > > <mapping class="Block" abstract="true" type-name="blockNs2" > > marshaller="BlockMarshaller" unmarshaller="BlockMarshaller" /> > > [...] > > > > File 3: > > <namespace uri="http://ns3" prefix="coord" default="all"/> > > > > <mapping class="Block" abstract="true" type-name="blockNs3" > > marshaller="BlockMarshaller" unmarshaller="BlockMarshaller" /> > > [...] > > > > Then I created a "super" binding.xml which includes the three above. > > The binding compiler runs fine, but when I try to create a Block > > instance (e.g. new Block()) then I get > > > > java.lang.ClassFormatError: Duplicate method name&signature in class file > > Block > > at java.lang.ClassLoader.defineClass1(Native Method) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:620) > > at > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > > at java.net.URLClassLoader.access$000(URLClassLoader.java:56) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > > [...] > > > > It seems that the binding compiler adds its methods three times. The > > eclipse class viewer shows this: > > > > // Compiled from Block.java (version 1.6 : 50.0, super bit) > > public class Block implements org.jibx.runtime.IMarshallable, > > org.jibx.runtime.IUnmarshallable { > > > > [...] > > > > // Method descriptor #83 (Lorg/jibx/runtime/IMarshallingContext;)V > > // Stack: 3, Locals: 2 > > public synthetic void marshal(org.jibx.runtime.IMarshallingContext > > arg1) throws org.jibx.runtime.JiBXException; > > 0 aload_1 [arg1] > > 1 bipush 12 > > 3 ldc <String "Block"> [70] > > 5 invokeinterface > > org.jibx.runtime.IMarshallingContext.getMarshaller(int, > > java.lang.String) : org.jibx.runtime.IMarshaller [76] [nargs: 3] > > 10 aload_0 [this] > > 11 aload_1 [arg1] > > 12 invokeinterface > > org.jibx.runtime.IMarshaller.marshal(java.lang.Object, > > org.jibx.runtime.IMarshallingContext) : void [82] [nargs: 3] > > 17 return > > Local variable table: > > [pc: 0, pc: 18] local: this index: 0 type: Block > > [pc: 0, pc: 18] local: arg1 index: 1 type: > > org.jibx.runtime.IMarshallingContext > > > > // Method descriptor #90 ()I > > // Stack: 1, Locals: 1 > > public synthetic int JiBX_getIndex(); > > 0 bipush 12 > > 2 ireturn > > Local variable table: > > [pc: 0, pc: 3] local: this index: 0 type: Block > > > > // Method descriptor #103 (Lorg/jibx/runtime/IUnmarshallingContext;)V > > // Stack: 3, Locals: 2 > > public synthetic void > > unmarshal(org.jibx.runtime.IUnmarshallingContext arg1) throws > > org.jibx.runtime.JiBXException; > > 0 aload_1 [arg1] > > 1 bipush 12 > > 3 invokeinterface > > org.jibx.runtime.IUnmarshallingContext.getUnmarshaller(int) : > > org.jibx.runtime.IUnmarshaller [96] [nargs: 2] > > 8 aload_0 [this] > > 9 aload_1 [arg1] > > 10 invokeinterface > > org.jibx.runtime.IUnmarshaller.unmarshal(java.lang.Object, > > org.jibx.runtime.IUnmarshallingContext) : java.lang.Object [102] > > [nargs: 3] > > 15 return > > Local variable table: > > [pc: 0, pc: 16] local: this index: 0 type: Block > > [pc: 0, pc: 16] local: arg1 index: 1 type: > > org.jibx.runtime.IUnmarshallingContext > > > > // Method descriptor #83 (Lorg/jibx/runtime/IMarshallingContext;)V > > // Stack: 3, Locals: 2 > > public synthetic void marshal(org.jibx.runtime.IMarshallingContext > > arg1) throws org.jibx.runtime.JiBXException; > > 0 aload_1 [arg1] > > 1 bipush 30 > > 3 ldc <String "Block"> [70] > > 5 invokeinterface > > org.jibx.runtime.IMarshallingContext.getMarshaller(int, > > java.lang.String) : org.jibx.runtime.IMarshaller [76] [nargs: 3] > > 10 aload_0 [this] > > 11 aload_1 [arg1] > > 12 invokeinterface > > org.jibx.runtime.IMarshaller.marshal(java.lang.Object, > > org.jibx.runtime.IMarshallingContext) : void [82] [nargs: 3] > > 17 return > > Local variable table: > > [pc: 0, pc: 18] local: this index: 0 type: Block > > [pc: 0, pc: 18] local: arg1 index: 1 type: > > org.jibx.runtime.IMarshallingContext > > > > // Method descriptor #90 ()I > > // Stack: 1, Locals: 1 > > public synthetic int JiBX_getIndex(); > > 0 bipush 30 > > 2 ireturn > > Local variable table: > > [pc: 0, pc: 3] local: this index: 0 type: Block > > > > // Method descriptor #103 (Lorg/jibx/runtime/IUnmarshallingContext;)V > > // Stack: 3, Locals: 2 > > public synthetic void > > unmarshal(org.jibx.runtime.IUnmarshallingContext arg1) throws > > org.jibx.runtime.JiBXException; > > 0 aload_1 [arg1] > > 1 bipush 30 > > 3 invokeinterface > > org.jibx.runtime.IUnmarshallingContext.getUnmarshaller(int) : > > org.jibx.runtime.IUnmarshaller [96] [nargs: 2] > > 8 aload_0 [this] > > 9 aload_1 [arg1] > > 10 invokeinterface > > org.jibx.runtime.IUnmarshaller.unmarshal(java.lang.Object, > > org.jibx.runtime.IUnmarshallingContext) : java.lang.Object [102] > > [nargs: 3] > > 15 return > > Local variable table: > > [pc: 0, pc: 16] local: this index: 0 type: Block > > [pc: 0, pc: 16] local: arg1 index: 1 type: > > org.jibx.runtime.IUnmarshallingContext > > > > // Method descriptor #83 (Lorg/jibx/runtime/IMarshallingContext;)V > > // Stack: 3, Locals: 2 > > public synthetic void marshal(org.jibx.runtime.IMarshallingContext > > arg1) throws org.jibx.runtime.JiBXException; > > 0 aload_1 [arg1] > > 1 bipush 45 > > 3 ldc <String "Block"> [70] > > 5 invokeinterface > > org.jibx.runtime.IMarshallingContext.getMarshaller(int, > > java.lang.String) : org.jibx.runtime.IMarshaller [76] [nargs: 3] > > 10 aload_0 [this] > > 11 aload_1 [arg1] > > 12 invokeinterface > > org.jibx.runtime.IMarshaller.marshal(java.lang.Object, > > org.jibx.runtime.IMarshallingContext) : void [82] [nargs: 3] > > 17 return > > Local variable table: > > [pc: 0, pc: 18] local: this index: 0 type: Block > > [pc: 0, pc: 18] local: arg1 index: 1 type: > > org.jibx.runtime.IMarshallingContext > > > > // Method descriptor #90 ()I > > // Stack: 1, Locals: 1 > > public synthetic int JiBX_getIndex(); > > 0 bipush 45 > > 2 ireturn > > Local variable table: > > [pc: 0, pc: 3] local: this index: 0 type: Block > > > > // Method descriptor #103 (Lorg/jibx/runtime/IUnmarshallingContext;)V > > // Stack: 3, Locals: 2 > > public synthetic void > > unmarshal(org.jibx.runtime.IUnmarshallingContext arg1) throws > > org.jibx.runtime.JiBXException; > > 0 aload_1 [arg1] > > 1 bipush 45 > > 3 invokeinterface > > org.jibx.runtime.IUnmarshallingContext.getUnmarshaller(int) : > > org.jibx.runtime.IUnmarshaller [96] [nargs: 2] > > 8 aload_0 [this] > > 9 aload_1 [arg1] > > 10 invokeinterface > > org.jibx.runtime.IUnmarshaller.unmarshal(java.lang.Object, > > org.jibx.runtime.IUnmarshallingContext) : java.lang.Object [102] > > [nargs: 3] > > 15 return > > Local variable table: > > [pc: 0, pc: 16] local: this index: 0 type: Block > > [pc: 0, pc: 16] local: arg1 index: 1 type: > > org.jibx.runtime.IUnmarshallingContext > > } > > > > Thanks for any help, > > Guido > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > jibx-users mailing list > > jibx-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jibx-users > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users