Hi Sven
I've added a unit test case called testCreateXPathBug() to the test case
org.dom4j.TestXPath in dom4j/src/test. It seems to work fine when just
creating a new DefaultElement instance. So I can't reproduce your problem.
Could you create a bit of test code that demonstrates your problem? Are you
using your own special DocumentFactory or doing anything wierd or groovy?
James
----- Original Message -----
From: "Sven Behrens" <[EMAIL PROTECTED]>
To: "James Strachan" <[EMAIL PROTECTED]>
Cc: "dom4j-user" <[EMAIL PROTECTED]>
Sent: Tuesday, May 14, 2002 8:59 AM
Subject: Re: [dom4j-user] NullPointer in AbstractNode.createXPath
> Hi James,
>
> I am using:
>
> org.dom4j.tree.DefaultElement
>
>
> +sven.
>
>
> James Strachan wrote:
> > Hi Sven
> >
> > Typically the getDocumentFactory() method of AbstractNode should never
> > return null. What implementation of node are you using? e.g. what is the
> > classname of the node you're calling createXPath() on? It'd help to
track
> > down the problem...
> >
> > James
> > ----- Original Message -----
> > From: "Sven Behrens" <[EMAIL PROTECTED]>
> > To: "dom4j-user" <[EMAIL PROTECTED]>
> > Sent: Monday, May 13, 2002 2:27 PM
> > Subject: [dom4j-user] NullPointer in AbstractNode.createXPath
> >
> >
> >
> >>Hello,
> >>
> >>Maybe I found a bug in dom4j 1.3:
> >>
> >>I am getting a NullPointer. This happened just one time (at least I
> >>noticed it just one time).
> >>
> >>Here is the StackTrace:
> >>
> >>java.lang.NullPointerException
> >> at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
> >> at org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:163)
> >>
> >>
> >>I call the method with a static final initialized Variable, which is
> >>definedly not null. It works almost all the time and I can not reproduce
> >
> > it.
> >
> >>
> >>The method in question looks like this in
> >>* @version $Revision: 1.23 $
> >>:
> >>
> >>
> >> public XPath createXPath(String xpathExpression) {
> >> return getDocumentFactory().createXPath(xpathExpression);
> >> }
> >>
> >>So, it seems to me that getDocumentFactory() returns null.
> >>
> >>
> >>Best regards,
> >> Sven Behrens.
>
>
>
> _______________________________________________________________
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user