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
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,359 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
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 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
web services creation SOAP vs REST 5 56
factorial example 4 47
use lov values 2 61
ejb stateless example 2 18
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

809 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