You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2017/06/08 03:42:18 UTC
[jira] [Closed] (METAMODEL-233) Compile query creation gives
IndexOutOfBoundsException with v4.5.0
[ https://issues.apache.org/jira/browse/METAMODEL-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kasper Sørensen closed METAMODEL-233.
-------------------------------------
Resolution: Not A Problem
This was an issue in the application code that used MM.
> Compile query creation gives IndexOutOfBoundsException with v4.5.0
> ------------------------------------------------------------------
>
> Key: METAMODEL-233
> URL: https://issues.apache.org/jira/browse/METAMODEL-233
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 4.5.0
> Reporter: Ankit Kumar
>
> With the upgrade to Metamodel 4.5.0 we notice existing Junits fail in compile query creation with IndexOutOfBoundsException during query rewriting.
> NOTE: The dao's and the Junits work with Metamodel v4.4.1.
> {code}
> Stacktrace : -
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.479 sec <<< FAILURE! - in com.hi.cdi.test.DbTestUtilsTest
> com.hi.cdi.test.DbTestUtilsTest Time elapsed: 0.479 sec <<< ERROR!
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RawSourceDataDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.hi.cdi.datastore.SourceDataDao com.hi.cdi.rawdatastore.RawSourceDataDao.sourceDataDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SourceDataDao': Invocation of init method failed; nested exception is java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.ArrayList.rangeCheck(ArrayList.java:653)
> at java.util.ArrayList.get(ArrayList.java:429)
> at org.apache.metamodel.query.AbstractQueryClause.getItem(AbstractQueryClause.java:111)
> at org.apache.metamodel.query.SelectItem.clone(SelectItem.java:602)
> at org.apache.metamodel.query.Query.clone(Query.java:606)
> at org.apache.metamodel.jdbc.dialects.DefaultQueryRewriter.beforeRewrite(DefaultQueryRewriter.java:62)
> at org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter.rewriteQuery(AbstractQueryRewriter.java:74)
> at org.apache.metamodel.jdbc.dialects.LimitOffsetQueryRewriter.rewriteQuery(LimitOffsetQueryRewriter.java:52)
> at org.apache.metamodel.jdbc.JdbcCompiledQuery.<init>(JdbcCompiledQuery.java:51)
> at org.apache.metamodel.jdbc.JdbcDataContext.compileQuery(JdbcDataContext.java:306)
> at com.hi.cdi.datastore.SourceDataDao.getCompiledQueryToGetDistinctRecordTypesFromSourceData(SourceDataDao.java:1298)
> at com.hi.cdi.datastore.SourceDataDao.initSchemaObjects(SourceDataDao.java:131)
> at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)