jUDDI

Olá pessoal.

Alguém aqui já conseguiu fazer a instalação do jUDDI sem ter problemas? Eu fiz a instalação como alguns tutoriais na net recomendam, mas, no happyjuddi.jsp, eu recebo o seguinte erro:

jUDDI DataSource Validation

+ Got a JNDI Context!
+ Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB)
- DB connection was not aquired. (Cannot create JDBC driver of class '' for connect URL 'null')
- SELECT COUNT(*) FROM PUBLISHER failed (null)

Bom, eu coloquei o MySQL J/Connector na pasta CATALINA_HOME\lib (os tutoriais pediam pra por na CATALINA_HOME\common\lib, mas minha instalação não tem esse diretório).

Eu achei estranho o motivo dele não ter conseguido a conexão com o banco, dizendo que a classe é vazia (’’) e a URL de conexão é nula (…for connection URL ‘null’, pois eu preenchi todos os XMLs que a instalação recomendou. Ei-los:

No WEB.XML do Tomcat 6.0\webapps\juddi\WEB-INF:

<resource-ref>
    <description>jUDDI DataSource</description>
    <res-ref-name>jdbc/juddiDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
 </resource-ref>

O juddi.XML no Tomcat 6.0\conf:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 6.0//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-web-jar.dtd">
<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" maxActive="100" maxIdle="30" maxWait="10000" username="root" password="adminadmin" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/juddi?autoReconnect=true" />
</Context>

E, finalmente, no server.XML em Tomcat 6.0\conf, adicionei a seguinte entrada:

<Context path="/juddi" docBase="juddi" debug="5" reloadable="true" crossContext="true">
  <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_jUDDI_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>
- <parameter>
  <name>maxActive</name> 
  <value>100</value> 
  </parameter>
- <parameter>
  <name>maxIdle</name> 
  <value>30</value> 
  </parameter>
- <parameter>
  <name>maxWait</name> 
  <value>10000</value> 
  </parameter>
- <parameter>
  <name>username</name> 
  <value>root</value> 
  </parameter>
- <parameter>
  <name>password</name> 
  <value>adminadmin</value> 
  </parameter>
- <parameter>
  <name>driverClassName</name> 
  <value>com.mysql.jdbc.Driver</value> 
  </parameter>
- <parameter>
  <name>url</name> 
  <value>jdbc:mysql://localhost:3306/juddi?autoReconnect=true</value> 
  </parameter>
  </ResourceParams>
  </Context>

E aqui cabe uma dúvida: esta senha no server.xml é a do banco?

Bom, espero que alguém já tenha passado pela experiência e possa me ajudar =]

Obrigado!

Já consegui resolver…

A quem interessar possa, a sintaxe da tag <ResourceParams> mudou no Tomcat 5.5 e versões superiores.

Como dá pra ver no meu código, antes era baseado em pares <name> e <value> dentro de um <parameter>. Agora tudo virou atributo. Tipo, ao invés de

<ResourceParams name=“jdbc/juddiDB”>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>

Agora usa-se <ResourceParams name=“jdbc/juddiDB” maxActive=“100” … />

Outra coisa, não é mais necessário usar o parâmetro “factory”.

É isso ae.

Ola Archon,

Estou com um problema muito parecido com que vc teve com o JUDDI. Eu já fiz o que vc sugeriu e o que mais 279 milhões de pessoas sugeriram também. Eu não sei mais o que fazer. Estou finalizando o mestrado e tenho que implementar corretamente o Juddi até novembro.

O que for preciso fazer eu faço.

Dá uma olhada no conteúdo do jUDDI Happines

Happy jUDDI!
jUDDI Version Information
jUDDI Version: 0.9rc4
Build Date: 14 de Junho de 2005 6h20min20s BRT
UDDI Version: 2.0

jUDDI Dependencies: Class Files & Libraries
Looking for: org.apache.juddi.IRegistry+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib\juddi.jarLooking for: org.apache.axis.transport.http.AxisServlet+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib\axis.jarLooking for: org.apache.commons.discovery.Resource+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib\commons-discovery-0.2.jarLooking for: org.apache.commons.logging.Log+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib\commons-logging-1.0.4.jarLooking for: org.apache.log4j.Layout+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib\log4j-1.2.8.jarLooking for: javax.xml.soap.SOAPMessage+Found in an unknown locationLooking for: javax.xml.rpc.Service+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib\jaxrpc.jarLooking for: com.ibm.wsdl.factory.WSDLFactoryImpl+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib\wsdl4j-1.5.1.jarLooking for: javax.xml.parsers.SAXParserFactory+Found in an unknown location

jUDDI Dependencies: Resource & Properties Files
Looking for: log4j.xml+Found in: C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\classes\log4j.xml

jUDDI DataSource Validation

  • Got a JNDI Context!
  • Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB)
  • DB connection was not aquired. (Cannot create JDBC driver of class ‘’ for connect URL ‘null’)
  • SELECT COUNT(*) FROM PUBLISHER failed (null)

System Properties
awt.toolkit: sun.awt.windows.WToolkit
catalina.base: C:\Tomcat6\Tomcat6.0
catalina.home: C:\Tomcat6\Tomcat6.0
catalina.useNaming: true
common.loader: ${catalina.home}/lib,${catalina.home}/lib/*.jar
file.encoding: Cp1252
file.encoding.pkg: sun.io
file.separator:
http.proxyHost:
http.proxyPort:
java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment
java.awt.printerjob: sun.awt.windows.WPrinterJob
java.class.path: C:\Tomcat6\Tomcat6.0\bin\bootstrap.jar
java.class.version: 50.0
java.endorsed.dirs: C:\Tomcat6\Tomcat6.0\endorsed
java.ext.dirs: C:\Program Files\Java\jdk1.6.0_16\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home: C:\Program Files\Java\jdk1.6.0_16\jre
java.io.tmpdir: C:\Tomcat6\Tomcat6.0\temp
java.library.path: C:\Tomcat6\Tomcat6.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\CyberLink\Power2Go;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Java\jdk1.6.0_16\bin;C:\Tomcat6\Tomcat6.0\bin;C:\Program Files\Java\jdk1.6.0_16\lib;C:\Tomcat6\Tomcat6.0\webapps\axis;C:\Tomcat6\Tomcat6.0\webapps\axis\lib;C:\Tomcat6\Tomcat6.0\webapps\axis\WEB-INF\classes;C:\Tomcat6\Tomcat6.0\webapps\juddi;C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\lib;C:\Tomcat6\Tomcat6.0\webapps\juddi\WEB-INF\classes;C:\Tomcat6\Tomcat6.0\webapps\admin\WEB-INF\lib
java.naming.factory.initial: org.apache.naming.java.javaURLContextFactory
java.naming.factory.url.pkgs: org.apache.naming
java.runtime.name: Java™ SE Runtime Environment
java.runtime.version: 1.6.0_16-b01
java.specification.name: Java Platform API Specification
java.specification.vendor: Sun Microsystems Inc.
java.specification.version: 1.6
java.util.logging.config.file: C:\Tomcat6\Tomcat6.0\conf\logging.properties
java.util.logging.manager: org.apache.juli.ClassLoaderLogManager
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.vendor.url.bug: http://java.sun.com/cgi-bin/bugreport.cgi
java.version: 1.6.0_16
java.vm.info: mixed mode, sharing
java.vm.name: Java HotSpot™ Client VM
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.vendor: Sun Microsystems Inc.
java.vm.specification.version: 1.0
java.vm.vendor: Sun Microsystems Inc.
java.vm.version: 14.2-b01
line.separator:

os.arch: x86
os.name: Windows Vista
os.version: 6.0
package.access: sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
package.definition: sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
path.separator: ;
server.loader:
shared.loader:
sun.arch.data.model: 32
sun.boot.class.path: C:\Program Files\Java\jdk1.6.0_16\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_16\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_16\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_16\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_16\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_16\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_16\jre\classes
sun.boot.library.path: C:\Program Files\Java\jdk1.6.0_16\jre\bin
sun.cpu.endian: little
sun.cpu.isalist: pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop: windows
sun.io.unicode.encoding: UnicodeLittle
sun.jnu.encoding: Cp1252
sun.management.compiler: HotSpot Client Compiler
sun.os.patch.level: Service Pack 1
tomcat.util.buf.StringCache.byte.enabled: true
user.country: BR
user.dir: C:\Tomcat6\Tomcat6.0
user.home: C:\Windows\System32\config\systemprofile
user.language: pt
user.name: CEDRO-PC$
user.timezone: America/Sao_Paulo
user.variant:

Grata,

Daniela