473,416 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

I'm getting "Wrapped java.lang.ArrayIndexOutOfBoundsException: -1" on DB read

I work with an integration engine that is java based. All my scripting is javascripting and I've run into a problem that I can't find a solution to.

I am getting this error when I attempt to read from my database

Expand|Select|Wrap|Line Numbers
  1. Wrapped java.lang.ArrayIndexOutOfBoundsException: -1
  2.  
Here is the actual code (the "logger.error" lines tell Mirth to write the output to the dashboard)

Expand|Select|Wrap|Line Numbers
  1. if (rst.EOF == true) { blnExists = false; } else { blnExists = true; }
  2. 108:         //If Patient is in Temp Locate table and if TL account is an SDC account
  3. 109:         //Need to use a nested if to avoid an error if patient isn't in the database
  4.  
  5. 110:         logger.error("TEST AWARE ORU: blnExists = " + blnExists);
  6.  
  7. 111:         if (blnExists == true)        {
  8.  
  9. 112:             logger.error("TEST AWARE ORU : " + rst.getString('PtAcct'));
  10.  
  11. 113:             if (rst.getString("PtAcct").charAt(0) == "A") {
  12.  
  13. 114:                  msg['PID']['PID.18']['PID.18.1'].toString() == rst.getString('PtAcct');
  14.  
  15. 115:             }
  16.  
  17. 116:         }
  18. LINE NUMBER:    112
  19. DETAILS:    Wrapped java.lang.ArrayIndexOutOfBoundsException: -1
  20.  

Can anyone help? I've been working on this for a day and a half with no luck.
Sep 23 '10 #1
2 2766
Oralloy
988 Expert 512MB
This is just a guess, but it looks like your recordset has no records in it, or there is no 'PtAcct' field.
Sep 23 '10 #2
Dheeraj Joshi
1,123 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. rst.getString('PtAcct')
  2.  
You can't wrap more than one character in ' '. If it is string you must use " ".

Expand|Select|Wrap|Line Numbers
  1. rst.getString("PtAcct");
  2.  
Regards
Dheeraj Joshi
Sep 23 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: NathanK | last post by:
Hi Guys, im starting out in java and i'm getting the error: Exception in thread "main" java.lang.NoClassDefFoundError: blurf if i run "javac blurf.java", it compiles fine and without any...
1
by: CM | last post by:
Hi, when i want connect me in my BD with a JSP (with this simple code), this exception is throw. Thank's for ur help Mathieu CODE of my JSP ---------------------
6
by: ganesh.m | last post by:
Hi, I am new to DB2. I am getting this error while loading the DB2Driver. I don't have any idea about where i might have gone wrong. please help me. Below is the stack trace. Stack Trace:...
22
oll3i
by: oll3i | last post by:
i get Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 at Producent.main(producent.java:605) when i run it from bat @start "Supply Chain Management-Producer to...
6
by: Light | last post by:
Hi I m getting this error while i m trying to run my program and i don't understand why that happens. import java.util.*; public class Exercise6 {
1
by: shaikhussain | last post by:
public class EmployeeServicesTestCase { /** * @param args */ public static void main(String s)throws Exception { // TODO Auto-generated method stub BeanFactory beans=new...
1
by: phpuser123 | last post by:
Here are the codes I just compiled in java and I am getting a java.lang.ClassCastException ... import java.io.FileInputStream; import java.io.FileNotFoundException; import...
1
by: Buena Velasco | last post by:
I'm having trouble finding the error on my code. I know what "Exception thread ... ArrayIndexOutOfBounds... " means but I couldn't tell which part in the looping it is or in other. import...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.