Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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,365 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

609 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