Hi Jacob

Is this from the plain XPath/Xquery sample? If so I'm not getting the
> same issue, which makes me wonder if its something in your
> environment.


well I don't know. Actually I've followed the README:

1. Set XMLBEANS_HOME in your environment
2. Ant must be on your PATH
3. xbean_xpath.jar and saxon8.jar must be on your class path.
   These files are created in the build/lib directory when you
   build XMLBeans from source.
4. To compile the schemas and sample source, run "ant build"
5. To execute the sample, run "ant run"

and the "ant run" gives me the error.

Should I set any other thing in my environment ?

I've downloaded xmlbeans-2.3.0 but not compiled from source. I have
saxon8.jar and xbean_xpath.jar in my classpath, etc.

Regards,
Pascal


> If not, what is the code thats causing this (query, xsd, java, etc.)
> Thanks,
> -jacobd
>
> On Feb 13, 2008 8:10 AM, Pascal Maugeri <[EMAIL PROTECTED]> wrote:
> > Jacob
> >
> > I get the following error when I try to run the sample:
> >
> >      [echo] ============================== running XQueryXPath
> >      [java] Running ExecQuery.selectEmpsByStateCursor
> >      [java]
> >      [java] Exception in thread "main" java.lang.NullPointerException
> >       [java]     at
> > net.sf.saxon.query.StaticQueryContext.buildDocument(
> StaticQueryContext.java:412)
> >      [java]     at
> > org.apache.xmlbeans.impl.xquery.saxon.XBeansXQuery.execQuery(
> XBeansXQuery.java:79)
> >      [java]     at
> >
> org.apache.xmlbeans.impl.store.Query$SaxonQueryImpl$SaxonQueryEngine.cursorExecute
> (Query.java:345)
> >       [java]     at
> > org.apache.xmlbeans.impl.store.Query$SaxonQueryImpl.cursorExecute(
> Query.java:243)
> >      [java]     at
> > org.apache.xmlbeans.impl.store.Query.cursorExecQuery(Query.java:48)
> >      [java]     at
> > org.apache.xmlbeans.impl.store.Cursor._execQuery(Cursor.java:1336)
> >       [java]     at
> > org.apache.xmlbeans.impl.store.Cursor._execQuery(Cursor.java:1331)
> >      [java]     at
> > org.apache.xmlbeans.impl.store.Cursor.execQuery(Cursor.java:3839)
> >      [java]     at
> > org.apache.xmlbeans.samples.xquery.ExecQuery.updateWorkPhone(
> ExecQuery.java:74)
> >       [java]     at
> > org.apache.xmlbeans.samples.xquery.XQueryXPath.executeQueries(
> XQueryXPath.java:75)
> >      [java]     at
> > org.apache.xmlbeans.samples.xquery.XQueryXPath.main(XQueryXPath.java:54)
> >      [java] Java Result: 1
> >
> > I followed the instructions in the README (setting environment
> variables,
> > etc.).
> >
> > Do you have any idea of what could be my problem ?
> >
> > Thanks for your help
> > Pascal
> >
> >
> >
> >
> >
> >
> >
> >
> >  On Feb 10, 2008 8:27 PM, Jacob Danner <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > Take a peek at
> > > http://xmlbeans.apache.org/samples/XQueryXPath.html
> > >
> > > -jacobd
> > >
> > >
> > >
> > >
> > > On Feb 10, 2008 7:56 AM, Pascal Maugeri <[EMAIL PROTECTED]>
> wrote:
> > > > Hi
> > > >
> > > > I need to do this simple operation: having a XML document (as a
> String
> > for
> > > > instance) I want to apply to it an XPath query and to get the XML
> > fragment
> > > > result in a new String.
> > > >
> > > > Could you give me some source code sample or a link ?
> > > >
> > > > Thanks in advance
> > > > Pascal
> > > >
> > >
> > >
> > >
> > > --
> > > I'm competing in a Half-Ironman distance triathlon to raise money for
> > > the fight against cancer!
> > > Please help support my efforts by going to:
> > > http://www.active.com/donate/tntwaak/jacobd
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
>
>
>
> --
> I'm competing in a Half-Ironman distance triathlon to raise money for
> the fight against cancer!
> Please help support my efforts by going to:
> http://www.active.com/donate/tntwaak/jacobd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to