commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Crumley <crum...@gmail.com>
Subject Re: ClassCastException with betwixt 0.6
Date Thu, 16 Dec 2004 23:15:42 GMT
Thanks a bunch for helping me out. I was able to get the example
working. It seems my problem was related to classpath and not using
the correct dependencies. I ran "ant get-deps" to create target/lib
and copied those jars to my sandbox lib directory. After doing that
the example code ran as expected.

Maven looks very interesting. Up until this point I had only used ant
as a build tool.

Again thanks for the tips and patience.

ryan


On Thu, 16 Dec 2004 22:25:23 +0000, robert burrell donkin
<robertburrelldonkin@blueyonder.co.uk> wrote:
> hi ryan
> 
> On 16 Dec 2004, at 05:19, Ryan Crumley wrote:
> 
> > I was quite excited that the problem may have been found however I
> > changed the code so that the configuration object is shared between
> > the writer and reader and I am still receiving a null object back from
> > the reader. The new code is listed below.
> >
> > The output when running the program is:
> >
> >    out: <?xml version='1.0'?><PersonBean age="24" name="ryan c"
> > id="1"/>
> >    null
> 
> hmmm...
> 
> i've run the same code against CVS HEAD in eclipse and i get:
> 
> out: <?xml version='1.0'?><PersonBean age="24" name="ryan c" id="1"/>
> 
> [org.apache.commons.betwixt.PersonBean: age=24 name=ryan c]
> 
> 
> > I am still at a loss why this simple example is not working. The only
> > thing I can think of (unless someone sees a problem with the code I am
> > using below) is that my jar versions are not correct. However I used
> > the same jars that maven appears to use when running regression (which
> > passes). Any ideas on where to go next?
> 
> this seems very strange.
> 
> i suspect that it's a problem with the classpath: an old jar getting in
> or something. if you have CVS HEAD checked out then an easy way to test
> this hypothesis is to add your code as a test case into src/test.
> provided that it's named TestXXX then maven will automatically find it
> and run it (as a unit test). (we generally use test driven development
> on betwixt so this is the way that all new code starts and so it's the
> way that we're most confident about the configuration).
> 
> FYI maven builds into target. running maven should generate a
> commons-betwixt-0.6.1-dev.jar in there. that's the actual library code.
> the test classes are built into test-classes.
> 
> - robert
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message