I've downloaded Betwixt 0.7 and cannot seem to get the RSSApplication to run
correctly. I created two files (channel.betwixt and image.betwixt) that
contains the respective content from the tutorial, and I supply the
channel.betwixt file as input when running the application. Perhaps this is
where I'm going wrong.
In any case, what happens is that I get a NullPointerException when the
channel.getTitle() piece is executed in the plainTextSummary(Channel channel)
method. This happens b/c the statement:
Channel channel = (Channel) reader.parse(file);
results in a null value being returned.
I modified the code so that the Channel class is registered like so:
reader.registerBeanClass("info", Channel.class);
After I did that, I no longer get a NPE. Instead I get a Channel instance
that appears to have nothing but default values. That is, the contents from
the XML file (channel.betwixt) are not used to initialize the instance as I
would expect. Here is the output for that scenario:
Feb 15, 2006 11:53:51 AM org.apache.commons.betwixt.expression.Context
popOptions
INFO: Cannot pop options off empty stack
Feb 15, 2006 11:53:51 AM org.apache.commons.betwixt.expression.Context
popOptions
INFO: Cannot pop options off empty stack
channel: null
url: null
copyright: Public Domain
I'm probably missing something simple. Please reply and help me get on the
right track! Thanks.
Jeff
p.s. It's worth noting that I ran the WriteExampleApp and ReadExampleApp
(both using the PersonBean class that is provided in the Examples section)
without a problem (except for the INFO messages, which still appear).
However, the XML used for that example seems simpler than that used in the
tutorial.
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.