You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@juddi.apache.org by Arthur de Jong <ar...@West.NL> on 2004/09/30 16:52:17 UTC

Running jUDDI on JBoss

I am trying to set up jUDDI 0.9rc3 on JBoss 3.2.5. I have unpacked the
juddi.war file to a newly created server/all/deploy/juddi.war directory
and initialized the database etc, mostly following [1].

happyjuddi.jsp reports:
+ Got a JNDI Context!
- No 'java:comp/env/jdbc/juddiDB' DataSource Located(Could not dereference object)
- DB connection was not aquired. (null)
- SELECT COUNT(*) FROM PUBLISHER failed (null)

The problem is when configuring the database connection in server.xml.
When I'm trying to configure the server.xml of Tomcat
server/all/deploy/jbossweb-tomcat50.sar/server.xml the given syntax
causes an exception during startup:
java.lang.IllegalArgumentException: Document base /opt/jboss-3.2.5/server/all/./juddi does not exist or is not a readable directory
When changing server.xml to contain:
<Context path="/work/jboss.web/localhost/juddi" ...
the exception is gone but it still doesn't work (same problem in
happyjuddi.jsp)

Also I've tried to configure the database as described in [2] but that
also does not make happyjuddi.jsp any happier.

Is there something I'm missing (I'm not very familiar with JBoss)?
Thanks.

[1] http://wiki.apache.org/ws/Deploy_20jUDDI_20on_20Tomcat_20and_20MySQL
[2] http://wiki.apache.org/ws/Deploy_20jUDDI_20without_20using_20a_20JNDI_20DataSource

-- 
-- arthur de jong - arthur@west.nl - west consulting b.v. --

Re: Running jUDDI on JBoss

Posted by Arthur de Jong <ar...@West.NL>.
On Fri, 1 Oct 2004, Antoni Reus wrote:

> To create a datasource in jboss (using the "all" configuration folder):
>
> 1. Copy the jdbc driver jar to server/all/lib/
>
> 2. Create the datasource descriptor file, something like:
> 	server/all/deploy/juddi-ds.xml:
[snip]

Thanks, that did the trick. jUDDI is happy now. This is my juddi-ds.xml
file (for MySQL instead of PostgreSQL):

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
   <local-tx-datasource>
     <jndi-name>juddiDB</jndi-name>
     <connection-url>jdbc:mysql://localhost:3306/juddi</connection-url>
     <driver-class>org.gjt.mm.mysql.Driver</driver-class>
     <user-name>juddi</user-name>
     <password>juddi</password>
     <min-pool-size>1</min-pool-size>
     <max-pool-size>50</max-pool-size>
   </local-tx-datasource>
</datasources>

-- arthur de jong - arthur@west.nl - west consulting b.v. --

Re: Running jUDDI on JBoss

Posted by Antoni Reus <an...@telefonica.net>.
Hola,

To create a datasource in jboss (using the "all" configuration folder):

1. Copy the jdbc driver jar to server/all/lib/

2. Create the datasource descriptor file, something like:
	server/all/deploy/juddi-ds.xml:

------------8<-----------------
<?xml version="1.0" encoding="UTF-8"?>

<datasources>
   <local-tx-datasource>
     <jndi-name>juddiDB</jndi-name> **

<connection-url>jdbc:postgresql://localhost:5432/juddidb</connection-url>
     <driver-class>org.postgresql.Driver</driver-class>
     <user-name>dbuser</user-name>
     <password>dbpassword</password>

     <min-pool-size>1</min-pool-size>
     <max-pool-size>50</max-pool-size>

   </local-tx-datasource>

</datasources>
------------>8-----------------

** The jndi-name is the one in WEB-INF/jboss-web.xml without the
"java:/" prefix.

-- Antoni Reus

En/na Arthur de Jong ha escrit:
> I am trying to set up jUDDI 0.9rc3 on JBoss 3.2.5. I have unpacked the
> juddi.war file to a newly created server/all/deploy/juddi.war directory
> and initialized the database etc, mostly following [1].
> 
> happyjuddi.jsp reports:
> + Got a JNDI Context!
> - No 'java:comp/env/jdbc/juddiDB' DataSource Located(Could not dereference object)
> - DB connection was not aquired. (null)
> - SELECT COUNT(*) FROM PUBLISHER failed (null)
> 
> The problem is when configuring the database connection in server.xml.
> When I'm trying to configure the server.xml of Tomcat
> server/all/deploy/jbossweb-tomcat50.sar/server.xml the given syntax
> causes an exception during startup:
> java.lang.IllegalArgumentException: Document base /opt/jboss-3.2.5/server/all/./juddi does not exist or is not a readable directory
> When changing server.xml to contain:
> <Context path="/work/jboss.web/localhost/juddi" ...
> the exception is gone but it still doesn't work (same problem in
> happyjuddi.jsp)
> 
> Also I've tried to configure the database as described in [2] but that
> also does not make happyjuddi.jsp any happier.
> 
> Is there something I'm missing (I'm not very familiar with JBoss)?
> Thanks.
> 
> [1] http://wiki.apache.org/ws/Deploy_20jUDDI_20on_20Tomcat_20and_20MySQL
> [2] http://wiki.apache.org/ws/Deploy_20jUDDI_20without_20using_20a_20JNDI_20DataSource
>