Hello. I am getting a NamingException while Tomcat processes Global JNDI
Resources. Any idea why this is happening? I am using Mac OS X Tiger,
Eclipse 3.1, and the Tomcat Eclipse Plugin 3.1.0 from Sysdeo. This error
occurs when I try to start Tomcat from within Eclipse using the plugin. It
occurs
/05, Asad Habib [EMAIL PROTECTED] wrote:
Hello. I am getting a NamingException while Tomcat processes Global JNDI
Resources. Any idea why this is happening? I am using Mac OS X Tiger,
Eclipse 3.1, and the Tomcat Eclipse Plugin 3.1.0 from Sysdeo. This error
occurs when I try to start Tomcat from
@jakarta.apache.org
Betreff: Re: Tomcat 5.5.9: NamingException cannot be resolved or is not a
type - JNDI, MySQL
Datum: Wed, 08 Jun 2005 17:44:55 -0400
Great! Thanks Torsten. Added javax.naming Now new problem:
NamingException:
javax.naming.NamingException: Could not create resource
= stmt.executeQuery(select * from subscriber);
It fails on the lookup with:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 52 in the jsp file: /testdb.jsp
Generated servlet error:
NamingException cannot be resolved or is not a type
: NamingException cannot be resolved or
is not a type - JNDI, MySQL
I get the error below when trying to compile/execute a jsp
that wants to connect to a MySQL db named
testdb. Here's the code snippet from testdb.jsp:
InitialContext initCtx = null;
DataSource ds = null
in your JSP :
%@ page import={package.class | package.*}, ... ...
Arnaud
-Message d'origine-
De : Greg Brownell [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 8 juin 2005 21:34
À : tomcat-user@jakarta.apache.org
Objet : Tomcat 5.5.9: NamingException cannot be resolved or
is not a type
: tomcat-user@jakarta.apache.org
Objet : Tomcat 5.5.9: NamingException cannot be resolved or is not a
type - JNDI, MySQL
I get the error below when trying to compile/execute a jsp that wants
to connect to a MySQL db named
testdb. Here's the code snippet from testdb.jsp:
InitialContext initCtx
Great! Thanks Torsten. Added javax.naming Now new problem:
NamingException:
javax.naming.NamingException: Could not create resource factory,
ClassNotFoundException:org.apache.commons.dbcp.BasicDataSourceFactory
This exposed several other pitfalls. Tomcat distribution did not come
NamingException
Did you put ResourceLinks in your Default context or the Apps context?
If not, you will not be able to see the resource.
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html
And the link that is in your server.xml shouldn't be there or anywhere.
See
accesses this resource (well, tries to) using the following
code:
try {
Context ctx = new InitialContext();
if(ctx == null ){
System.out.println(Boom - No Context);
throw new NamingException(No Context - No DataBase Exists);
}
Context envCtx = (Context)ctx.lookup(java:comp/env);
Object ud
.
suffix=.txt
timestamp=true/
/Host
/Engine
/Service
/Server
My application accesses this resource (well, tries
to) using the following
code:
try {
Context ctx = new InitialContext();
if(ctx == null ){
System.out.println(Boom - No Context);
throw new NamingException(No Context
- Original Message -
From: Carl [EMAIL PROTECTED]
To: Tomcat User Group tomcat-user@jakarta.apache.org
Sent: Tuesday, February 15, 2005 4:41 PM
Subject: JNDI lookup returns NamingException
For various reasons, I need to put a Hashtable as a resource in the Tomcat
Context. I have modified
BUG ID: http://issues.apache.org/bugzilla/show_bug.cgi?id=33307
Problem:
jspInit() throwing NamingException when extracting a factory
object
from JNDI context.
Description:
When the container has been configured to load the JSP page
Appreciate if any one has some inputsWe couldn't decide whether it
is a bug or usage issue,...
Details @ http://issues.apache.org/bugzilla/show_bug.cgi?id=33307
Problem:
jspInit() throwing NamingException when extracting a factory
object
from JNDI context
-Original Message-
From: Yogi [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 03, 2005 7:47 PM
To: 'Tomcat Users List'
Subject: RE: jspInit() throwing NamingException when extracting a
factory object from JNDI context
Appreciate if any one has some inputsWe couldn't decide whether
hi,
I just joined this list but have used tomcat a while now.
I used jakarta-tomcat-4.1.10 until now and changed my server to
jakarta-tomcat-4.1.18-LE-jdk14 and got it running almost OK.
in server.xml I have a Context element like this:
Context path= docBase=/var/www/htdocs debug=1
-authContainer/res-auth
/resource-ref
/web-app
My code:
try {
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource) envCtx.lookup(jdbc/DBSample);
Returns a NamingException
} catch(
Here is some piece of Stack
that.. I guess
JNDI support must be better.. :)
Thanks..
--- Phil Steitz [EMAIL PROTECTED] wrote:
Glow Nair wrote:
--
NamingException : Cannot create resource instance
--
While trying to run
18 matches
Mail list logo