Hi All,
I believe I have now found the error and it seems to be the binding of
class files in packages creating broken classes.
I dragged all of my files out of the package and put them in a src
directory. I changed the ant task to this:
<target name="new-Attribute-Bind">
<bind verbose="true" load="true"
binding="bin/attributebinding.xml">
<classpathset dir="bin" />
</bind>
</target>
And it ran successfully first time. I then ran my AttributeDemo class
file and that also ran perfectly first time. I then decompiled the JibX
munged class files for my objects and these are the imports:
SDCAttributeList:
import java.util.ArrayList;
import org.jibx.runtime.*;
import org.jibx.runtime.impl.MarshallingContext;
import org.jibx.runtime.impl.UnmarshallingContext;
SDCAttribute:
import java.util.ArrayList;
import org.jibx.runtime.*;
import org.jibx.runtime.impl.MarshallingContext;
import org.jibx.runtime.impl.UnmarshallingContext;
SDCAttributeValue:
import org.jibx.runtime.*;
import org.jibx.runtime.impl.MarshallingContext;
import org.jibx.runtime.impl.UnmarshallingContext;
All is fine and the classes work. I then decompiled the JibX munged
files from my package com.wanadoo.uk.sdc
SDCAttributeList:
import JiBX_MungeAdapter;
import SDCAttributeList;
import java.util.ArrayList;
import org.jibx.runtime.*;
import org.jibx.runtime.impl.MarshallingContext;
import org.jibx.runtime.impl.UnmarshallingContext;
SDCAttribute:
import JiBX_MungeAdapter;
import SDCAttribute;
import java.util.ArrayList;
import org.jibx.runtime.*;
import org.jibx.runtime.impl.MarshallingContext;
import org.jibx.runtime.impl.UnmarshallingContext;
SDCAttributeValue:
import SDCAttributeValue;
import org.jibx.runtime.*;
import org.jibx.runtime.impl.MarshallingContext;
import org.jibx.runtime.impl.UnmarshallingContext;
As you can see the class files try to import themselves and the
JiBX_MungeAdapter which is in the same directory as the classes. This is
what breaks the code and is the reason for the following error every
time I try to unmarshall my xml document:
java.lang.NoClassDefFoundError: SDCAttributeList
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.wanadoo.uk.sdc.AttributeDemo.main(AttributeDemo.java:20)
Exception in thread "main"
As far as I can tell I haven't got anything wrong as all the code runs
fine in the default package and we are running RC1 of jibx. I have tried
adding the package="com.wanadoo.uk.sdc" info to the binding file and
FQDN to the all the class names with still no joy. This is a show
stopper for us for a tight deadlined project <--- as usual :)
I hope someone can help.
Thanks,
Adam.
This email and the files transmitted with it are meant solely for the use of
the individual addressee(s) named above. They may contain confidential and/or
legally privileged information. If you are not the addressee(s) or responsible
for delivery of the message to the addressee(s), please delete it from your
system and contact the sender right away. The opinions, conclusions and other
information in this message which do not relate to the official business of
Wanadoo UK plc are not necessarily endorsed by it. Wanadoo UK plc has taken
steps to ensure that this email and any attachments are virus-free, but it
remains your responsibility to confirm and ensure this.
Wanadoo UK plc is a subsidiary of France Telecom SA. Our registered office is
at: Verulam Point, Station Way, St. Albans, Herts, AL1 5HE, and we are
registered in England and Wales, as Company No. 3014367
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users