This is what I have in the web.xml file:

<context-param>
        <param-name>
                javax.servlet.jsp.jstl.sql.dataSource
        </param-name>
        <param-value>
        
        
jdbc:oracle:thin:@hostname:1521:sid,oracle.jdbc.driver.OracleDriver,username,passw
ord
        </param-value>

So, yes, I am using the Thin client.

The full stack trace is below. The resource_id is they primary key, so I have to 
insert 
that at the least. It's a sequence number within Oracle. That part does work fine if I 
fill in the date field.
------

type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling 
this request.

exception 

javax.servlet.ServletException: 
        INSERT INTO ccevs_resource_registry (
                resource_id,
                dob
        )
        VALUES (res_id_seq.NEXTVAL
                , ? 
        )
: Invalid column type
        org.apache.jasper.runtime.PageContextImpl.doHandlePageException
(PageContextImpl.java:864)
        org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImpl.java:800)
        org.apache.jsp.test_jsp._jspService(test_jsp.java:89)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause 

java.sql.SQLException: Invalid column type
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
        at 
oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:6414)
        at oracle.jdbc.driver.OraclePreparedStatement.setNull
(OraclePreparedStatement.java:1354)
        at oracle.jdbc.driver.OraclePreparedStatement.setObject
(OraclePreparedStatement.java:2791)
        at oracle.jdbc.driver.OraclePreparedStatement.setObject
(OraclePreparedStatement.java:3217)
        at org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.setParameters
(Unknown Source)
        at 
org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.doEndTag(Unknown 
Source)
        at org.apache.jsp.test_jsp._jspx_meth_sql_update_0(test_jsp.java:186)
        at org.apache.jsp.test_jsp._jspx_meth_sql_transaction_0(test_jsp.java:127)
        at org.apache.jsp.test_jsp._jspService(test_jsp.java:76)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:284)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:204)
        at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:257)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at org.apache.catalina.core.StandardContextValve.invokeInternal
(StandardContextValve.java:245)
        at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:199)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:149)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:156)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
(Http11Protocol.java:732)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:688)
        at java.lang.Thread.run(Thread.java:534)


---------- Original Message -----------
From: "Martin van Dijken" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Sent: Wed, 31 Mar 2004 08:58:24 +0200
Subject: RE: More SQL Date problems

> Hmm Keith,
> 
> Can you specify the url you're using to connect to the database? * out the
> uid and psw of course... Also can you post a stack trace? I did a few
> Googles on your exception and heard some people shouting the oracle thin
> driver should work best. It's what I have used in the past and I've not had
> any headaches with it.
> 
> Martin
> 
> -----Oorspronkelijk bericht-----
> Van: Keith [mailto:[EMAIL PROTECTED]
> Verzonden: woensdag 31 maart 2004 5:55
> Aan: Tag Libraries Users List
> Onderwerp: Re: More SQL Date problems
> 
> Yeah, I'd read about not using that bridge driver. I'm using Oracle 9i
> Release 2, J2SE
> v1.4.2, and the JDBC Oracle Driver for JDK 1.4.
> 
> Keith
> 
> ---------- Original Message -----------
> From: Hans Bergsten <[EMAIL PROTECTED]>
> To: Tag Libraries Users List <[EMAIL PROTECTED]>
> Sent: Tue, 30 Mar 2004 20:40:41 -0800
> Subject: Re: More SQL Date problems
> 
> > Keith wrote:
> > > Ahhh, ok. I assumed it was the JSTL stuff throwing the error. I've not
> done much
> > > programming in actual Java, which is why I'm using the JSTL library.
> > >
> > > The field is set to accept a NULL value in the database. There's already
> data in the
> > > database, and there's many DOB's missing for some people. I can do
> inserts to the
> > > database from SQL*Plus fine and leave the date fields blank. It's just
> when I'm
> trying
> > > to do it via JSP. I'm trying to design an new interface to the database
> and this has
> > > been my roadblock for the week.
> >
> > Okay. Which JDBC driver are you using? If it's the JDBC-ODBC bridge, I
> > suggest you try with a real Oracle JDBC type 3 or 4 driver instead. The
> > bridge driver is buggy and not intended for production use.
> >
> > Hans
> >
> > > ---------- Original Message -----------
> > > From: Hans Bergsten <[EMAIL PROTECTED]>
> > > To: Tag Libraries Users List <[EMAIL PROTECTED]>
> > > Sent: Tue, 30 Mar 2004 19:30:44 -0800
> > > Subject: Re: More SQL Date problems
> > >
> > >
> > >>Keith wrote:
> > >>
> > >>>Now I'm thorougly confused. I could've sworn this was working before
> (as I claimed
> > >
> > > in my
> > >
> > >>>first email to the group.
> > >>>
> > >>>
> > >>><fmt:parseDate value="${param.dob}" var="parsed_dob"
> pattern="dd-MM-yyyy" />
> > >>>
> > >>><sql:transaction>
> > >>>
> > >>><sql:update>
> > >>> INSERT INTO resource_registry ( dob )
> > >>>        VALUES (? <sql:dateParam value="${parsed_dob}" type="date"/> )
> > >>></sql:update>
> > >>>
> > >>></sql:transaction>
> > >>>
> > >>>
> > >>>This works perfectly fine when I put a date in the format specified in
> the
> parseDate
> > >>>action. The JSP book I got (O'Reilly 3rd Ed) says the <sql:dateParam>
> action is
> > >
> > > supposed
> > >
> > >>>to set the value to an SQL NULL when a null value is provided to it. I
> keep getting
> > >
> > > an
> > >
> > >>>Invalid Column Type SQL exception (not an Oracle error) back whenever I
> leave the
> > >
> > > date
> > >
> > >>>field blank. Anyone know what's wrong? Thanks!
> > >>
> > >>It looks to me as if the "Invalid Column Type SQL exception" indeed
> > >>comes from the database (or the JDBC driver), because nothing in JSTL
> > >>can issue such an error message (JSTL doesn't have enough info; it
> > >>just relays the error issued by the JDBC driver).
> > >>
> > >>JSTL sets the parameter in the SQL statement to SQL NULL if the
> > >><sql:dateParam> value is null (according to the spec; bugs in an
> > >>implementation is a different story). One possible reason for the
> > >>error you get is that the column isn't declared to accept a NULL
> > >>value. Check the database table constraints.
> > >>
> > >>Hans
> >
> > --
> > Hans Bergsten                                <[EMAIL PROTECTED]>
> > Gefion Software                       <http://www.gefionsoftware.com/>
> > Author of O'Reilly's "JavaServer Pages", covering JSP 2.0 and JSTL 1.1
> > Details at                                    <http://TheJSPBook.com/>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> ------- End of Original Message -------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
------- End of Original Message -------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to