hi john,
just a few things to try out:
it seems to me that an exception is thrown from esql (that's why the
result stops after the opening tag). either have a look into the logs
for the exception or include something like
<esql:error-results><esql:get-message /></esql:error-results>
into your connection tag. this might help you track down the error.
possible sources:
you should be sure that the jdbc settings for your pool are correct.
test with a small java program (like Class.forName("org.postgres...");
DriverManager.getConnection("jdbc://postgres...","user","passwd");) and
check if that works.
check that your db driver gets loaded at startup (did you put it in
web.xml?). you'll find a log entry stating that.
bye, nils
________________________________________________
Nils Le�mann
Stockacher Str. 38
68239 Mannheim
0175 - 814 899 8
-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 23. Dezember 2002 02:09
An: [EMAIL PROTECTED]
Betreff: ESQL taglib missing in action
I'm trying to convert a simple XSP application from AxKit to
Cocoon, and ESQL isn't being interpreted.
In my original application, the uninterpreted XML shows up in my
output documents. To simplify my testing, I tried two things:
1) Running a simple example from the request taglib to make sure
taglibs in general were working. They were.
2) Running the sample ESQL from the Cocoon documentation, hoping
I would get some sort of error to indicate that the sample
database configuration wasn't present, but that the esql
taglib was being invoked. No such luck.
For the 2nd test, I used the following XSP page:
---
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<esql:connection>
<esql:pool>myConnection</esql:pool>
<esql:execute-query>
<esql:query>SELECT content FROM xml_document where id =
1</esql:query>
<esql:results>
<table>
<esql:row-results>
<tr>
<td><esql:get-string column="content"/></td>
</tr>
</esql:row-results>
</table>
</esql:results>
<esql:no-results>
<p>Sorry, no results!</p>
</esql:no-results>
</esql:execute-query>
</esql:connection>
</xsp:page>
---
The entire contents of the resulting "HTML" page:
---
<esql:connection
xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp="http://apache.org/xsp">
---
Note that my original application includes all the ESQL tags and
their contents; I don't know why I'm getting just the connection
tag from the sample app.
My pipeline from sitemap:
---
<map:pipeline>
<map:match pattern="db.html">
<map:generate src="newsletter/xsp/db.xsp" type="serverpages"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
---
>From cocoon.xconf:
---
<builtin-logicsheet>
<parameter name="prefix" value="esql"/>
<parameter name="uri"
value="http://apache.org/cocoon/SQL/v2"/>
<parameter name="href"
value="resource://org/apache/cocoon/components/language/markup/xsp/java/
esql.xsl"/>
</builtin-logicsheet>
---
I'm using Postgres, and it's entirely possible that my JDBC
driver is not set up properly, but this doesn't strike me as a
database configuration problem if the esql tags are showing up in
the output.
Relevant software versions:
Java: 1.4.1 (beta, Blackdown release)
Tomcat: 4.1.18
Cocoon: 2.0.4
Many thanks for any assistance. I started working with Cocoon
this weekend, so it's entirely possible I am overlooking
something obvious.
<tangent>
Incidentally, while experimenting with the JDBC connectivity, I
noticed that the JDBC example in the Cocoon documentation refers
to a class that doesn't exist: org.apache.cocoon.Roles. Is this
a recent change that has not yet been documented?
On the topic of documentation, I also noticed that the API docs
don't link to the org.apache.avalon docs; that would seem to be a
particularly relevant API for cross-referencing.
</tangent>
--
John R. Daily [EMAIL PROTECTED]
Director of Technology Progeny Linux Systems
Master of the ephemeral epiphany
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>