cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Mallmann" <jim.mallm...@topicalnetworks.com>
Subject <esql:parameter>...java.lang.RuntimeException: Error setting parameter on statement
Date Wed, 24 Jan 2001 17:49:53 GMT
I am trying to build a prepared statement using esql, but I am getting the
following error:
java.lang.RuntimeException: Error setting parameter on statement:insert into
digital_music (productID, artistID, genreID, product_title,
release_date,medium_type_code, medium_type_name, ship_date, explicit_lyric,
number_of_tracks, product_playtime, selling_price, graphics_filename,
label_name, upc, status, status_code, drm_id, drm_name, codec_id,
codec_name, clearinghouse_id, clearinghouse_name) values (?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
	at
_C_._Java._jakarta_tomcat_3_2_1._webapps._cocoon._tn._iontunes._bmgcatalogsa
mplefullplay.populateDocument(_bmgcatalogsamplefullplay.java:464)
	at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
	at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:524)
	at org.apache.cocoon.Engine.handle(Engine.java:383)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
	at org.apache.tomcat.core.Handler.service(Handler.java:286)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)
I think that the parameters are formatted properly, but I don't know for
sure.

I realize that the PreparedStatement part of esql is very new, so any help I
receive is greatly appreciated.

Thanks.

Jim

My code follows (formatted for better viewing):

// all <xsl:value-of ...> statement are referenced properly...test that
already
insert into digital_music (productID, artistID, genreID, product_title,
release_date,medium_type_code,
medium_type_name, ship_date, explicit_lyric, number_of_tracks,
product_playtime, selling_price,
graphics_filename, label_name, upc, status, status_code, drm_id, drm_name,
codec_id, codec_name,
clearinghouse_id, clearinghouse_name) values (
<esql:parameter type="string">
     // I moved to this method because strings with spaces caused problems
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/@PRODUCT_ID"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="int">
    <esql:get-int ancestor="1" column="artistID"/>  // this is working...I
tested it before I moved to a PreparedStatement
</esql:parameter>,
<esql:parameter type="int">
    <esql:get-int column="genreID"/>  // this is working...I tested it
before I moved to a PreparedStatement
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/@PRODUCT_TITLE"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="date">
    <xsp:expr>(java.sql.Date)new Date("<xsl:value-of
select="PRODUCT_DETAILS/@RELEASE_DATE"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/MEDIUM_TYPE_CD"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/MEDIUM_TYPE_NAME"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="date">
    <xsp:expr>(java.sql.Date)new Date("<xsl:value-of
select="PRODUCT_DETAILS/SHIP_DATE"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/EXPLICIT_LYRIC"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="int">
    <xsl:value-of select="PRODUCT_DETAILS/NUMBER_OF_TRACKS"/>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/PRODUCT_PLAYTIME"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="double">
    <xsl:value-of select="PRODUCT_DETAILS/SELLING_PRICE"/>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/GRAPHICS_FILENAME"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/LABEL_NAME"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/UPC"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/STATUS"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="PRODUCT_DETAILS/STATUSCODE"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of select="DRM/DRM_ID"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of select="DRM/DRM_NAME"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="CODEC/CODEC_ID"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="CODEC/CODEC_NAME"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="CLEARINGHOUSE/CLEARINGHOUSE_ID"/>")</xsp:expr>
</esql:parameter>,
<esql:parameter type="string">
    <xsp:expr>new String("<xsl:value-of
select="CLEARINGHOUSE/CLEARINGHOUSE_NAME"/>")</xsp:expr>
</esql:parameter>)




Jim Mallmann
Topical Networks, LLC
jim.mallmann@topicalnetworks.com



Mime
View raw message