commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Marendo <jmare...@yahoo.com>
Subject Betwixt Tutorial Problem
Date Wed, 15 Feb 2006 18:33:01 GMT
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.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message