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
2,356 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
3 Comments
 

Author Comment

by:Mimi1979
Comment Utility
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
Comment Utility
Looks like you haven't set the datasource properly
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now