cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Not Available <aseriousis...@yahoo.com>
Subject Re: esql not working at all, no connection ever created!
Date Tue, 01 Apr 2003 18:32:55 GMT

The part that says
<esql:pool>db_pool</esql:pool>
was pointing to another pool i was trying with no luck.
I had it as <esql:pool>antiques</esql:pool> as it should be and it still does
not work.
 Not Available <aseriousissue@yahoo.com> wrote:
Here is my xsp code: 
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
        xmlns:esql="http://apache.org/cocoon/SQL/v2">
  
  <esql:connection>
   <esql:pool>db_pool</esql:pool>
          <esql:execute-query>
    <esql:query>
     select * from antiques
    </esql:query>
          <esql:results>
           <esql:row-results>
            <esql:get-int column="id"/>
            <esql:get-string column="name"/>
           </esql:row-results>
          </esql:results>
          </esql:execute-query>
  </esql:connection>
</xsp:page> 
Here is my web.xml: 
<init-param>
      <param-name>load-class</param-name>
      <param-value>
        <!-- For IBM WebSphere:
        com.ibm.servlet.classloader.Handler --> 
        <!-- For Database Driver: -->
        org.hsqldb.jdbcDriver
  com.mysql.jdbc.Driver
        <!-- For parent ComponentManager sample:
        org.apache.cocoon.samples.parentcm.Configurator
        -->
      </param-value>
    </init-param>

Here is my cocoon.config: 
<jdbc name="antiques">
     <pool-controller min="5" max="10"/>
     <dburl>jdbc:mysql://localhost/databasename?autoReconnect=true</dburl>
     <user>myusername</user>
     <password>mypassword</password>
   </jdbc> 
Here is my pipeline for testing: 
<map:pipeline>
   <map:match pattern="content/*.xml">
    <map:generate type="xsp" src="content/{1}.xsp"/>
    <map:serialize type="xml"/>
   </map:match>
  </map:pipeline> 
Thanks again 
 Christopher Painter-Wakefield <paint007@mc.duke.edu> wrote: 
Please post your xsp code, or at least the portion with esql in it. Very
hard to help, otherwise.

-Christopher




|---------+---------------------------->
| | Not Available |
| | | | hoo.com> |
| | |
| | 04/01/2003 03:47 |
| | AM |
| | Please respond to|
| | cocoon-users |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------|
| |
| To: cocoon-users@xml.apache.org |
| cc: |
| Subject: esql not working at all, no connection ever created! |
>--------------------------------------------------------------------------------------------------------------|




I have been trying to get esql to work now for about 3 days with no luck. I
beleive i have configured everything correctly but when I run any xsp page
with esql it returns a duplicated page of my xsp page except that it stops
at the esql:connection tag. When I look at the error log it says there was
a null pointer exception. After examining the generated java file I think
it is because a connection object is always null (never set to a valid
connection). However I am pretty confident my pool is set up correctly and
the drivers are being loaded ok.


Here is the code that it points to in the java file:


_esql_query = new EsqlQuery( _esql_connection, String.valueOf(
""


+ " select * from antiques "
+ " "
) );


No where above this code is the _esql_connection every initialized with a
connection.


I am using the latest release for java 1.4.1 and running windows me with
mysql.


Thanks,


Kris






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more


---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
Mime
View raw message