Apache, Tomcat and JNDI problem...

2001-10-23 Thread JTurner

Hi,

I have been developing an application that does a JNDI lookup for a
DataSource and then does a database query. Everything works great when I
just use Tomcat 4.0.1. But when I use Apache as the front end and use the
Warp Connector to connect Apache and Tomcat, I am then unable to retrieve
the DataSource from the JNDI tree.

I receive the exception: javax.naming.NameNotFoundException: Name testDB is
not bound in this Context

I did some digging and found that there is the same problem with the Tomcat
example: /examples/servlet/JndiServlet

This is what I receive when running the example using only Tomcat on port
8080:
(http://localhost:8080/examples/servlet/JndiServlet)

Simple lookup test :
Max exemptions value : 15
list() on /comp/env Context :
Binding : mail: org.apache.naming.NamingContext
Binding : maxExemptions: java.lang.Integer
Binding : minExemptions: java.lang.Integer
Binding : jdbc: org.apache.naming.NamingContext
Binding : ejb: org.apache.naming.NamingContext
Binding : name3: java.lang.Integer
Binding : foo: org.apache.naming.NamingContext
listBindings() on /comp/env Context :
Binding : mail:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@7a1bb6
Binding : maxExemptions: java.lang.Integer:15
Binding : minExemptions: java.lang.Integer:1
Binding : jdbc:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@315d34
Binding : ejb:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@5e256f
Binding : name3: java.lang.Integer:1
Binding : foo:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@6bd8ea


But when I connect Apache and Tomcat using the Warp Connector I receive:
(http://localhost/examples/servlet/JndiServlet)

JNDI lookup failed : javax.naming.NameNotFoundException: Name maxExemptions
is not bound in this Context
list() on /comp/env Context :
Binding : mail: org.apache.naming.NamingContext
Binding : minExemptions: java.lang.Integer
Binding : ejb: org.apache.naming.NamingContext
Binding : name3: java.lang.Integer
Binding : foo: org.apache.naming.NamingContext
listBindings() on /comp/env Context :
Binding : mail:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@2da3d
Binding : minExemptions: java.lang.Integer:1
Binding : ejb:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@45f743
Binding : name3: java.lang.Integer:1
Binding : foo:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@6c8909


I have tested this on Apache 1.3.20, Apache 1.3.22, Tomcat 4.0, Tomcat 4.0.1
and Tomcat 4.1-dev (nightly build).

Has anyone come across this problem before, or know how to correct this?

Justin.



RE: bug report

2001-09-26 Thread JTurner

I received the same error when Tomcat 4 decided to use JDK 1.2.2 during the
install.

To fix this I removed JDK 1.2.2 and reinstalled JDK 1.3.

When I reinstalled Tomcat 4 it found JDK 1.3 and now everything runs without
any error messages.

Justin.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 11:35 AM
To: [EMAIL PROTECTED]
Subject: bug report


Hi!

I've just install Tomcat 4.0 on WinNT4 with an installer package (.exe).
When i launch Tomcat Start i recieve an error :

A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL
relocation target' has occurred in :
  'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting
method.
  Please report this error in detail to
http://java.sun.com/cgi-bin/bugreport.cgi

Is it important ??