cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Manuel Andrade Muñoz" <iandrad...@hotmail.com>
Subject HELP,HELP PLEASE : Error opening connection to dburl: jdbc:postgresql://loca
Date Tue, 15 Jan 2002 19:53:31 GMT
Hello ALL.

The error is:

**************************************************************

------------------------------------------------------------------
Cocoon 1.8.2
------------------------------------------------------------------

		Error found handling the request.

java.lang.RuntimeException: Error opening connection to dburl:
jdbc:postgresql://localhost/test
         at

_usr._local._jakarta._build._tomcat._webapps._cocoon._samples._sql._esql.pop
ulateDocument(_esql.java:162)
         at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
        at

org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:527)
         at org.apache.cocoon.Engine.handle(Engine.java:384)
         at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)
         at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
         at

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
         at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)

--------------------------------------------------------------
Warning: this page has been dynamically generated.
Copyright (c) 1999-2001 The Apache XML Project.
All rights reserved.
--------------------------------------------------------------

***************************************************************

I have installed:

Red Hat Linux 7.2
Sun JDK 1.3.1_01
Apache 1.3.19
Tomcat 3.2.3
Cocoon 1.8.2
Postgresql 7.1.3
jdbc7.1-1.2
-------------------------
Note: form postgresql 7.1.3, with the option -- with-java

I have formed my archive:

My file .bash_profile.
------------------------------------------------------------
# .bash_profile

# User specific environment and startup programs

JAKARTA_HOME=/usr/local/jakarta
ANT_HOME=$JAKARTA_HOME/jakarta-ant

PATH=$PATH:$HOME/bin:/usr/java/jdk1.3.1_01/bin:$ANT_HOME/bootstrap/bin:/usr/
local/pgsql/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"
JAVA_HOME=/usr/java/jdk1.3.1_01
#JAKARTA_HOME=/usr/local/jakarta
#ANT_HOME=$JAKARTA_HOME/jakarta-ant
TOMCAT_HOME=$JAKARTA_HOME/build/tomcat
COCOON_HOME=/usr/local/cocoon1.8.2/
PG=/usr/local/pgsql
PGLIB=$PG/lib
MANPATH=$MANPATH:$PG/man
CLASSPATH=/usr/local/jdbc7.1-1.2.jar
export USERNAME BASH_ENV JAVA_HOME JAKARTA_HOME ANT_HOME TOMCAT_HOME
COCOON_HOME PATH CLASSPATH
--------------------------------------------------------------------------

My archive esql.xml is:

<?cocoon-process type="xslt"?>
<?xml-stylesheet type="text/xsl" href="esql.xsl"?>

<xsp:page
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
>

<page>

<esql:connection>
  <esql:driver>org.postgresql.Driver</esql:driver>
  <esql:dburl>jdbc:postgresql://localhost/test</esql:dburl>
  <esql:username>postgres</esql:username>
  <esql:password>postgres</esql:password>
  <esql:execute-query>
    <esql:query>select id,name from department_table</esql:query>
    <esql:results>
      <header>header info</header>
      <esql:row-results>
        <department>
          <id><esql:get-int column="id"/></id>
          <name><esql:get-string column="name"/></name>
          <esql:connection>
            <esql:driver>org.postgresql.Driver</esql:driver>
            <esql:dburl>jdbc:postgresql://localhost/test</esql:dburl>
            <esql:username>test</esql:username>
            <esql:password>test</esql:password>
            <esql:execute-query>
              <esql:query>select name from user_table where department_id = 
<esql:parameter type="int"><esql:get-int ancestor="1" 
column="id"/></esql:parameter></esql:query>
              <esql:results>
                <esql:row-results>
                  <user><esql:get-string column="name"/></user>
                </esql:row-results>
              </esql:results>
              <esql:no-results>
                <user>No employees</user>
              </esql:no-results>
            </esql:execute-query>
          </esql:connection>
        </department>
      </esql:row-results>
      <footer>footer info</footer>
    </esql:results>
  </esql:execute-query>
</esql:connection>

</page>

</xsp:page>
-----------------------------------------------------------------
Where test, is my data base poststoneware is the account that I use to raise 
the postmaster and to enter my data base.

For example, in my data base test:To me it shows

test=# select * from pg_user;
usename  | usesysid | usecreatedb | usetrace | usesuper | usecatupd |  
passwd  | valuntil
----------+----------+-------------+----------+----------+-----------+----------+----------
postgres |      420 | t           | t        | t        | t         | 
******** |
(1 row)

That you would recommend to me to do?.
To change something in esql.xml?.
As the username and password of my data base in postmaster?.
As I create a username to him and password to a data base?.

>From already thanks for your aid.
Ivan Manuel Andrade Muñoz.
Punta Arenas.
Chile.
FONO: (061) 243046







_________________________________________________________________
Con MSN Hotmail súmese al servicio de correo electrónico más grande del 
mundo. http://www.hotmail.com/ES


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message