Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsExcep

I get this error when I pass a string of sql query to JDBC to retrieve data..

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 5 >= 1

22

at java.util.Vector.elementAt(Vector.java:432)

23

at sportsapp2.SportsMDIApp2.showNextMatch(SportsMDIApp2.java:46)

24

25

at sportsapp2.SportsMDIApp2.<init>(SportsMDIApp2.java:35)

26

at sportsapp2.SportsMDIApp2$5.run(SportsMDIApp2.java:459)

27

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

28

29

30

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

31

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

Closing db connection

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

BUILD SUCCESSFUL (total time: 2 seconds)

=======================================

query = "selectmatch_idfrommatches";

but I DON'T get an error when I pass the following..

query = "select * from matches";

In other words, whenever I use specific names of the columns in the query I get an error and when I use astericks (*) I DONT get this error.

Please help

Message was edited by:

javafan9999

[1559 byte] By [javafan9999a] at [2007-11-27 2:51:47]
# 1
Never mind.. I got the solution..
javafan9999a at 2007-7-12 3:25:18 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0I am getting the same error ... I saw that you resolved this issue. Can you help me to resolve it too ..I am Using JList... and JTable.
Devil142a at 2007-7-12 3:25:18 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...