db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Kartha <karth...@gmail.com>
Subject Re: XMLPARSE usage?
Date Tue, 14 Feb 2006 19:57:27 GMT
I should have tried with jars. Looks like the jar files are missing
something during build, I get the same exception when I use jars instead of
the codeline (after a recent svn update)

The derby.log shows:
Database Class Loader started - derby.database.classpath=''
2006-02-14 19:49:16.100 GMT Thread[main,5,main] (XID = 126), (SESSIONID =
0), (D
ATABASE = xmldb), (DRDAID = null), Cleanup action starting
2006-02-14 19:49:16.100 GMT Thread[main,5,main] (XID = 126), (SESSIONID =
0), (D
ATABASE = xmldb), (DRDAID = null), Failed Statement is: insert into xmltab
value
s (1, xmlparse(document '<simp> doc </simp>'preserve whitespace))
java.lang.NullPointerException
        at
org.apache.derby.impl.sql.compile.ResultColumn.checkStorableExpressio
n(ResultColumn.java:837)
        at
org.apache.derby.impl.sql.compile.ResultColumnList.checkStorableExpre
ssions(ResultColumnList.java:812)
        at org.apache.derby.impl.sql.compile.InsertNode.bind(InsertNode.java
:440
)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion
(GenericStatemen
t.java:344)
        at org.apache.derby.impl.sql.GenericStatement.prepare(
GenericStatement.j
ava:118)
        at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepa
reInternalStatement(GenericLanguageConnectionContext.java:720)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(
EmbedStatement.java
:533)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(
EmbedStatement.java
:480)
        at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:313)
        at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java
:433)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310)
        at org.apache.derby.impl.tools.ij.Main.go(Main.java:203)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169)
        at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
        at org.apache.derby.tools.ij.main(ij.java:60)
Cleanup action completed

I will log a JIRA for this.

Regards,
Rajesh

On 2/14/06, Rajesh Kartha <kartha02@gmail.com> wrote:
>
> The 10.2 build you have is an old one. Try in the latest codeline and it
> should work.
>
>
> ij> create table xmltab (id integer, xml_col xml);
> 0 rows inserted/updated/deleted
> ij> insert into xmltab values (1, xmlparse(document '<simp> doc
> </simp>'preserve whitespace));
> 1 row inserted/updated/deleted
> ij> insert into xmltab values (1, xmlparse(document '<simp> doc </simp>'
> preserve whitespace));
> 1 row inserted/updated/deleted
> ij> insert into xmltab values (6, xmlparse(document '<half> <masted> bass
> </masted> boosted. </half>' preserve whitespace));
> 1 row inserted/updated/deleted
>
>
> Regards,
> Rajesh
>
> On 2/14/06, Susan Cline <home4slc@pacbell.net> wrote:
> >
> > Hi,
> >
> > I'm trying to use the XMLPARSE functionality that I believe is available
> > in the 10.2 snapshot
> > jars;
> >
> > truncated sysinfo output:
> >
> > [C:\derby\db-derby-snapshot-10.2.0.0-372122\lib\derby.jar] 10.2.0.0alpha - (372122)
> > [C:\derby\db-derby-snapshot-10.2.0.0-372122\lib\derbytools.jar] 10.2.0.0alpha -
> > (372122)
> >
> > I found this post from May 2005 that had the correct usage at the time
> > the initial patch was
> > posted:
> >
> > http://mail-archives.apache.org/mod_mbox/db-derby-dev/200505.mbox/%3C4294CF0A.5060406@sbcglobal.net%3E
> >
> >
> > [ from the above post ]
> >
> > Syntax is as follows:
> >
> > XMLPARSE( DOCUMENT <string-value-expression> PRESERVE WHITESPACE )
> >
> > Ex:
> >
> > ij> INSERT INTO xTable VALUES (1, XMLPARSE(DOCUMENT '<simp> doc </simp>'
> >
> > PRESERVE WHITESPACE));
> > 1 row inserted/updated/deleted
> >
> > [ end post ]
> >
> > However, when I try the following I get errors:
> >
> > ij> create table xmltab (id integer, xml_col xml);
> >
> > ij> insert into xmltab values (1, xmlparse(document '<simp> doc
> > </simp>'preserve whitespace));
> > ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> >
> > ij> insert into xmltab values (1, xmlparse(document '<simp> doc </simp>'
> > preserve whitespace));
> > ERROR 40XT0: An internal error was identified by RawStore module.
> >
> > Has the syntax for XMLPARSE changed?
> >
> > If so, can someone post the correct syntax?  Similarly, if the syntax
> > for XMLSERIALIZE and
> > XMLEXISTS has changed I'd like that information as well.
> >
> > Thanks!
> >
> > Susan
> >
>
>

Mime
View raw message