You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by The Gman <gm...@hotmail.com> on 2004/04/01 06:16:03 UTC

Tomcat5 - MySql5.0.0a - apache2.0 - XP - JNDI connection problems

I am following:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

I am running windows XP - have apache 2.0.48 and Tomcat 5.0.19 up and
running with j2sdk1.4.2_04. I am also running MySql5.0.0a

Under $CATALINA_HOME/comon/lib
  mysql-connector-java-3.0.11-stable-bin
  commons-collections.3.0.jar
  commons-dbcp-1.1.jar
  commons-pool-1.1.jar

When I run the test code - test.jsp I get the following error:

Exception report:
org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the
jar files deployed with this application

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)

org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:359)

org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:190)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
	org.apache.jasper.compiler.Parser.parse(Parser.java:171)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:258)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:139)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

What is wrong with my configuration?

Step 2. server.xml configuration says "</Context> tag of the examples
context and the </Host>"
My server.xml doesn't have <Context> tags should there be one?

Step 3. web.xml configuration - Do I make/add these changes to the web.xml
under $CATALINA\ROOT\WEB-INF or under a subdirectory called /DBTest/??

Step 4. test code says "deploy your web app into $CATALINA_HOME/webapps
either as a warfile called DBTest.war orinto a subdirectory called DBTest."
So, I created a directory called DBTest and just put the test.jsp file into
that directory - doesn't that qualify as "deploying"??

Thanks for any help to fix my configuration.

Tim

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat5 - MySql5.0.0a - apache2.0 - XP - JNDI connection problems

Posted by Aadi Deshpande <ma...@clubmom-inc.com>.
Hi,

For your JSTL issue, make sure in your WEB-INF/lib directory you have 
jstl.jar and standard.jar ( for the apache standard implementation ). 
otherwise, you will not be able to use JSTL.

hth,
-a

The Gman wrote:

> I am following:
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html 
>
>
> I am running windows XP - have apache 2.0.48 and Tomcat 5.0.19 up and
> running with j2sdk1.4.2_04. I am also running MySql5.0.0a
>
> Under $CATALINA_HOME/comon/lib
> mysql-connector-java-3.0.11-stable-bin
> commons-collections.3.0.jar
> commons-dbcp-1.1.jar
> commons-pool-1.1.jar
>
> When I run the test code - test.jsp I get the following error:
>
> Exception report:
> org.apache.jasper.JasperException: The absolute uri:
> http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml 
> or the
> jar files deployed with this application
>
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) 
>
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404) 
>
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154) 
>
>
> org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:359) 
>
>
> org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:190) 
>
> org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
> org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
> org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
> org.apache.jasper.compiler.Parser.parse(Parser.java:171)
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:258) 
>
> org.apache.jasper.compiler.ParserController.parse(ParserController.java:139) 
>
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553) 
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) 
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
> What is wrong with my configuration?
>
> Step 2. server.xml configuration says "</Context> tag of the examples
> context and the </Host>"
> My server.xml doesn't have <Context> tags should there be one?
>
> Step 3. web.xml configuration - Do I make/add these changes to the 
> web.xml
> under $CATALINA\ROOT\WEB-INF or under a subdirectory called /DBTest/??
>
> Step 4. test code says "deploy your web app into $CATALINA_HOME/webapps
> either as a warfile called DBTest.war orinto a subdirectory called 
> DBTest."
> So, I created a directory called DBTest and just put the test.jsp file 
> into
> that directory - doesn't that qualify as "deploying"??
>
> Thanks for any help to fix my configuration.
>
> Tim
>
> _________________________________________________________________
> MSN Toolbar provides one-click access to Hotmail from any Web page – 
> FREE download! http://toolbar.msn.com/go/onm00200413ave/direct/01/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat5 - MySql5.0.0a - apache2.0 - XP - JNDI connection problems

Posted by Parsons Technical Services <pa...@earthlink.net>.
Tim,


> I am following:
>
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
Good start.

>
> I am running windows XP - have apache 2.0.48 and Tomcat 5.0.19 up and
> running with j2sdk1.4.2_04. I am also running MySql5.0.0a
>
I recommend for the purpose of testing to access Tomcat directly if
possible. MySQL version may cause issues as noted by Tom. Once everything
else is fixed, we'll see.


> Under $CATALINA_HOME/comon/lib
>   mysql-connector-java-3.0.11-stable-bin
>   commons-collections.3.0.jar
>   commons-dbcp-1.1.jar
>   commons-pool-1.1.jar
That is the correct place for the driver.

>
> When I run the test code - test.jsp I get the following error:
>
> Exception report:
> org.apache.jasper.JasperException: The absolute uri:
> http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or
the
> jar files deployed with this application
>
>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:94)
snip...
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
This looks odd to me. Don't have an answer at this point. Look into Tom's
sugestions.

>
> What is wrong with my configuration?
To answer this it is much easier if we can see them.

>
> Step 2. server.xml configuration says "</Context> tag of the examples
> context and the </Host>"
> My server.xml doesn't have <Context> tags should there be one?
Yes and no.
To keep things simple and to start you down the path of Tomcat knowledge,
for now create the context section as shown in the example. Later you can
move it to context.xml. Look up the context section under server
configuration for more detail.

>
> Step 3. web.xml configuration - Do I make/add these changes to the web.xml
> under $CATALINA\ROOT\WEB-INF or under a subdirectory called /DBTest/??
Under /DBTest/WEB-INF/ in the web.xml for your app.

>
> Step 4. test code says "deploy your web app into $CATALINA_HOME/webapps
> either as a warfile called DBTest.war orinto a subdirectory called
DBTest."
> So, I created a directory called DBTest and just put the test.jsp file
into
> that directory - doesn't that qualify as "deploying"??
No. IMHO  You need to create the file structure and the web.xml. Not sure
what else as I use .war files.

Doug



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat5 - MySql5.0.0a - apache2.0 - XP - JNDI connection problems

Posted by Tom K <tk...@cox.net>.
Are you using jstl tags to connect to your database? Looking at your
error, I noted the path http://java.sun.com/jsp/jstl/sql You are using
the preview version of mySQL (Version 5), has connectorJ been tested
with it...I don't know, I'm just asking. 

Tom K.




-----Original Message-----
From: The Gman [mailto:gmanrocks@hotmail.com] 
Sent: Wednesday, March 31, 2004 10:16 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat5 - MySql5.0.0a - apache2.0 - XP - JNDI connection
problems

I am following:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples
-howto.html

I am running windows XP - have apache 2.0.48 and Tomcat 5.0.19 up and
running with j2sdk1.4.2_04. I am also running MySql5.0.0a

Under $CATALINA_HOME/comon/lib
  mysql-connector-java-3.0.11-stable-bin
  commons-collections.3.0.jar
  commons-dbcp-1.1.jar
  commons-pool-1.1.jar

When I run the test code - test.jsp I get the following error:

Exception report:
org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or
the
jar files deployed with this application

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:94)
	
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:404)
	
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:154)

org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLib
raryInfoImpl.java:359)

org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.
java:190)
	
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
	
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
	
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
	org.apache.jasper.compiler.Parser.parse(Parser.java:171)
	
org.apache.jasper.compiler.ParserController.doParse(ParserController.jav
a:258)
	
org.apache.jasper.compiler.ParserController.parse(ParserController.java:
139)
	
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
	
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:553)
	
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:291)
	
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

What is wrong with my configuration?

Step 2. server.xml configuration says "</Context> tag of the examples
context and the </Host>"
My server.xml doesn't have <Context> tags should there be one?

Step 3. web.xml configuration - Do I make/add these changes to the
web.xml
under $CATALINA\ROOT\WEB-INF or under a subdirectory called /DBTest/??

Step 4. test code says "deploy your web app into $CATALINA_HOME/webapps
either as a warfile called DBTest.war orinto a subdirectory called
DBTest."
So, I created a directory called DBTest and just put the test.jsp file
into
that directory - doesn't that qualify as "deploying"??

Thanks for any help to fix my configuration.

Tim

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page –
FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org