Link to home
Start Free TrialLog in
Avatar of Mimi1979
Mimi1979

asked on

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

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
Avatar of Mimi1979
Mimi1979

ASKER

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
Avatar of CEHJ
Looks like you haven't set the datasource properly
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial