Class cast exception with Fetch Spec

Santiago Conde <[email protected]>
Newsgroups gmane.comp.web.webobjects.eof
Message-ID <[email protected]>
Hello all

I'm getting a Class Cast Exception when trying to execute a fetch 
specification. The code is this:

//===== Code

EOQualifier qual = EOQualifier.qualifierWithQualifierFormat
( "clasificaciones contains %@", new NSArray
( matrizCl.objectAtIndex(0) ) );
EOFetchSpecification fsPrg = new EOFetchSpecification( "Pregunta", qual, 
null );
matrizParcial = ec.objectsWithFetchSpecification( fsPrg );

//===== End Code

This is the last version but I have tried with the 'like' and 'equal' 
operators, the EOToManyQualifier and EOKeyValueQualifier with no avail. 
The key 'clasificaciones' is a flattened relationship resultant of a 
many-to-many join.

The stack trace is this (only a few lines till my method call):

//===== Stack Trace
java.lang.ClassCastException: com.webobjects.foundation.NSArray
[2002-09-26 13:27:07 CEST] <WorkerThread6> java.lang.ClassCastException: 
com.webobjects.foundation.NSArray
	at 
com.webobjects.foundation.NSArray._mutableComponentsSeparatedByString
(NSArray.java:1107)
	at 
com.webobjects.eoaccess.EOSQLExpression.sqlStringForSchemaObjectName
(EOSQLExpression.java:1604)
	at 
com.webobjects.eoaccess.EOSQLExpression._aliasForRelatedAttributeRelationshipPath(
EOSQLExpression.java:233)
	at 
com.webobjects.eoaccess.EOSQLExpression.joinExpression(EOSQLExpression.java:
1000)
	at 
com.webobjects.eoaccess.EOSQLExpression.prepareSelectExpressionWithAttributes(
EOSQLExpression.java:882)
	at 
com.webobjects.jdbcadaptor.JDBCExpression.prepareSelectExpressionWithAttributes(
JDBCExpression.java:266)
	at 
com.webobjects.eoaccess.EOSQLExpressionFactory.selectStatementForAttributes(
EOSQLExpressionFactory.java:189)
	at 
com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java:191)
	at 
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(
EODatabaseChannel.java:886)
	at 
com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(
EODatabaseChannel.java:218)
	at 
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(
EODatabaseContext.java:3007)
	at 
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification
(EODatabaseContext.java:3148)
	at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(
EOObjectStoreCoordinator.java:452)
	at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification
(EOEditingContext.java:3347)
	at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification
(EOEditingContext.java:3668)
	at WICOPreguntas.buscarPreguntasFiltradas(WICOPreguntas.java:54)
......

//=======

I've searched through the archives for this exception but I didn't find 
anything. Perhaps I didn't look for the right words but, anyway, could 
anybody give me a hint?

I tried to debug the jdbc adaptor also, but setting the 
EOAdaptorDebugEnabled didn't give me any information. The exception is 
thrown before any log. Is there any other place where I could look up 
for debug information?

Thanks a lot. Santi.
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.