String input parameter is not working in web sphere. When the stored procedure 
accessed through JNDI.
-----------------------------------------------------------------------------------------------------

         Key: IBATIS-232
         URL: http://issues.apache.org/jira/browse/IBATIS-232
     Project: iBatis for Java
        Type: Bug
  Components: SQL Maps  
    Versions: 2.1.5    
 Environment: Web Sphere Portal 5.01, iBatis 2.1.5 and Oracle 9
    Reporter: Sathiya Shanmugam


Java Source code:
**********************************************************
Map map = new HashMap();
map.put("input1","S12345");
sqlMap.queryForObject("acctupd", map);
System.out.println("Output message >>> " + map.get("msg"));
**********************************************************
<parameterMap id="acctupd"  class="map" >
        <parameter property="input1"            jdbcType="VARCHAR"      
javaType="java.lang.String" mode="IN"/>
        <parameter property="msg"        jdbcType="VARCHAR"     
javaType="java.lang.String" mode="OUT"/>        
</parameterMap>

<procedure id="acctupd" parameterMap = "acctupd">
        { call temp_secss2.GetEmpRS2(?,?)}
</procedure>
***********************************************************
The above code is not working for update, queryForList and queryForObject when 
i use JNDI connection. It is working fine with XML datasource connection 
details.

JNDI

<sqlMapConfig>
        <settings cacheModelsEnabled="true" enhancementEnabled="true" 
maxSessions="64" maxTransactions="8" maxRequests="128" />
        <transactionManager type="JDBC">
                <dataSource type="JNDI">
                        <property value="jdbc/ds2" name="DataSource"/>
            </dataSource>
        </transactionManager>

        <!-- Identify all SQL Map XML files to be loaded by this SQL map. --> 
        <sqlMap 
resource="com/jpmc/fcg/framework/daoxml/sqlmappingxml/accountupdatesqlmap.xml"/>
</sqlMapConfig>

*****************************************
<sqlMapConfig>

        <properties resource="test/SqlMapConfig.properties"/>

        <settings cacheModelsEnabled="true"
        enhancementEnabled="true"
        lazyLoadingEnabled="true" maxRequests="32"
        maxSessions="10" maxTransactions="5"
        useStatementNamespaces="false" />

        <transactionManager type="JDBC" commitRequired="true">
                <dataSource type="SIMPLE">
                        <property name="JDBC.Driver" value="${driver}"/>
                        <property name="JDBC.ConnectionURL" value="${url}"/>
                        <property name="JDBC.Username" value="${username}"/>
                        <property name="JDBC.Password" value="${password}"/>
                </dataSource>
        </transactionManager>
        
        <sqlMap resource="test/Account.xml"/>

</sqlMapConfig>

********************************************************************************************************************************
Error Details..

--- The error occurred in 
com/jpmc/fcg/framework/daoxml/sqlmappingxml/accountupdatesqlmap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the acctupd.  
--- Check the parameter mapping for the 'input1' property.  
--- Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in 
com/jpmc/fcg/framework/daoxml/sqlmappingxml/accountupdatesqlmap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the acctupd.  
--- Check the parameter mapping for the 'input1' property.  
--- Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
[12/12/05 17:16:26:516 EST] 722baf69 SystemErr     R 
com.ibatis.dao.client.DaoException: Failed to update - id [acctupd] - 
parameterObject [{input1=S12345}].  Cause: 
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in 
com/jpmc/fcg/framework/daoxml/sqlmappingxml/accountupdatesqlmap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the acctupd.  
--- Check the parameter mapping for the 'input1' property.  
--- Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in 
com/jpmc/fcg/framework/daoxml/sqlmappingxml/accountupdatesqlmap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the acctupd.  
--- Check the parameter mapping for the 'input1' property.  
--- Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to