ArrayIndexOutOfBoundsException when creating view

"Klaudio Kaiser" <[email protected]>
Newsgroups gmane.comp.db.mckoi
Organization Active Group GmbH
Message-ID <[email protected]>
Hi,

while creating a view with mckoi (1.0.3 in Server-mode) i got an
ArrayIndexOutOfBoundsException.

SQL-Statement:

CREATE VIEW V_DATEN_DBA AS
	SELECT 	DA.SCHLUESSEL AS SCHLUESSEL,
			DA.BENUTZERGRUPPE AS BENUTZERGRUPPE,
			DA.USERNAME AS USERNAME,
			DB.KUNDE AS KUNDE,
			DB.STANDZEIT AS STANDZEIT,
			DB.EINSATZDAUER AS EINSATZDAUER,
			V.VERSION AS VERSION,
	FROM		DATEN_ALLG DA, DATEN_BEARB DB, VERSION V
	WHERE 	DA.SCHLUESSEL=DB.DATEN_ALLG_FK
	AND 		DA.SCHLUESSEL=V.REFNR
	AND 		DB.DATEN_ALLG_FK=V.REFNR;

I did the same with fully qualified table names as col-references with the
same result...

CREATE VIEW V_DATEN_DBA AS
	SELECT 	DATEN_ALLG.SCHLUESSEL AS SCHLUESSEL,
			DATEN_ALLG.BENUTZERGRUPPE AS BENUTZERGRUPPE,
			DATEN_ALLG.USERNAME AS USERNAME,
			DATEN_BEARB.KUNDE AS KUNDE,
			DATEN_BEARB.STANDZEIT AS STANDZEIT,
			DATEN_BEARB.EINSATZDAUER AS EINSATZDAUER,
			VERSION.VERSION AS VERSION,
	FROM		DATEN_ALLG, DATEN_BEARB, VERSION
	WHERE 	DATEN_ALLG.SCHLUESSEL=DATEN_BEARB.DATEN_ALLG_FK
	AND 		DATEN_ALLG.SCHLUESSEL=VERSION.REFNR
	AND 		DATEN_BEARB.DATEN_ALLG_FK=VERSION.REFNR;

Error:

% java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.get(ArrayList.java:326)
	at com.mckoi.database.DataTableDef.columnAt(DataTableDef.java:263)
	at com.mckoi.database.Table.getColumnDefAt(Table.java:244)
	at
com.mckoi.database.SubsetColumnTable.setColumnMap(SubsetColumnTable.java:102
)
	at
com.mckoi.database.QueryPlan$SubsetNode.evaluate(QueryPlan.java:975)
	at
com.mckoi.database.interpret.ViewManager.evaluate(ViewManager.java:178)
	at
com.mckoi.database.interpret.SQLQueryExecutor.execute(SQLQueryExecutor.java:
147)
	at
com.mckoi.database.jdbcserver.AbstractJDBCDatabaseInterface.execQuery(Abstra
ctJDBCDatabaseInterface.java:461)
	at
com.mckoi.database.jdbcserver.JDBCDatabaseInterface.execQuery(JDBCDatabaseIn
terface.java:251)
	at
com.mckoi.database.jdbcserver.JDBCProcessor.queryCommand(JDBCProcessor.java:
352)
	at
com.mckoi.database.jdbcserver.JDBCProcessor.processQuery(JDBCProcessor.java:
293)
	at
com.mckoi.database.jdbcserver.JDBCProcessor.processJDBCCommand(JDBCProcessor
.java:196)
	at
com.mckoi.database.jdbcserver.StreamJDBCServerConnection.processRequest(Stre
amJDBCServerConnection.java:137)
	at
com.mckoi.database.jdbcserver.MultiThreadedConnectionPoolServer$1.run(MultiT
hreadedConnectionPoolServer.java:171)
	at com.mckoi.database.WorkerThread.run(WorkerThread.java:123)

I debugged a little and it seems to be a bug in method setColumnMap(col_map,
new_column_names) in the QueryPlan-Class.
Is there a quick fix for this problem? I hope the view definition is ok.

Greetings
  Klaudio

Klaudio Kaiser
Active Group GmbH
Hornbergstraße 49
70794 Filderstadt
Tel +49 (711) 707094-77
Fax +49 (711) 707094-89
mailto:[email protected]
http://www.active-group.de


____________
Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.793 from 02.11.2004
Virus news: www.antiviruslab.com



---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.