|
From: Henrik R. <Hen...@Gy...> - 2002-09-20 14:08:33
|
To things: I am using whitespace-saving (suppress-whitespace=3D"none"). When using = the native backend everything is ok, but when i am using MySQL as backend = whitespaces is suppress. Have MySQL or exist the blame? When using MySQL I get a NullPointerException in org.exist.xmldb.LocalColle= ction.getName(): at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java)= at java.lang.Thread.run(Thread.java:536) Caused by: java.lang.NullPointerException at org.exist.xmldb.LocalCollection.getName(LocalCollection.java:253) at org.apache.cocoon.www.xprocess_xsp.generate(xprocess_xsp.java:505) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGe= nerator.java:258) ... 44 more java.lang.NullPointerException at org.exist.xmldb.LocalCollection.getName(LocalCollection.java:253) at org.apache.cocoon.www.xprocess_xsp.generate(xprocess_xsp.java:505) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGe= nerator.java:258) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi= ngEventPipeline.java:250) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach= ingStreamPipeline.java:399) Can anyone explain? Best regards Henrik |
|
From: Jean-Christophe K. <jc...@ba...> - 2005-05-25 16:05:46
|
Hello, I work with Exist for a few months and it works well. A big thanks for all the community. I tried to execute xquery functions. Because I didn't succeed in writing xqueries with parameters (and util:eval is too long), I decided to generate my xquery with an xsl. It works well. Exist generates the result I want. But, when I want to transform my xquery results, with a plain identity transformation, for example, I get an error (java.lang.RuntimeException). If I delete the identity tranformation, everything is ok :-( I use 1.0b2-build-1107 Any ideas ? -- Jean-Christophe Kermagoret jc...@Ba... |
|
From: Michael B. <mbe...@mb...> - 2005-05-25 16:55:35
|
> > I tried to execute xquery functions. Because I didn't succeed in writing > xqueries with parameters (and util:eval is too long), I decided to > generate my xquery with an xsl. > You mean you pass parameters into an xslt transform, which uses those parameters to "hard-code" an Xquery with the values you require, which you then pass to eXist to be executed, after which you again invoke another xslt transform on the XQuery result, but which terminates with an error, no matter what the content of that transform? If so, I assume we are talking about a Cocoon pipeline (since if you were building your XQueries in native Java, you wouldn't need XSLT to parameterise them). If so the problem may not actually be an eXist one. > It works well. Exist generates the result I want. But, when I want to > transform my xquery results, with a plain identity transformation, for > example, I get an error (java.lang.RuntimeException). I'm afraid that error tells us nothing at all. We need to see more of the stacktrace to know where the exception is happening. > If I delete the > identity tranformation, everything is ok :-( Do you actually mean delete the identity transformation from the xslt sheet, or do you mean if you don't invoke the xslt on the result set at at all? > I use 1.0b2-build-1107 > Pretty ancient stuff by now, but as I say this may not be an eXist problem as such. Michael Beddow |
|
From: Jean-Christophe K. <jc...@ba...> - 2005-05-27 09:02:34
|
Thanks for your answer.
You're right, I work with Cocoon.
If I try this :
http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20exist:ser=
ialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[contains(TI=
TLE,'Tragedy')]%20return%20%3Ctest%3E{$doc/TITLE}%3C/test%3E
I have 3 results that are not displayed as usual in my FF browser (I=20
have a blank screen but source code is the following ) :
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<exist:result xmlns:exist=3D"http://exist.sourceforge.net/NS/exist"=20
exist:hits=3D"3" exist:start=3D"1" exist:count=3D"3"><test><TITLE>The Tra=
gedy=20
of Romeo and Juliet</TITLE></test><test><TITLE>The Tragedy of Hamlet,=20
Prince of Denmark</TITLE></test><test><TITLE>The Tragedy of=20
Macbeth</TITLE></test></exist:result>
If I try to read this with cocoon with the following :
<map:match pattern=3D"getTest">
<map:generate=20
src=3D"http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20ex=
ist:serialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[cont=
ains(TITLE,'Tragedy')]%20return%20%3Ctest%3E%3Cone%3E{$doc/TITLE}%3C/one%=
3E%3C/test%3E"/>
<!--map:transform src=3D"stylesheets/identity.xsl"/-->=20
<map:serialize type=3D"xml"/>
</map:match>
Then the content disappears. I obtain a blank screen with the following=20
source code :
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<exist:result xmlns:exist=3D"http://exist.sourceforge.net/NS/exist"=20
exist:hits=3D"3" exist:start=3D"1"=20
exist:count=3D"3"><test/><test/><test/></exist:result>
I can't say if it's Exist or Cocoon's fault.
For example, if I write $adoc instead of $doc inside the braces, no=20
error happens. Very strange.
Any ideas ?
Michael Beddow a =E9crit :
>>I tried to execute xquery functions. Because I didn't succeed in writin=
g
>> xqueries with parameters (and util:eval is too long), I decided to
>>generate my xquery with an xsl.
>>
>=20
> You mean you pass parameters into an xslt transform, which uses those
> parameters to "hard-code" an Xquery with the values you require, which =
you
> then pass to eXist to be executed, after which you again invoke another=
xslt
> transform on the XQuery result, but which terminates with an error, no
> matter what the content of that transform? If so, I assume we are talk=
ing
> about a Cocoon pipeline (since if you were building your XQueries in na=
tive
> Java, you wouldn't need XSLT to parameterise them). If so the problem m=
ay
> not actually be an eXist one.
>=20
>=20
>>It works well. Exist generates the result I want. But, when I want to
>>transform my xquery results, with a plain identity transformation, for
>>example, I get an error (java.lang.RuntimeException).
>=20
>=20
> I'm afraid that error tells us nothing at all. We need to see more of t=
he
> stacktrace to know where the exception is happening.
>=20
>=20
>>If I delete the
>>identity tranformation, everything is ok :-(
>=20
>=20
> Do you actually mean delete the identity transformation from the xslt s=
heet,
> or do you mean if you don't invoke the xslt on the result set at at all=
?
>=20
>=20
>>I use 1.0b2-build-1107
>>
>=20
> Pretty ancient stuff by now, but as I say this may not be an eXist prob=
lem
> as such.
>=20
> Michael Beddow
>=20
>=20
>=20
> -------------------------------------------------------
> SF.Net email is sponsored by: GoToMeeting - the easiest way to collabor=
ate
> online with coworkers and clients while avoiding the high cost of trave=
l and
> communications. There is no equipment to buy and you can meet as often =
as
> you want. Try it free.http://ads.osdn.com/?ad_id=3D7402&alloc_id=3D1613=
5&op=3Dclick
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
--=20
Jean-Christophe Kermagoret
jc...@Ba...
|
|
From: Jean-Christophe K. <jc...@ba...> - 2005-05-27 09:16:22
|
Shame on me...
I completely forgot that {} are interpreted by cocoon so I put %7B and=20
%7D instead and all is fine now...
Maybe it should be a good idea to point out this ?
Anyway, thanks for this amazing tool :-)
Jean-Christophe
Jean-Christophe Kermagoret a =E9crit :
> Thanks for your answer.
> You're right, I work with Cocoon.
>=20
> If I try this :
>=20
> http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20exist:s=
erialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[contains(=
TITLE,'Tragedy')]%20return%20%3Ctest%3E{$doc/TITLE}%3C/test%3E=20
>=20
>=20
> I have 3 results that are not displayed as usual in my FF browser (I=20
> have a blank screen but source code is the following ) :
>=20
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <exist:result xmlns:exist=3D"http://exist.sourceforge.net/NS/exist"=20
> exist:hits=3D"3" exist:start=3D"1" exist:count=3D"3"><test><TITLE>The T=
ragedy=20
> of Romeo and Juliet</TITLE></test><test><TITLE>The Tragedy of Hamlet,=20
> Prince of Denmark</TITLE></test><test><TITLE>The Tragedy of=20
> Macbeth</TITLE></test></exist:result>
>=20
> If I try to read this with cocoon with the following :
>=20
> <map:match pattern=3D"getTest">
> <map:generate=20
> src=3D"http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20=
exist:serialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[co=
ntains(TITLE,'Tragedy')]%20return%20%3Ctest%3E%3Cone%3E{$doc/TITLE}%3C/on=
e%3E%3C/test%3E"/>=20
>=20
> <!--map:transform src=3D"stylesheets/identity.xsl"/-->
> <map:serialize type=3D"xml"/>
> </map:match>
>=20
> Then the content disappears. I obtain a blank screen with the following=
=20
> source code :
>=20
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <exist:result xmlns:exist=3D"http://exist.sourceforge.net/NS/exist"=20
> exist:hits=3D"3" exist:start=3D"1"=20
> exist:count=3D"3"><test/><test/><test/></exist:result>
>=20
> I can't say if it's Exist or Cocoon's fault.
>=20
> For example, if I write $adoc instead of $doc inside the braces, no=20
> error happens. Very strange.
>=20
> Any ideas ?
>=20
>=20
> Michael Beddow a =E9crit :
>=20
>>> I tried to execute xquery functions. Because I didn't succeed in writ=
ing
>>> xqueries with parameters (and util:eval is too long), I decided to
>>> generate my xquery with an xsl.
>>>
>>
>> You mean you pass parameters into an xslt transform, which uses those
>> parameters to "hard-code" an Xquery with the values you require, which=
=20
>> you
>> then pass to eXist to be executed, after which you again invoke=20
>> another xslt
>> transform on the XQuery result, but which terminates with an error, no=
>> matter what the content of that transform? If so, I assume we are=20
>> talking
>> about a Cocoon pipeline (since if you were building your XQueries in=20
>> native
>> Java, you wouldn't need XSLT to parameterise them). If so the problem =
may
>> not actually be an eXist one.
>>
>>
>>> It works well. Exist generates the result I want. But, when I want to=
>>> transform my xquery results, with a plain identity transformation, fo=
r
>>> example, I get an error (java.lang.RuntimeException).
>>
>>
>>
>> I'm afraid that error tells us nothing at all. We need to see more of =
the
>> stacktrace to know where the exception is happening.
>>
>>
>>> If I delete the
>>> identity tranformation, everything is ok :-(
>>
>>
>>
>> Do you actually mean delete the identity transformation from the xslt =
>> sheet,
>> or do you mean if you don't invoke the xslt on the result set at at al=
l?
>>
>>
>>> I use 1.0b2-build-1107
>>>
>>
>> Pretty ancient stuff by now, but as I say this may not be an eXist=20
>> problem
>> as such.
>>
>> Michael Beddow
>>
>>
>>
>> -------------------------------------------------------
>> SF.Net email is sponsored by: GoToMeeting - the easiest way to=20
>> collaborate
>> online with coworkers and clients while avoiding the high cost of=20
>> travel and
>> communications. There is no equipment to buy and you can meet as often=
as
>> you want. Try it=20
>> free.http://ads.osdn.com/?ad_id=3D7402&alloc_id=3D16135&op=3Dclick
>> _______________________________________________
>> Exist-open mailing list
>> Exi...@li...
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>=20
>=20
>=20
--=20
Jean-Christophe Kermagoret
jc...@Ba...
|
|
From: Michael B. <mbe...@mb...> - 2005-05-27 09:35:31
|
Jean-Christophe Kermagoret wrote:
> I completely forgot that {} are interpreted by cocoon so I put %7B and
> %7D instead and all is fine now...
Ah well, it's good to have an environment where people are encouraged to
scrutinise their own questions and discover the answers in the process
(though Socrates thought of that idea first).
Glad to hear that your problem is now solved. I do, however, have a sense
that the way you're approaching things may be making your use of eXist a
little more complicated (= among other things, harder to debug) than it
needs to be. But obviously that's just my personal hunch based on a small
glimpse of your coding, and I'm no Cocoon expert anyway. But if you can find
another Cocoon user locally, it might be helpful for you to do a joint
walk-through of your current use of Cocoon to wrap eXist, and see if any
suggestions emerge.
Michael Beddow
|
|
From: Jean-Christophe K. <jc...@ba...> - 2005-05-27 10:07:30
|
Hi
I agree it's not a very common use, and certainly a misuse, but here is=20
the whole story.
I did that only because I don't want to use util:eval that takes too=20
much time. Maybe I'm wrong.
I just want to build a xquery with a few parameters :
(::pragma exist:serialize omit-xml-declaration=3Dno::)
xquery version "1.0";
declare namespace f=3D"http://bluexml.org/xquery/local-functions";
declare namespace fn=3D"http://www.w3.org/2003/05/xpath-functions";
declare namespace util=3D"http://exist-db.org/xquery/util";
declare namespace fd=3D"http://apache.org/cocoon/forms/1.0#definitio=
n";
declare function f:main() as element()* {
(: We should use util:eval to make thing more parametrizable
but it's 20 times slower :)
let $xpath :=3D '/document'
let $path :=3D 'meta/author'
for $doc in $xpath
return (
<fd:item>
<fd:value>{util:document-name($doc)}</fd:value>
(: If I use util:eval, I notice performances are very bad, because of=20
string manipulation ? no caching ? I don't know... To circumvent this=20
problem, I so decided to generate thrgouh xml+xsl my xquery. :)
<fd:label>{util:eval(concat($doc,$path)}</fd:label>
(: I can't do this :)
<fd:label>{$doc/$path}</fd:label>
</fd:item>
)
};
<fd:selection-list>
{f:main()}
</fd:selection-list>
Any ideas to do that ?
Michael Beddow a =E9crit :
> Jean-Christophe Kermagoret wrote:
>=20
>=20
>>I completely forgot that {} are interpreted by cocoon so I put %7B and
>>%7D instead and all is fine now...
>=20
>=20
> Ah well, it's good to have an environment where people are encouraged t=
o
> scrutinise their own questions and discover the answers in the process
> (though Socrates thought of that idea first).
>=20
> Glad to hear that your problem is now solved. I do, however, have a sen=
se
> that the way you're approaching things may be making your use of eXist =
a
> little more complicated (=3D among other things, harder to debug) than =
it
> needs to be. But obviously that's just my personal hunch based on a sma=
ll
> glimpse of your coding, and I'm no Cocoon expert anyway. But if you can=
find
> another Cocoon user locally, it might be helpful for you to do a joint
> walk-through of your current use of Cocoon to wrap eXist, and see if an=
y
> suggestions emerge.
>=20
> Michael Beddow
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=3Doffad-ysdn-ostg-q=
22005
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
--=20
Jean-Christophe Kermagoret
jc...@Ba...
|