You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Roberto <rm...@montefiore.ch> on 2004/10/19 16:23:44 UTC

Classpath

Hya there,
would just to understand if I need to set the CLASSPATH enviroment variable to use Cocoon. Let me tell first my configuration:

Window2000 PRO :-(
Cocoon 2.1.5
JDK 1.4.2
MySQL 4.1

I don't have any Tomcat or whatever. The problem is that I can't connect to the database. I already properly setted the following file:

cocoon.xconf
<jdbc name="mysql_pool">
<pool-controller min="5" max="10"/>
<dburl>jdbc:mysql://localhost:3306/montefiore</dburl>
<user>root</user>
<password/> (tried with password & not)
</jdbc>

web.xml
<init-param>
<param-name>load-class</param-name>
<param-value> org.gjt.mm.mysql.Driver</param-value>
</init-param>

& properly added the mysql-connector-java-3.0.6-stable-bin.jar under WEB-INF/lib.

I guess I got everything setted ok. The problem is that the error.log file tell me that he cant get the connection to the db. In some IBM tutorial I read that I have take care about the CLASSPATH variable, is that true? I mean, because they make example with Tomcat installed either.

Any suggestion?
Thanx in advance
Ciao
ROb

CForms "fd:hint" and "fd:help" tags

Posted by pr...@gmx.de.
Good Morning!

CForms has the "fd:hint" and "fd:help" tags. The "help" tag gets displayed
with  a "?" as a link and opens a Javascript field. Okay but how does the
"hint" tag work?

Thank you as always!
phil


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


Re: Classpath

Posted by Neil Bacon <nb...@pinnaclesoftware.com.au>.
only vaguely related:

I had a JDBC class loading issue in upgrading from jakarta-tomcat-5.0.25
to 5.0.28.

My web.xml load-class parameter lists my JDBC driver classes.

With 5.0.25 I used to have my JDBC driver jars in cocoon/WEB-INF/lib but
with 5.0.28 I got a SQLException something like "no suitable driver".
Moving the JDBC driver jars to tomcat/common/lib keeps it happy.

	Neil.


On Wed, 2004-10-20 at 02:29, Rod Giffin wrote:
> Or from any program.  It looks a little like MySQL is not running, running
> on another port, or something of that nature... Could also be the
> montefiore database does not have permissions granted, or tables
> configured.
> 
> Rod.
> 
> Art Spasky said:
> > can you connect to your server via java program (not from cocoon)?
> >
> > As I am concerned Cocoon automatically adds to classpath all jars in lib
> > directory
> >   ----- Original Message -----
> >   From: Roberto
> >   To: users@cocoon.apache.org
> >   Sent: Tuesday, October 19, 2004 7:39 PM
> >   Subject: Re: Classpath
> >
> >
> >   The error.log file tell me:
> >
> >   java.sql.SQLException: Failed to obtain connection
> >
> >   The core.log file tell me:
> >
> >   java.sql.SQLException: Communication link failure
> >
> >   nothing with CLASSPATH, but I thought that I should set the variable.
> > Im just trying to follow some samples that I found in some book is not
> > a real project... but you know ...
> >
> >
> >   ----- Original Message -----
> >     From: Art Spasky
> >     To: users@cocoon.apache.org
> >     Sent: Tuesday, October 19, 2004 5:24 PM
> >     Subject: Re: Classpath
> >
> >
> >     What is the text of error?
> >
> >     I think that exception was not connected with class path (from your
> > words)
> >       ----- Original Message -----
> >       From: Roberto
> >       To: users@cocoon.apache.org
> >       Sent: Tuesday, October 19, 2004 6:23 PM
> >       Subject: Classpath
> >
> >
> >       Hya there,
> >       would just to understand if I need to set the CLASSPATH enviroment
> > variable to use Cocoon. Let me tell first my configuration:
> >
> >       Window2000 PRO :-(
> >       Cocoon 2.1.5
> >       JDK 1.4.2
> >       MySQL 4.1
> >
> >       I don't have any Tomcat or whatever. The problem is that I can't
> > connect to the database. I already properly setted the following
> > file:
> >
> >       cocoon.xconf
> >       <jdbc name="mysql_pool">
> >       <pool-controller min="5" max="10"/>
> >       <dburl>jdbc:mysql://localhost:3306/montefiore</dburl>
> >       <user>root</user>
> >       <password/> (tried with password & not)
> >       </jdbc>
> >
> >       web.xml
> >       <init-param>
> >       <param-name>load-class</param-name>
> >       <param-value> org.gjt.mm.mysql.Driver</param-value>
> >       </init-param>
> >
> >       & properly added the mysql-connector-java-3.0.6-stable-bin.jar
> > under WEB-INF/lib.
> >
> >       I guess I got everything setted ok. The problem is that the
> > error.log file tell me that he cant get the connection to the db.
> > In some IBM tutorial I read that I have take care about the
> > CLASSPATH variable, is that true? I mean, because they make
> > example with Tomcat installed either.
> >
> >       Any suggestion?
> >       Thanx in advance
> >       Ciao
> >       ROb
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Re: Classpath

Posted by Rod Giffin <ro...@giffinscientific.com>.
Or from any program.  It looks a little like MySQL is not running, running
on another port, or something of that nature... Could also be the
montefiore database does not have permissions granted, or tables
configured.

Rod.

Art Spasky said:
> can you connect to your server via java program (not from cocoon)?
>
> As I am concerned Cocoon automatically adds to classpath all jars in lib
> directory
>   ----- Original Message -----
>   From: Roberto
>   To: users@cocoon.apache.org
>   Sent: Tuesday, October 19, 2004 7:39 PM
>   Subject: Re: Classpath
>
>
>   The error.log file tell me:
>
>   java.sql.SQLException: Failed to obtain connection
>
>   The core.log file tell me:
>
>   java.sql.SQLException: Communication link failure
>
>   nothing with CLASSPATH, but I thought that I should set the variable.
> Im just trying to follow some samples that I found in some book is not
> a real project... but you know ...
>
>
>   ----- Original Message -----
>     From: Art Spasky
>     To: users@cocoon.apache.org
>     Sent: Tuesday, October 19, 2004 5:24 PM
>     Subject: Re: Classpath
>
>
>     What is the text of error?
>
>     I think that exception was not connected with class path (from your
> words)
>       ----- Original Message -----
>       From: Roberto
>       To: users@cocoon.apache.org
>       Sent: Tuesday, October 19, 2004 6:23 PM
>       Subject: Classpath
>
>
>       Hya there,
>       would just to understand if I need to set the CLASSPATH enviroment
> variable to use Cocoon. Let me tell first my configuration:
>
>       Window2000 PRO :-(
>       Cocoon 2.1.5
>       JDK 1.4.2
>       MySQL 4.1
>
>       I don't have any Tomcat or whatever. The problem is that I can't
> connect to the database. I already properly setted the following
> file:
>
>       cocoon.xconf
>       <jdbc name="mysql_pool">
>       <pool-controller min="5" max="10"/>
>       <dburl>jdbc:mysql://localhost:3306/montefiore</dburl>
>       <user>root</user>
>       <password/> (tried with password & not)
>       </jdbc>
>
>       web.xml
>       <init-param>
>       <param-name>load-class</param-name>
>       <param-value> org.gjt.mm.mysql.Driver</param-value>
>       </init-param>
>
>       & properly added the mysql-connector-java-3.0.6-stable-bin.jar
> under WEB-INF/lib.
>
>       I guess I got everything setted ok. The problem is that the
> error.log file tell me that he cant get the connection to the db.
> In some IBM tutorial I read that I have take care about the
> CLASSPATH variable, is that true? I mean, because they make
> example with Tomcat installed either.
>
>       Any suggestion?
>       Thanx in advance
>       Ciao
>       ROb




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


Re: Classpath

Posted by Art Spasky <ar...@dgma.donetsk.ua>.
can you connect to your server via java program (not from cocoon)?

As I am concerned Cocoon automatically adds to classpath all jars in lib directory
  ----- Original Message ----- 
  From: Roberto 
  To: users@cocoon.apache.org 
  Sent: Tuesday, October 19, 2004 7:39 PM
  Subject: Re: Classpath


  The error.log file tell me:

  java.sql.SQLException: Failed to obtain connection

  The core.log file tell me:

  java.sql.SQLException: Communication link failure

  nothing with CLASSPATH, but I thought that I should set the variable. Im just trying to follow some samples that I found in some book is not a real project... but you know ...


  ----- Original Message ----- 
    From: Art Spasky 
    To: users@cocoon.apache.org 
    Sent: Tuesday, October 19, 2004 5:24 PM
    Subject: Re: Classpath


    What is the text of error?

    I think that exception was not connected with class path (from your words)
      ----- Original Message ----- 
      From: Roberto 
      To: users@cocoon.apache.org 
      Sent: Tuesday, October 19, 2004 6:23 PM
      Subject: Classpath


      Hya there,
      would just to understand if I need to set the CLASSPATH enviroment variable to use Cocoon. Let me tell first my configuration:

      Window2000 PRO :-(
      Cocoon 2.1.5
      JDK 1.4.2
      MySQL 4.1

      I don't have any Tomcat or whatever. The problem is that I can't connect to the database. I already properly setted the following file:

      cocoon.xconf
      <jdbc name="mysql_pool">
      <pool-controller min="5" max="10"/>
      <dburl>jdbc:mysql://localhost:3306/montefiore</dburl>
      <user>root</user>
      <password/> (tried with password & not)
      </jdbc>

      web.xml
      <init-param>
      <param-name>load-class</param-name>
      <param-value> org.gjt.mm.mysql.Driver</param-value>
      </init-param>

      & properly added the mysql-connector-java-3.0.6-stable-bin.jar under WEB-INF/lib.

      I guess I got everything setted ok. The problem is that the error.log file tell me that he cant get the connection to the db. In some IBM tutorial I read that I have take care about the CLASSPATH variable, is that true? I mean, because they make example with Tomcat installed either.

      Any suggestion?
      Thanx in advance
      Ciao
      ROb

Re: Classpath

Posted by Roberto <rm...@montefiore.ch>.
The error.log file tell me:

java.sql.SQLException: Failed to obtain connection

The core.log file tell me:

java.sql.SQLException: Communication link failure

nothing with CLASSPATH, but I thought that I should set the variable. Im just trying to follow some samples that I found in some book is not a real project... but you know ...


----- Original Message ----- 
  From: Art Spasky 
  To: users@cocoon.apache.org 
  Sent: Tuesday, October 19, 2004 5:24 PM
  Subject: Re: Classpath


  What is the text of error?

  I think that exception was not connected with class path (from your words)
    ----- Original Message ----- 
    From: Roberto 
    To: users@cocoon.apache.org 
    Sent: Tuesday, October 19, 2004 6:23 PM
    Subject: Classpath


    Hya there,
    would just to understand if I need to set the CLASSPATH enviroment variable to use Cocoon. Let me tell first my configuration:

    Window2000 PRO :-(
    Cocoon 2.1.5
    JDK 1.4.2
    MySQL 4.1

    I don't have any Tomcat or whatever. The problem is that I can't connect to the database. I already properly setted the following file:

    cocoon.xconf
    <jdbc name="mysql_pool">
    <pool-controller min="5" max="10"/>
    <dburl>jdbc:mysql://localhost:3306/montefiore</dburl>
    <user>root</user>
    <password/> (tried with password & not)
    </jdbc>

    web.xml
    <init-param>
    <param-name>load-class</param-name>
    <param-value> org.gjt.mm.mysql.Driver</param-value>
    </init-param>

    & properly added the mysql-connector-java-3.0.6-stable-bin.jar under WEB-INF/lib.

    I guess I got everything setted ok. The problem is that the error.log file tell me that he cant get the connection to the db. In some IBM tutorial I read that I have take care about the CLASSPATH variable, is that true? I mean, because they make example with Tomcat installed either.

    Any suggestion?
    Thanx in advance
    Ciao
    ROb

Re: Classpath

Posted by Art Spasky <ar...@dgma.donetsk.ua>.
What is the text of error?

I think that exception was not connected with class path (from your words)
  ----- Original Message ----- 
  From: Roberto 
  To: users@cocoon.apache.org 
  Sent: Tuesday, October 19, 2004 6:23 PM
  Subject: Classpath


  Hya there,
  would just to understand if I need to set the CLASSPATH enviroment variable to use Cocoon. Let me tell first my configuration:

  Window2000 PRO :-(
  Cocoon 2.1.5
  JDK 1.4.2
  MySQL 4.1

  I don't have any Tomcat or whatever. The problem is that I can't connect to the database. I already properly setted the following file:

  cocoon.xconf
  <jdbc name="mysql_pool">
  <pool-controller min="5" max="10"/>
  <dburl>jdbc:mysql://localhost:3306/montefiore</dburl>
  <user>root</user>
  <password/> (tried with password & not)
  </jdbc>

  web.xml
  <init-param>
  <param-name>load-class</param-name>
  <param-value> org.gjt.mm.mysql.Driver</param-value>
  </init-param>

  & properly added the mysql-connector-java-3.0.6-stable-bin.jar under WEB-INF/lib.

  I guess I got everything setted ok. The problem is that the error.log file tell me that he cant get the connection to the db. In some IBM tutorial I read that I have take care about the CLASSPATH variable, is that true? I mean, because they make example with Tomcat installed either.

  Any suggestion?
  Thanx in advance
  Ciao
  ROb

Re: Classpath

Posted by Ugo Cei <ug...@apache.org>.
Il giorno 19/ott/04, alle 16:23, Roberto ha scritto:

> Hya there,
> would just to understand if I need to set the CLASSPATH enviroment 
> variable to use Cocoon. Let me tell first my configuration:

No, it's almost NEVER a good idea to set the CLASSPATH env var, unless 
some braindead app really needs it.

> Any suggestion?

 From WEB-INF/web.xml

     <!--
       This parameter is used to list classes that should be loaded at
       initialization time of the servlet. For example, JDBC Drivers 
used need to
       be named here. Additional entries may be inserted here during 
build
       depending on your build properties.
     -->
     <init-param>
       <param-name>load-class</param-name>
      ...

put the pathname-qualified name of your JDBC driver class there, 
restart and it should work.

See also http://cocoon.apache.org/2.1/faq/faq-databases.html

	Ugo


-- 
Ugo Cei - http://beblogging.com/