You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Shawn Bayern <ba...@essentially.net> on 2002/04/29 14:28:35 UTC
Re: DataSource Error...
Sankar -
I just realized what your error might be: it looks like the JDBC
parameter string you're using has spaces in it. This isn't allowed by the
spec. Try removing the spaces.
--
Shawn Bayern
"JSP Standard Tag Library" http://www.jstlbook.com
(coming this summer from Manning Publications)
On Fri, 26 Apr 2002, Sankar B wrote:
> Dear All,
>
> I can not able to connect using the JNDI relative path
> 'jdbc/jstl' when I give in the <sql:setDataSource> tag
> or in other tags I can able to see the message in the
> Tomcat Console as follows:
>
> DbcpDataSourceFactory:
> driverClassName=oracle.jdbc.driver.OracleDriver,
> url=jdb
> c:oracle:thin:@172.17.56.1:1521:idch, user=vms_test
>
> But, I get the following error in the page:
>
> HTTP Status 500 - Internal Server Error
>
> --------------------------------------------------------------------------------
>
> type Exception report
>
> message Internal Server Error
>
> description The server encountered an internal error
> (Internal Server Error) that prevented it from
> fulfilling this request.
>
> exception
>
> java.lang.ClassCastException:
> org.apache.commons.dbcp.PoolingDataSource
> at
> org.apache.taglibs.standard.tag.common.sql.DataSourceUtil.setDataSource(DataSourceUtil.java:121)
> at
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:182)
> at
> org.apache.taglibs.standard.tag.el.sql.QueryTag.doStartTag(QueryTag.java:124)
> at
> org.apache.jsp.jstl$jsp._jspService(jstl$jsp.java:69)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577)
> at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:577)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:575)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1029)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1140)
> at java.lang.Thread.run(Thread.java:484)
>
> The following is the code im using from the example:
>
> <%@ taglib prefix="sql"
> uri="http://java.sun.com/jstl/sql" %>
> <%@ taglib prefix="c"
> uri="http://java.sun.com/jstl/core" %>
>
> <html>
> <head>
> <title>JSTL: SQL action examples</title>
> </head>
> <body bgcolor="#FFFFFF">
>
> <h1>SQL Query Execution using an iterator</h1>
>
> <!-- NOTE: the sql:setDataSource tag is for
> prototyping and simple applications. You should really
> use a DataSource object instead -->
>
> <sql:query var="deejays" dataSource="jdbc/jstl">
> SELECT * FROM ID_COUNTRY_MASTER
> </sql:query>
>
>
> <h2>Putting it all together</h2>
>
> <%-- Easiest example showing how to populate a table
> --%>
> <table border="1">
> <tr>
> <%-- Get the column names for the header of the
> table --%>
> <c:forEach var="columnName"
> items="${deejays.columnNames}">
> <th><c:out value="${columnName}"/></th>
> </c:forEach>
>
> <%-- Get the value of each column while iterating
> over rows --%>
> <c:forEach var="row" items="${deejays.rowsByIndex}">
> <tr>
> <c:forEach var="column" items="${row}">
> <td><c:out value="${column}"/></td>
> </c:forEach>
> </c:forEach>
> </table>
>
> </body>
> </html>
>
>
> Yours,
> Sankar.B
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource Error...
Posted by Shawn Bayern <ba...@essentially.net>.
On Mon, 29 Apr 2002, Wolfgang Röckelein wrote:
> In beta2 it works when I specify a relative JNDI path; it does not
> work, when I use an absolute JDNI path.
This is indeed the expected behavior for Beta2 and JSTL 1.0.
Relative paths are required.
--
Shawn Bayern
"JSP Standard Tag Library" http://www.jstlbook.com
(coming this summer from Manning Publications)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource Error...
Posted by Shawn Bayern <ba...@essentially.net>.
On Mon, 29 Apr 2002, Wolfgang Röckelein wrote:
> In beta2 it works when I specify a relative JNDI path; it does not
> work, when I use an absolute JDNI path.
This is indeed the expected behavior for Beta2 and JSTL 1.0.
Relative paths are required.
--
Shawn Bayern
"JSP Standard Tag Library" http://www.jstlbook.com
(coming this summer from Manning Publications)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource Error...
Posted by Wolfgang Röckelein <wo...@wiwi.uni-regensburg.de>.
Hi,
Ryan Lubke wrote:
>
> Can you provide more details regarding the error? Perhaps a Stacktrace?
In beta2 it works when I specify a relative JNDI path; it does not work,
when I use an absolute JDNI path.
More tests, also with a uptodate nightly build, tomorrow.
Greetings,
Wolfgang
> On Mon, 2002-04-29 at 08:45, Wolfgang Röckelein wrote:
> > I have the following problem: I put the JNDI Name in a scripting
> > variable (c:set) and used that variable in the datasource property of a
> > query as an EL expression, which resulted in an error. This worked in
> > the nightly builds till early March, I got several different errors with
> > beta2 and nightly builds before that.
Re: DataSource Error...
Posted by Wolfgang Röckelein <wo...@wiwi.uni-regensburg.de>.
Hi,
Ryan Lubke wrote:
>
> Can you provide more details regarding the error? Perhaps a Stacktrace?
In beta2 it works when I specify a relative JNDI path; it does not work,
when I use an absolute JDNI path.
More tests, also with a uptodate nightly build, tomorrow.
Greetings,
Wolfgang
> On Mon, 2002-04-29 at 08:45, Wolfgang Röckelein wrote:
> > I have the following problem: I put the JNDI Name in a scripting
> > variable (c:set) and used that variable in the datasource property of a
> > query as an EL expression, which resulted in an error. This worked in
> > the nightly builds till early March, I got several different errors with
> > beta2 and nightly builds before that.
Re: DataSource Error...
Posted by Ryan Lubke <Ry...@Sun.COM>.
Can you provide more details regarding the error? Perhaps a Stacktrace?
-rl
On Mon, 2002-04-29 at 08:45, Wolfgang Röckelein wrote:
> Hi,
>
> I have the following problem: I put the JNDI Name in a scripting
> variable (c:set) and used that variable in the datasource property of a
> query as an EL expression, which resulted in an error. This worked in
> the nightly builds till early March, I got several different errors with
> beta2 and nightly builds before that.
>
> Is that supposed to work?
>
> Thank you very much in advance,
> Wolfgang
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource Error...
Posted by Ryan Lubke <Ry...@Sun.COM>.
Can you provide more details regarding the error? Perhaps a Stacktrace?
-rl
On Mon, 2002-04-29 at 08:45, Wolfgang Röckelein wrote:
> Hi,
>
> I have the following problem: I put the JNDI Name in a scripting
> variable (c:set) and used that variable in the datasource property of a
> query as an EL expression, which resulted in an error. This worked in
> the nightly builds till early March, I got several different errors with
> beta2 and nightly builds before that.
>
> Is that supposed to work?
>
> Thank you very much in advance,
> Wolfgang
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource Error...
Posted by Wolfgang Röckelein <wo...@wiwi.uni-regensburg.de>.
Hi,
I have the following problem: I put the JNDI Name in a scripting
variable (c:set) and used that variable in the datasource property of a
query as an EL expression, which resulted in an error. This worked in
the nightly builds till early March, I got several different errors with
beta2 and nightly builds before that.
Is that supposed to work?
Thank you very much in advance,
Wolfgang
Re: DataSource Error...
Posted by Wolfgang Röckelein <wo...@wiwi.uni-regensburg.de>.
Hi,
I have the following problem: I put the JNDI Name in a scripting
variable (c:set) and used that variable in the datasource property of a
query as an EL expression, which resulted in an error. This worked in
the nightly builds till early March, I got several different errors with
beta2 and nightly builds before that.
Is that supposed to work?
Thank you very much in advance,
Wolfgang