Hi johan

This looks like some kind of bug. I've just applied a little patch that
should avoid the null pointer exception. See if this helps. If it doesn't
it'd be nice to refactor what you're doing into a JUnit test case we can add
to betwixt to help fix it (and keep it fixed)

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Johan Lundberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 11, 2002 5:12 PM
Subject: [betwixt] NullPointerException


Hi

I am using betwixt in combination with Torque (Turbine DB-layer) in
order to generate XML, which is used for transforming XSL stylesheets to
HTML.

Somewhere during the process of transforming the Torque beans to XML I
get a NullPointerException from betwixt code. See the short versions of
stack trace and the Log4j DEBUG output below.

I do not know if the exception is a bug in betwixt since I believe that
betwixt can handle object values that are null.

Any help would be appreciated.

/johan





java.lang.NullPointerException
 at
org.apache.commons.betwixt.XMLIntrospector.introspect(XMLIntrospector.java:1
88)
 at
org.apache.commons.betwixt.io.AbstractBeanWriter.write(AbstractBeanWriter.ja
va:183)
 at
org.apache.commons.betwixt.io.AbstractBeanWriter.writeContent(AbstractBeanWr
iter.java:496)
 at
org.apache.commons.betwixt.io.AbstractBeanWriter.writeRestOfElement(Abstract
BeanWriter.java:431)
 at
org.apache.commons.betwixt.io.AbstractBeanWriter.write(AbstractBeanWriter.ja
va:414)
 at
org.apache.commons.betwixt.io.AbstractBeanWriter.write(AbstractBeanWriter.ja
va:216)
 at
org.apache.commons.betwixt.io.AbstractBeanWriter.writeContent(AbstractBeanWr
iter.java:506)
 at
org.apache.commons.betwixt.io.AbstractBeanWriter.writeRestOfElement(Abstract
BeanWriter.java:431)





37214 [Thread-4] DEBUG org.apache.commons.betwixt.io.AbstractBeanWriter
  - Writing bean graph (qualified name 'value'

37214 [Thread-4] DEBUG org.apache.commons.betwixt.XMLIntrospector  -
Introspecting...

37214 [Thread-4] DEBUG org.apache.commons.betwixt.XMLIntrospector  -
[Lorg.apache.torque.om.SimpleKey;@538974

37215 [Thread-4] DEBUG org.apache.commons.betwixt.XMLIntrospector  -
Attempting to lookup an XML descriptor for class: class
[Lorg.apache.torque.om.SimpleKey;

37226 [Thread-4] DEBUG org.apache.commons.betwixt.XMLIntrospector  -
ElementDescriptor[qname=SimpleKey;,class=class
[Lorg.apache.torque.om.SimpleKey;,singular=class
[Lorg.apache.torque.om.SimpleKey;]

37231 [Thread-4] DEBUG org.apache.commons.betwixt.XMLIntrospector  -
XMLBeanInfo [class=class [Lorg.apache.torque.om.SimpleKey;,
descriptor=ElementDescriptor[qname=SimpleKey;,class=class
[Lorg.apache.torque.om.SimpleKey;,singular=class
[Lorg.apache.torque.om.SimpleKey;]]

37243 [Thread-4] DEBUG org.apache.commons.betwixt.io.AbstractBeanWriter
  - Writing bean graph (qualified name 'null'

37243 [Thread-4] DEBUG org.apache.commons.betwixt.XMLIntrospector  -
Introspecting...

37244 [Thread-4] DEBUG org.apache.commons.betwixt.XMLIntrospector  -



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to