Unfortunately the fields I need access to are private final & so no setters
are available. As this is an external 3rd party library, I don't have
access, nor would I want to, change the semantics to support public setters.

I could unjar it, tho dropping in a single JAR when it's updated is nice. I
may have to look into that option.

Thanks,
Matthew

On Thu, Jun 24, 2010 at 8:59 PM, Dennis Sosnoski <d...@sosnoski.com> wrote:

> Hi Matthew,
>
> JiBX should be able to work with the classes in the jar as long as
> you're only using public fields or methods. If the fields aren't public,
> you need to either switch to public get/set methods (if available) or
> unjar the class files so that the JiBX binding compiler can modify them.
>
>  - Dennis
>
> Dennis M. Sosnoski
> XML 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
>
>
>
> Matthew O'Connor wrote:
> > Hello all, I looked around to see if I could find a solution to this,
> > but nothing came up, so sorry if this is clearly stated somewhere.
> > Also I'm running JiBX 1.2.2.
> >
> > I have a bean (that I have control over) that uses some beans that I
> > don't have control over (Apache Commons Math Vector3D). When I run the
> > compiler for the binding.xml I've created I'm getting an
> > "java.lang.IllegalStateException: Internal error - cannot modify class
> > org.apache.commons.math.geometry.Vector3D loaded from
> > ..\..\lib\commons-math-2.1.jar" - which makes sense.
> >
> > Is there a way around this?
> >
> > Thanks,
> > Matthew
> >
> > P.S. Here's what I'm using:
> >
> > <binding>
> >   <mapping name="Wrapper3D" class="test.Wrapper3D">
> >     <structure name="Vector3D" field="v"/>
> >   </mapping>
> >   <mapping abstract="true"
> > class="org.apache.commons.math.geometry.Vector3D"
> >       factory="com.issinc.jibx.JiBXFactory.vector3DFactory">
> >     <value name="X" field="x"/>
> >     <value name="Y" field="y"/>
> >     <value name="Z" field="z"/>
> >   </mapping>
> > </binding>
> >
> > package test;
> > import org.apache.commons.math.geometry.Vector3D;
> > public class Wrapper3D {
> >     private Vector3D v;
> >
> >     private Wrapper3D() {}
> >
> >     public Wrapper3D(Vector3D v) {
> >         this.v = v;
> >     }
> > }
> >
> > package com.issinc.jibx;
> > import org.apache.commons.math.geometry.Vector3D;
> > public class JiBXFactory {
> >     static Vector3D vector3DFactory() {
> >         return new Vector3D(0,0,0);
> >     }
> > }
> > ------------------------------------------------------------------------
> >
> >
> ------------------------------------------------------------------------------
> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> > lucky parental unit.  See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > jibx-users mailing list
> > jibx-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jibx-users
> >
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to