I'm sorry to the spam the list like this, but now I've got the feeling
I'm really getting somewhere:

I've set up cocoon-2.0.3 binary release for j2sdk1.4 and added a pool
for MySQL Connector/J .

Now I've actually managed to get some row data from a MySQL database
using SQLTransformer!

But with ESQL it still fails in:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error
opening connection to dburl: : No suitable driver

Now besides being curious about solving this error, I'd like to know why
or why not I should stickt with SQLTransformer. In other words, why
should I care about ESQL?

JW

P.s. I'm not going to post the pool setup, since SQLTransformer clearly
got a connection from it so it works.

query.xsp:
----------

<?xml version="1.0"?>
<xsp:page
        language="java"
        xmlns:xsp="http://apache.org/xsp";
        xmlns:esql="http://apache.org/cocoon/SQL/v2";>
        <root>
                <esql:connection>
                        <esql:execute-query>
                                <!-- connection information -->
                                <esql:pool>mysql</esql:pool>
                                
                                <!-- SQL query -->
                                <esql:query>
                                        select something from that 
                                </esql:query>
                                <!-- result processing elements -->
                                <esql:results>
                                        <esql:row-results>
                                                <that>
        
<esql:get-columns/>
                                                </that>
                                        </esql:row-results>
                                </esql:results>
                                <esql:update-results/>
                                <esql:no-results/>
                                <esql:error-results/>
                        </esql:execute-query>
                
                </esql:connection>
        </root>
</xsp:page>

sitemap.xmap: (this is a subsitemap of cocoon/sitemap.xmap)
-------------

<?xml version="1.0"?>

<!-- sitemap for mysqltest -->

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

  <!-- ======= Components ======= -->
  <map:components>
    <map:generators default="file">
        <map:generator label="content,data"
logger="sitemap.generator.serverpages" name="serverpages" pool-grow="2"
pool-max="32" pool-min="4"
src="org.apache.cocoon.generation.ServerPagesGenerator"/>
        </map:generators>
    <map:transformers default="xslt"/>
    <map:readers default="resource"/>
    <map:serializers default="html"/>
    <map:selectors default="browser"/>
    <map:matchers default="wildcard">
      <map:matcher name="wildcard"
        src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/>
    </map:matchers>
  </map:components>

  <!-- ======= Pipelines ======= -->
  <map:pipelines>
    <map:pipeline>
                 <map:match pattern="index.html">
                        <map:read src="documents/static/index.html"
mime-type="text/html"/>
                 </map:match>
                 <map:match pattern="esqltest.xml">
                        <map:generate src="logic/query.xsp"
type="serverpages"/>
                        <map:serialize type="xml"/>
                 </map:match>
                        
                <map:match pattern="sqlttest.xml">
                        <map:generate src="documents/mysqltest.xml"/>
                        <map:transform type="sql">
                        <map:parameter name="use-connection"
value="mysql"/>
                    </map:transform>
                        <map:serialize type="xml"/>
                </map:match>
        </map:pipeline>
  </map:pipelines>
                
</map:sitemap>



---------------------------------------------------------------------
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]>

Reply via email to