?
Solved

Why am I getting this message, if JDeveloper has jstl.jar and standard.jar library inside WEB-INF/lib?

Posted on 2007-12-01
3
Medium Priority
?
2,364 Views
Last Modified: 2013-11-24
I am using a JSP file
---

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="mestags" prefix="mt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>

<sql:setDataSource driver="sun.jdbc.odbc.JdbcOdbcDriver" scope="application"
                     url="jdbc:odbc:inventaire" var="inventaire"/>
   
<sql:query var="usagers" dataSource="${inventaire}"
             sql="SELECT * FROM Clients" scope="session"/>
........
I am using JDeveloper for the editing and I am using Tomcat 6.0 to run my web project
I have added jstl.jar and standard.jar under WEB-INF/lib and the problems persists
When I run the porject with Tomcat I am getting

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /Affiche.jsp at line 10

7: <%@ taglib uri="mestags" prefix="mt"%>
8: <sql:setDataSource driver="sun.jdbc.odbc.JdbcOdbcDriver" scope="application"
9:                      url="jdbc:odbc:inventaire" var="inventaire" />
10: <sql:query var="usagers" dataSource="${inventaire}"
11:              sql="SELECT * FROM Clients" scope="session"/>
12: <mt:securite reponse="${pageContext.response}" var="securite"
13:                   requete="${pageContext.request}" usagers="${usagers.rows}"/>


Stacktrace:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)
      org.apache.jsp.Affiche_jsp._jspService(Affiche_jsp.java:140)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
      org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
      org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
      org.apache.jsp.Affiche_jsp._jspx_meth_sql_005fquery_005f0(Affiche_jsp.java:190)
      org.apache.jsp.Affiche_jsp._jspService(Affiche_jsp.java:97)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.
Please advise
Thank you
0
Comment
Question by:Mimi1979
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Author Comment

by:Mimi1979
ID: 20389121
The messager I`m getting when I Rebuild my project with JDeveloper ----

Error(5): "http://java.sun.com/jsp/jstl/core" is not a registered TLD namespace
Error(9): Unable to instantiate tag: sql:setDataSource (class: org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag)  Make sure that the tag class is available and that the tag library containing the class is not excluded from this application.
Error(10): Unable to find class for bean: null defined by tag with class: org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 20389127
Looks like you haven't set the datasource properly
0
 
LVL 92

Accepted Solution

by:
objects earned 1500 total points
ID: 20389406
its nothing to do with jstl, you need to define a datasource name 'inventaire' on the machine that the app server is running on.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question