juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mark streit (JIRA)" <juddi-...@ws.apache.org>
Subject [jira] Created: (JUDDI-77) DataSource JNDI name different for jUDDI Console vs happyjuddi.jsp
Date Tue, 19 Jul 2005 19:01:55 GMT
DataSource JNDI name different for jUDDI Console vs happyjuddi.jsp
------------------------------------------------------------------

         Key: JUDDI-77
         URL: http://issues.apache.org/jira/browse/JUDDI-77
     Project: jUDDI
        Type: Bug
    Versions: 0.9rc4    
 Environment: WIN 2K
    Reporter: mark streit
 Assigned to: Steve Viens 


Following installation of jUDDI 0.9 rc4 I noticed the following.   There is a <Context>
entry in the jUDDI HOW-TO that is to be placed in the server.xml file for Tomcat.   Part of
the entry is as follows:

        <Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext="true"
debug="5" displayName="jUDDI" docBase="juddi" mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/juddi" privileged="false" reloadable="true" swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
          <Logger className="org.apache.catalina.logger.FileLogger" debug="0" directory="logs"
prefix="localhost_juddiDB_log" suffix=".txt" timestamp="true" verbosity="1"/>
          

          <!-- 
          <Resource auth="Container" name="jdbc/juddi" scope="Shareable" type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/juddi">
           -->


          <!-- 
          <Resource auth="Container" name="jdbc/juddiDB" scope="Shareable" type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/juddiDB"> 
          -->
      
            <!-- <parameter>
              <name>url</name>
              <value>jdbc:mysql://host.domain.com:3306/juddi?autoReconnect=true</value>
            </parameter> -->
            <parameter>
	          <name>url</name>
	          <value>jdbc:mysql://localhost:3306/juddi?autoReconnect=true</value>
            </parameter>
            <parameter>
              <name>validationQuery</name>
              <value>select count(*) from PUBLISHER</value>
            </parameter>
   ...

Note that I have commented out the baseline values like 

            <!-- <parameter>
              <name>url</name>
              <value>jdbc:mysql://host.domain.com:3306/juddi?autoReconnect=true</value>
            </parameter> -->

and added the actual value below it like

            <parameter>
	          <name>url</name>
	          <value>jdbc:mysql://localhost:3306/juddi?autoReconnect=true</value>
            </parameter>

The important part is the entry: 
          <!-- 
          <Resource auth="Container" name="jdbc/juddiDB" scope="Shareable" type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/juddiDB"> 
          -->
This is what is specified according to the HOW-TO and it is this entry that allows the happyjuddi.jsp
to return a validation containing a message such as:

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

jUDDI DataSource Validation
+ Got a JNDI Context!
+ Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB)
+ Got a JDBC Connection!
+ SELECT COUNT(*) FROM PUBLISHER = 2

Note the part of the name "juddiDB".  So you must uncomment and use this version of the <Resource>
and <ResourceParams> element to get the happyjuddi Validate process to work.  

However, if you try to use the jUDDI Console (yes I know it is Beta), none of the APIs appear
to work unless the <Resource> and <ResourceParams> are changed to match the following:

          <!-- 
          <Resource auth="Container" name="jdbc/juddi" scope="Shareable" type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/juddi">
           -->
Note the "DB" dropped from the name jdbc/juddi.  Unless you do this, you will get errors such
as:

Jul 19, 2005 2:29:36 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16  config=C:\jakarta-tomcat-4.1.29\conf\jk2.proper
ties
2005-07-19 14:43:18,143 [http8080-Processor3] INFO  org.apache.juddi.util.Loader
  - Using the Context ClassLoader
2005-07-19 14:43:18,159 [http8080-Processor3] INFO  org.apache.juddi.util.jdbc.C
onnectionManager  - Using JNDI to aquire a JDBC DataSource with name: java:comp/
env/jdbc/juddi
2005-07-19 14:43:18,159 [http8080-Processor3] ERROR org.apache.juddi.util.jdbc.C
onnectionManager  - Exception occurred while attempting to acquire a JDBC DataSo
urce from JNDI: Name juddi is not bound in this Context
2005-07-19 14:43:18,159 [http8080-Processor3] ERROR org.apache.juddi.function.Fi
ndPublisherFunction  - java.lang.NullPointerException
2005-07-19 14:43:18,159 [http8080-Processor3] ERROR org.apache.juddi.registry.Ab
stractService  - java.lang.NullPointerException
2005-07-19 14:43:18,175 [http8080-Processor3] ERROR org.apache.juddi.registry.Ab
stractService  - A serious error has occured while assembling the SOAP Fault.
java.lang.IllegalArgumentException: invalid QName local part
        at javax.xml.namespace.QName.<init>(QName.java:75)
        at javax.xml.namespace.QName.<init>(QName.java:60)
        at org.apache.axis.AxisFault.setFaultCodeAsString(AxisFault.java:422)
        at org.apache.axis.message.SOAPFault.setFaultCode(SOAPFault.java:226)
        at org.apache.juddi.registry.AbstractService.doPost(AbstractService.java
:317)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2417)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:19
3)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:781)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:549)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:589)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:666)
        at java.lang.Thread.run(Thread.java:534)

Note that it cannot find java:comp/env/jdbc/juddi.  Basically the JNDI name used for the happyjuddi.jsp
needs "juddiDB" and that for the Console to work needs to be simply "juddi".  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message