Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 7th, 2006, 07:35 PM
Registered User
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Strange ArrayIndexOutOfBoundsException ISsue


In our application we are facing one strange problem. We are using j2ee struts framework.

As part of struts, the flow is: Action layer calls -->BD-->EJB--->DAO--->Database....

I will try to explain the problem in brief. There is one hyperlink on one of the jsp page. Corresponsing Action calls a stored procedure on click on that hyperlink. Sometime, when we click on that hyperlink we are getting below mentioned exception. This is not happening always.

ea4a9a71 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "getDetails" on bean "BeanId(GFE#GFEEJBAP.jar#MyEJB, null)". Exception data: java.lang.ArrayIndexOutOfBoundsException
    at com.ibm.as400.access.JDServerRow.setRowIndex(JDSer verRow.java:271)
    at com.ibm.as400.access.AS400JDBCPreparedStatement.co mmonExecuteAfter(AS400JDBCPreparedStatement.java:4 67)
    at com.ibm.as400.access.AS400JDBCStatement.commonExec ute(AS400JDBCStatement.java:978)
    at com.ibm.as400.access.AS400JDBCPreparedStatement.ex ecute(AS400JDBCPreparedStatement.java:780)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement. pmiExecute(WSJdbcPreparedStatement.java:584)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement. execute(WSJdbcPreparedStatement.java:386)
    at com.polo.gfe.apps.ap.aap.dao.MyDAO.getDetails(MyDA O.java:788)
    at com.polo.gfe.apps.ap.aap.ejb.servicebean.MyEJBBean .getDetails(MyEJBBean.java:351)

The DAO's code is:

        String strSqlQuery =

            CallableStatement stmtStoredProc =

            //Set aap id as input parameter
            stmtStoredProc.setInt(1, myFirstVO.getId());
            stmtStoredProc.registerOutParameter(2, java.sql.Types.VARCHAR);
            stmtStoredProc.registerOutParameter(3, java.sql.Types.INTEGER);
            stmtStoredProc.registerOutParameter(4, java.sql.Types.INTEGER);
            stmtStoredProc.registerOutParameter(5, java.sql.Types.DOUBLE, 2);
            stmtStoredProc.registerOutParameter(6, java.sql.Types.DOUBLE, 2);
            stmtStoredProc.registerOutParameter(7, java.sql.Types.INTEGER);
            stmtStoredProc.registerOutParameter(8, java.sql.Types.VARCHAR);
            stmtStoredProc.registerOutParameter(9, java.sql.Types.VARCHAR);
            stmtStoredProc.registerOutParameter(10, java.sql.Types.VARCHAR);
            //Execute stored procedure and process the result sets

----> Getting Error here-----> if (stmtStoredProc.execute()) {
                        objMyVO.setMyParamter1(stmtStoredProc.getDouble(4) );

It would be great if you give me some clue to resolve this issue. This issue is happening only in Production Environment. DEV and QA environments are working fine.

Technology used: Web sphere 5.1.0, DB2, AS/400, IBM Jdk 4.2

My Mail id is - Kapweb@yahoo.com

Similar Threads
Thread Thread Starter Forum Replies Last Post
Very Strange issue with a php form Tracysgoingnutsagain Beginning PHP 0 April 11th, 2008 04:44 PM
ArrayIndexOutOfBoundsException Lizane Java Basics 3 July 17th, 2007 01:25 AM
Strange Upload Issue Elenesski ASP.NET 1.0 and 1.1 Professional 2 April 8th, 2007 11:26 PM
java.lang.ArrayIndexOutOfBoundsException chiraagb Pro JSP 1 July 1st, 2006 07:21 PM
Really Strange... nooor83 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 7 May 7th, 2006 12:51 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.