Yes, it is confusing - the array of classpath strings passed to the compiler is used for loading classes which may need to be modified by the binding compiler, but not for loading classes which are actually used directly by the binding compiler. Classes to be used directly (just those implementing deserializers for optional values, as far as I remember) must be in the classpath used to load the binding compiler.

Probably I should clean this up at some point so that the binding compiler digs the class out of the set it's loading for modification. Unfortunately, that would be messy with the current BCEL-based code, so I'll probably leave it until 2.0.

 - Dennis

Frank Mena wrote:

Dennis, This is a little confusing.  Let me see if I have this straight.
There is the classpath of the Compiler and the array of classpath strings that is passed to the Compiler (classpathset), along with the bindingfileset. The deserializer is in both the Compiler's classpath and is passed in the classpathset. Does the error message help at all? It would be great to discuss the Maven plugin with Andreas. He probably has the problems I have licked, I have a lot of experience with multi-modules. I would be happy to trade code with him, although I think if we pass around emails this is going to take a long time. Maybe IM or I could give him a phonecall. Andreas, are you there?

On 11/17/05, *Dennis Sosnoski* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Frank,

    Default values are supplied in the text form, and are converted by the
    binding compiler to binary form using the supplied deserializer.
    Because
    of this the binding compiler needs to have the deserializers available
    in the classpath at binding time. It sounds like this particular class
    is not being included in your classpath when running under Maven 2.

    Incidentally, it'd be great if you could discuss the multi-module
    issues
    with Andreas Brenk so he can get this support in his version of
    the plugin.

    - Dennis

    Frank Mena wrote:

    > I have written a Maven 2 Jibx plugin that works across
    multi-modules.
    > It will bind to classes that are across dependent modules.
    >
    > I am having a weird problem with a deserializer that converts
    shorts.
    > I represent dates as the number of days since a certain date as a
    > short.  My serializer-deserializer converts to/from a date
    string and
    > a short.  Here is the error I get:
    >
    > Deserializer class com.GDate not found for converting default value
    >
    > Here is the bind file:
    > <binding>
    >   <format type = "short" label="GDateFormat"
    > serializer="com.GDate.formatXMLDate"
    > deserializer="com.GDate.parseXMLDate"/>
    >   <mapping name = "SimpleObject" class=" com.SimpleObject">
    >     <value name = "StartDate" field="startDate" format="GDateFormat"
    > usage = "optional"/>
    >   </mapping>
    > </binding>
    >
    > If I remove the usage = "optional" entry, the error goes away.  If I
    > use default="0", it fails.  If I run the same binding from an ant
    > script, it works fine.  If I use any other
    serializer-deserializer I
    > have written that returns an object, it works ok.
    >
    > Have any ideas what the problem is?
    >
    >  Thanks,
    >
    > Frank Mena
    >



    -------------------------------------------------------
    This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
    Register for a JBoss Training Course.  Free Certification Exam
    for All Training Attendees Through End of 2005. For more info visit:
    http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
    <http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click>
    _______________________________________________
    jibx-users mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/jibx-users




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to