logo       


Strange Parameter index out of range error: msg#00340

Subject: Strange Parameter index out of range error
Hello,

I'm encountering a persistent error. I'm trying to use a parameter map inside my application. Here goes:

<parameterMap id="studentMap" class="com.mafoi.bats.Student">
       <parameter property="id"/>
       <parameter property="name"/>
       <parameter property="dob"/>
       <parameter property="doe"/>
       <parameter property="streamId"/>
       <parameter property="batchId"/>
<parameter property="photo" javaType="com.mafoi.bats.Image" jdbcType="bytea"/>
   </parameterMap>
<insert id="insertStudent" parameterMap="studentMap"> insert into students (id, name, dob, doe, stream_id, batch_id, photo)
       values (#id#, #name#, to_date(#dob#, 'DD/MM/YYYY'),
       to_date(#doe#, 'DD/MM/YYYY'), #streamId#, #batchId#, #photo#)
   </insert>

This seems perfectly alright to me, but I'm getting this exception:

javax.servlet.ServletException: --- The error occurred in com/mafoi/bats/Student.xml. --- The error occurred while applying a parameter map. --- Check the studentMap. --- Check the parameter mapping for the 'id' property. --- Cause: org.postgresql.util.PSQLException: Parameter index out of range.
        
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:516)
[...]

As you can see, I don't think there is anything wrong with the mapping. the "Student" class getter/setter or the "id" variable, and it is an int. I'm using a custom type handler for "photo" property. Can it be the problem? I'm lost. Please help.

TIA,
Vamsee.




Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe