I've debugged more in detail and I found the following:

In JDBCStoreQuery.executeQuery
   -base and metas both contain
be.minfin.fgov.jpa.proto3.entity.VATRResponse
   -params contains [1].

In SelectConstructor.evaluate
   -parameterTypes.data contains [null, null, null, null, null, null,
msgId=class java.lang.Long, null]
   -sel contains SELECT  FROM VATRResponse t0 INNER JOIN VATRMessage t1 ON
t0.message = t1.id

In EqualExpression(CompareEqualExpression).appendTo
   -ctx.params contains [1]

In Param.calculateValue
   -other._actions contains contains
[0|be.minfin.fgov.jpa.proto3.entity.ViesResponse.message,
0|be.minfin.fgov.jpa.proto3.entity.IdentityObject.id]
   -other._candidate contains be.minfin.fgov.jpa.proto3.entity.VATRResponse
   -sel contains SELECT  FROM VATRResponse t0 INNER JOIN VATRMessage t1 ON
t0.message = t1.id
   -otherState.cols contains[]

In PCPath.getColumns
   -pstate.field contains be.minfin.fgov.jpa.proto3.entity.IdentityObject.id
   -pstate.cols contains []

The fact that pstate.cols contains [] causes the
ArrayIndexOutOfBoundsException, because in PCPath.appendTo, the following
code is executed: "Column col = getColumns(state)[index];" with index == 0.

[stacktrace]
PCPath.appendTo(Select, ExpContext, ExpState, SQLBuffer, int) line: 721 
EqualExpression.appendTo(Select, ExpContext, BinaryOpExpState, SQLBuffer,
boolean, boolean) line: 71      
EqualExpression(CompareEqualExpression).appendTo(Select, ExpContext,
ExpState, SQLBuffer) line: 98   
SelectConstructor.buildWhere(Select, ExpContext, ExpState, Expression) line:
240     
SelectConstructor.evaluate(ExpContext, Select, String, QueryExpressions,
QueryExpressionsState) line: 81 
JDBCStoreQuery.createWhereSelects(List, ClassMapping[], List, boolean,
BitSet, BitSet, ExpressionFactory[], QueryExpressions[],
QueryExpressionsState[], ExpContext, int) line: 339     
JDBCStoreQuery.executeQuery(StoreQuery$Executor, ClassMetaData,
ClassMetaData[], boolean, ExpressionFactory[], QueryExpressions[], Object[],
StoreQuery$Range) line: 179     
[/stacktrace]

-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/ArgumentException-when-using-generics-tp5073975p5112157.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to