You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@juddi.apache.org by "Viens, Steve" <St...@FMR.COM> on 2004/02/12 20:11:19 UTC

RE: [Unverified Sender] RE: DB connection was not aquired

I should have mentioned this...

Currently, happyjuddi.jsp will only be successful when using an app server
supplied JDBC DataSource.

Steve

-----Original Message-----
From: Viens, Steve 
Sent: Thursday, February 12, 2004 2:08 PM
To: 'juddi-user@ws.apache.org'
Subject: [Unverified Sender] RE: DB connection was not aquired


Freeman,

Here's some information that might help you out.

jUDDI has the ability to use it's own internal connection pooling.  But this
is only recommended if you're NOT running inside an application server or
servlet container.  To use this feature you simply have to set the
"juddi.useConnectionPool" property to "true" in the "juddi.properties" file:

   juddi.useConnectionPool=true

When "juddi.useConnectionPool" is set to "true" jUDDI will look for the
following properties in the juddi.property file to set up it's connection
pool:

   juddi.jdbcDriver=com.mysql.jdbc.Driver
   juddi.jdbcURL=jdbc:mysql://localhost/juddi
   juddi.jdbcUser=juddi
   juddi.jdbcPassword=juddi
   juddi.jdbcMaxActive=10
   juddi.jdbcMaxIdle=10

If "juddi.useConnectionPool" is set to false these properties are ignored
and jUDDI will attempt to use a JNDI DataSource named "jdbc/juddiDB" from
the application server or servlet container you're running under
(recommended).

Steve

-----Original Message-----
From: freeman [mailto:fcmurray@yahoo.com] 
Sent: Thursday, February 12, 2004 1:27 PM
To: juddi-user@ws.apache.org
Subject: DB connection was not aquired



hi everyone,

i've tried installing juddi a couple of times
and i get all the way but get stuck on

- DB connection was not aquired. (Cannot create JDBC
driver of class '' for connect URL 'null')
- SELECT COUNT(*) FROM PUBLISHER failed (null)

this looks like it can't find the driver class or db
url

but in the jUDDI Properties it lists them fine
juddi.jdbcDriver: com.mysql.jdbc.Driver
juddi.jdbcURL: jdbc:mysql://localhost/juddi

does anyone know how i tell juddi to use these
properties to create the datasource ?

thanks

freeman

RE: DB connection was not aquired

Posted by freeman <fc...@yahoo.com>.
hi Steve,

thanks for your help
that was indeed the problem
when i added
the following (i found on an archived message on
this list) to the tomcat/conf/server.xml file
between the commented out <context> and the closing
</host>  it worked !

thanks again

freeman


- <Context path="/juddi" docBase="juddi" debug="5"
reloadable="true" crossContext="true">
  <Logger
className="org.apache.catalina.logger.FileLogger"
prefix="localhost_juddiDB_log" suffix=".txt"
timestamp="true" /> 
  <Resource name="jdbc/juddiDB" auth="Container"
type="javax.sql.DataSource" /> 
- <ResourceParams name="jdbc/juddiDB">
- <parameter>
  <name>factory</name> 
 
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>

  </parameter>
- <!-- 
 Maximum number of dB connections in pool. Make sure
you

                configure your mysqld max_connections
large enough to handle

                all of your db connections. Set to 0
for no limit.

                

  --> 
- <parameter>
  <name>maxActive</name> 
  <value>100</value> 
  </parameter>
- <!-- 
 Maximum number of idle dB connections to retain in
pool.

                Set to 0 for no limit.

                

  --> 
- <parameter>
  <name>maxIdle</name> 
  <value>30</value> 
  </parameter>
- <parameter>
  <name>maxWait</name> 
  <value>10000</value> 
  </parameter>
- <!--  MySQL dB username and password for dB
connections  
  --> 
- <parameter>
  <name>username</name> 
  <value>juddi</value> 
  </parameter>
- <parameter>
  <name>password</name> 
  <value>juddi</value> 
  </parameter>
- <!--  Class name for mm.mysql JDBC driver 
  --> 
- <parameter>
  <name>driverClassName</name> 
  <value>com.mysql.jdbc.Driver</value> 
  </parameter>
- <!-- 
 The JDBC connection url for connecting to your MySQL
dB.

                The autoReconnect=true argument to the
url makes sure that the

                mm.mysql JDBC Driver will
automatically reconnect if mysqld closed \
the

                connection.  mysqld by default closes
idle connections after 8 hours.

                

  --> 
- <parameter>
  <name>url</name> 
  <value>jdbc:mysql://localhost/juddi</value> 
  </parameter>
  </ResourceParams>
  </Context>


--- "Viens, Steve" <St...@FMR.COM> wrote:
> I should have mentioned this...
> 
> Currently, happyjuddi.jsp will only be successful
> when using an app server
> supplied JDBC DataSource.
> 
> Steve
> 
> -----Original Message-----
> From: Viens, Steve 
> Sent: Thursday, February 12, 2004 2:08 PM
> To: 'juddi-user@ws.apache.org'
> Subject: [Unverified Sender] RE: DB connection was
> not aquired
> 
> 
> Freeman,
> 
> Here's some information that might help you out.
> 
> jUDDI has the ability to use it's own internal
> connection pooling.  But this
> is only recommended if you're NOT running inside an
> application server or
> servlet container.  To use this feature you simply
> have to set the
> "juddi.useConnectionPool" property to "true" in the
> "juddi.properties" file:
> 
>    juddi.useConnectionPool=true
> 
> When "juddi.useConnectionPool" is set to "true"
> jUDDI will look for the
> following properties in the juddi.property file to
> set up it's connection
> pool:
> 
>    juddi.jdbcDriver=com.mysql.jdbc.Driver
>    juddi.jdbcURL=jdbc:mysql://localhost/juddi
>    juddi.jdbcUser=juddi
>    juddi.jdbcPassword=juddi
>    juddi.jdbcMaxActive=10
>    juddi.jdbcMaxIdle=10
> 
> If "juddi.useConnectionPool" is set to false these
> properties are ignored
> and jUDDI will attempt to use a JNDI DataSource
> named "jdbc/juddiDB" from
> the application server or servlet container you're
> running under
> (recommended).
> 
> Steve
> 
> -----Original Message-----
> From: freeman [mailto:fcmurray@yahoo.com] 
> Sent: Thursday, February 12, 2004 1:27 PM
> To: juddi-user@ws.apache.org
> Subject: DB connection was not aquired
> 
> 
> 
> hi everyone,
> 
> i've tried installing juddi a couple of times
> and i get all the way but get stuck on
> 
> - DB connection was not aquired. (Cannot create JDBC
> driver of class '' for connect URL 'null')
> - SELECT COUNT(*) FROM PUBLISHER failed (null)
> 
> this looks like it can't find the driver class or db
> url
> 
> but in the jUDDI Properties it lists them fine
> juddi.jdbcDriver: com.mysql.jdbc.Driver
> juddi.jdbcURL: jdbc:mysql://localhost/juddi
> 
> does anyone know how i tell juddi to use these
> properties to create the datasource ?
> 
> thanks
> 
> freeman