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 "Halvorson, Loren" <Lo...@firepond.com> on 2002/06/18 17:05:06 UTC

JSTL RC1 XML Transform exception

I just downloaded the standard tag library RC1 newly posted by Shawn which
is supposed to be the same as the 1.0 release.  I noticed that the XML
parser has been changed from Xerces to Crimson, and wonder if this is what
is causing the following exception.  I am running with the also newly posted
Tomcat 4.0.4 final release, on Windows 2000, with JDK 1.3.1_03.  When I run
the included examples WAR, and go to the XML transform example, I receive
the following stack trace. Any advice on how to fix this is appreciated.
(Curiously, the version of JSTL included in Sun's jwsdp-1_0 download was
still using Xerces, so the two are not quite equivalent)  Thanks, --Loren

Apache Tomcat/4.0.4 - 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 
javax.servlet.ServletException: SAX2 driver class
org.apache.crimson.parser.XMLReaderImpl not found
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:471)
	at org.apache.jsp.Transform$jsp._jspService(Transform$jsp.java:373)
	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.ja
va:201)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	:
	at java.lang.Thread.run(Thread.java:479)
root cause 

javax.servlet.jsp.JspException: SAX2 driver class
org.apache.crimson.parser.XMLReaderImpl not found
	at
org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(Trans
formSupport.java:166)
	at
org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(TransformTag.
java:104)
	at org.apache.jsp.Transform$jsp._jspService(Transform$jsp.java:145)
	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.ja
va:201)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	:
	at java.lang.Thread.run(Thread.java:479)


JSTL SQL Update tag problem

Posted by Roman Kapshevich <ro...@ucapital.ru>.
Hello!

We use JSTL 1.0 and have the following problem with sql update tag:



When SQL executes correctly all works fine, but when error occupier in SQL
then any sql tags begins throwing the following exception:



javax.servlet.jsp.JspException:
			SELECT TO_CHAR(dt, 'FXFMDD-MON-YYYY')
news_date,headline,short_body,full_body,news_id
			FROM news
			WHERE news_type = 1 AND shop_id = 1
			ORDER BY dt DESC
		: Closed Statement
	at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTag
Support.java:252)
	at
jrun__templates__panels__panel22ejsp1c._jspService(jrun__templates__panels__
panel22ejsp1c.java:903)
	at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
	at jrun.jsp.JSPServlet.service(JSPServlet.java:106)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:414
)
	at
jrun.servlet.JRunRequestDispatcher.include(JRunRequestDispatcher.java:348)
	at jrun.jsp.runtime.JRunPageContext.include(JRunPageContext.java:352)
	at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:757)
	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:369)

Only restart of the server helps.

App Server: JRun 4.0
Database driver: Oracle 8.17 think JDBC type 4 driver

exmp of use:

<sql:update var="delold" dataSource="${ds}">
  INSERT INTO Users_Answers
  (quest_id, answer_id, anket_id, user_id, dt, answer)
  VALUES (?,?,?,?,SYSDATE,?)
 <sql:param value="1128"/>
 <sql:param value="cccc"/>
 <sql:param value="2"/>
 <sql:param value="202020"/>
 <sql:param value="Err"/>
</sql:update>

Datasource ds is set up using the following code:

 <%
    javax.naming.Context ctx = new javax.naming.InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("ectaco");
 application.setAttribute("ds",ds);
 %>

Do Everyone know any solution to this problem?

Thank you in advance.

Best regards,
Roman Kapshevich
ICQ 2032093


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSTL RC1 XML Transform exception

Posted by Shawn Bayern <ba...@essentially.net>.
On Tue, 18 Jun 2002, Halvorson, Loren wrote:

> I just downloaded the standard tag library RC1 newly posted by Shawn which
> is supposed to be the same as the 1.0 release.  I noticed that the XML
> parser has been changed from Xerces to Crimson, and wonder if this is what
> is causing the following exception.

This is a good point; we have been using Crimson at Jakarta, but WSDP uses
Xerces.  This is intentional, but it's only a temporary workaround and
inconsistency; Tomcat 4.0.3 had a bug that prevented the JAXP 1.2 classes
from loading successfully, and our policy has been to track Tomcat
*releases* (not milestones) with our versions.  Thus, we have had to wait
for 4.0.4 final to move to bundling JAXP 1.2 with the Standard Taglib.  
Now that this release has been done, we can use JAXP 1.2 in the upcoming,
final Standard 1.0 release.

All clear?  :-)  Dealing with different XML libraries is always irritating
and tricky...  Fortunately, it'll all be tied up nicely very soon.

> description The server encountered an internal error (Internal Server
> Error) that prevented it from fulfilling this request. exception
> javax.servlet.ServletException: SAX2 driver class
> org.apache.crimson.parser.XMLReaderImpl not found

I'm not sure I understand this error yet, but I'll try to look into it
more closely.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com
(coming in July 2002 from Manning Publications)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>