commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [betwixt] Sample code not working
Date Thu, 04 Aug 2005 21:57:48 GMT
On Wed, 2005-08-03 at 23:48 -0700, Kirill Grouchnikov wrote:
> Should i be running the tests? 

i think that dion was trying to establish whether it's the local
environment. if you're building from source then running the tests is a
good way to discover whether everything's ok. since you're using a
binary, is it the latest release (0.7)?

> I've downloaded betwixt and
> all dependencies (commons, xml, ...), and ran the sample
> code for writing bean to xml and reading bean from xml.

which sample code?

it doesn't look like the code on the getting start page, not like the
tutorial. i'm going to guess that you're running one from the example
page (please correct me if i'm wrong)...

> The writing didn't produce values for subelements, and the
> unmarshaling failed completely with two error messages.

i've just pulled the code from the website and run it in ecplise. i get
the following trace from the read sample:

INFO: Cannot pop options off empty stack
PersonBean[name='James Smith',age='25']04-Aug-2005 22:50:30
org.apache.commons.betwixt.expression.Context popOptions
INFO: Cannot pop options off empty stack

which is right (the person bean is populated)

for the write i get;

<?xml version='1.0' ?>  <person>
    <name>John Smith</name>

which is also correct.

so, these examples work fine for me. so, i think that it's probably some
kind of environmental or setup issue. the best thing to do would be to
run again with logging turned up nice and high.

this bit of the trace:

Could not create instance of type:

suggests to me that you have an issue with your classpath, access
permissions on the bean or don't have an empty constructor for the bean,

- robert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message