Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 433523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:10:57+00:00 2026-05-12T20:10:57+00:00

I have the following iBatis mapping for an Oracle Stored Procedure that returns a

  • 0

I have the following iBatis mapping for an Oracle Stored Procedure that returns a true/false value.

  <resultMap id="isAuthorizedResult" class="java.lang.Boolean">
    <result property="isAuthorized" column="isAuthorized"/>
  </resultMap>
  <parameterMap id="isAuthorizedCall" class="map">
    <parameter property="prgType" jdbcType="String" javaType="java.lang.String" mode="IN"/>
    <parameter property="parCode" jdbcType="String" javaType="java.lang.String" mode="IN"/>
    <parameter property="userId" jdbcType="String" javaType="java.lang.String" mode="IN"/>
    <parameter property="Result0" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="isAuthorizedResult"/>
  </parameterMap>
<procedure id="isAuthorized" parameterMap="isAuthorizedCall">{call chk_user_ocpncy (?,?,?,?) }</procedure>

I call the mapping from my Java code like this:

getSqlMapClientTemplate().queryForObject("reexamination.isAuthorized", paramMap);

However, I get the following error…

Fail to convert to internal representation; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:

What am I doing wrong? can we not store a boolean value directly into the cursor?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:10:58+00:00Added an answer on May 12, 2026 at 8:10 pm

    Returning a Boolean type is not supported by Oracle JDBC. Or more specifically, it can’t be used in any result set in Oracle (there is a Boolean that can be used in PL/SQL, but you can’t return it in a ref cursor or declare a column of being type ‘Boolean’.

    It sounds like you are saying that your ref cursor contains boolean? If yes, you will need to return ‘Y’ or ‘N’ or something similar. Please consider posting the source/signature of the stored procedure – that will help with the answer.

    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html#34_05

    Tom Kyte’s traditionally cheeky response:
    You Asked

    Here’s a real short one for you Tom:

    Why doesn’t Oracle RDBMS have a
    boolean datatype?

    and we said…

    since …, flag char(1) check (flag in
    ( ‘Y’, ‘N’ )), …,

    serves the same purpose, requires the
    same amount of space and does the same
    thing – I guess we feel this is a
    feature we can let them have that we
    really don’t need.

    I mean – what do you get back from a
    column in “access” that is a boolean?
    TRUE / FALSE. We’ll give you Y/N —
    if you would like TRUE/FALSE, we can
    accomplish that easily with
    DECODE(flag,’Y’,’TRUE’,’N’,’FALSE’)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following query which has select query that returns data in 5sec. But
I have a database that is similar to the following: create table Store(storeId) create
I have following code that creates Linq query. I've never used Linq until today
Suppose I have the following class: public class Foo { public Bar bar; }
I have following implementation public abstract class BaseAcion extends ActionSupport { private String result;
I have following classes: Container , Element and then couple of classes that inherit
Let's suppose I have the following structure in my project (I'm using iBatis as
I have the following environment set up: Java 1.5 Sun Application Server 8.2 Oracle
I have following structure of an HTML document: <body> <div class=main> <div class=left></div> <div
We have a medium sized Java server that has data flowing in the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.