[JBoss JIRA] (ISPN-9865) Query is failing if custom classes are used inside of the cache
by Nistor Adrian (Jira)
[ https://issues.jboss.org/browse/ISPN-9865?page=com.atlassian.jira.plugin.... ]
Nistor Adrian commented on ISPN-9865:
-------------------------------------
By looking at the provide code I believe this is not really a bug (but did not test that to confirm); it may just be a case of forgetting to add the jar containing the user classes to the <modules> element under the <cache-container> in config. This is something introduced in 9.2 I believe. Read about the <modules> tag here: https://infinispan.org/docs/stable/user_guide/user_guide.html. The jar in question has to be added to the deployment dir of the server manually. I believe that can also be done with CLI also.
> Query is failing if custom classes are used inside of the cache
> ---------------------------------------------------------------
>
> Key: ISPN-9865
> URL: https://issues.jboss.org/browse/ISPN-9865
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying, WildFly modules
> Affects Versions: 9.4.5.Final
> Environment: Wildfly server with ISPN modules and ISPN subsystem to configure caches
> Reporter: Wolf-Dieter Fink
> Assignee: Nistor Adrian
> Priority: Major
> Attachments: install1-standalone-local.cli, install2-standalone-local.cli
>
>
> A simple query for a cache which contains User classes will fail for queries with the error below.
> UserData class for the cache:
> public class Test implements Serializable {
> private int testId;
> public Test(){}
> public Test(int myId) {this.testId = myId;}
> public int getTestId() {return animalId;}
> public void setTestId(int testId) { this.testId = testId;}
> }
> Simple EJB for test
> @Singleton
> @Startup
> public class TestInfinispanQuery4EAPConfig {
> @Resource(lookup = "java:jboss/datagrid-infinispan/container/jdg-container/cache/EAPcache")
> private Cache<String, Object> cache;
>
> @PostConstruct
> public void LoadDBToMemory() {
> cache.put("1", new Test(2, 0));
> cache.put("2", new Test(2, 0));
> cache.put("3", new Test(1, 0));
> QueryFactory queryFactory = Search.getQueryFactory(cache);
>
> Query q = queryFactory.from(Test.class).having("testId").eq(2).build();
>
> int size = q.getResultSize();
> System.out.println("result = " + size);
> }
> }
> Caused by: java.lang.IllegalStateException: ISPN028510: Unknown entity name org.infinispan.wfink.web.Test
> at org.infinispan.objectfilter.impl.syntax.parser.QueryResolverDelegateImpl.registerPersisterSpace(QueryResolverDelegateImpl.java:60)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.entityName(QueryResolver.java:6683)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.persisterSpaceRoot(QueryResolver.java:1302)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.persisterSpace(QueryResolver.java:1203)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.persisterSpaces(QueryResolver.java:1144)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.fromClause(QueryResolver.java:1060)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.selectFrom(QueryResolver.java:969)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.querySpec(QueryResolver.java:487)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.queryStatement(QueryResolver.java:388)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.queryStatementSet(QueryResolver.java:308)
> at org.infinispan.objectfilter.impl.ql.parse.QueryResolver.statement(QueryResolver.java:241)
> at org.infinispan.objectfilter.impl.ql.QueryParser.resolve(QueryParser.java:81)
> at org.infinispan.objectfilter.impl.ql.QueryParser.parseQuery(QueryParser.java:69)
> at org.infinispan.objectfilter.impl.syntax.parser.IckleParser.parse(IckleParser.java:19)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.lambda$parse$1(QueryEngine.java:695)
> at org.infinispan.query.dsl.embedded.impl.QueryCache.lambda$get$ab3121d1$1(QueryCache.java:73)
> at org.infinispan.compat.FunctionMapper.apply(FunctionMapper.java:40)
> at org.infinispan.commands.write.ComputeIfAbsentCommand.perform(ComputeIfAbsentCommand.java:104)
> at org.infinispan.interceptors.impl.CallInterceptor.visitCommand(CallInterceptor.java:29)
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:100)
> at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:672)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 8 months
[JBoss JIRA] (IPROTO-74) Allow repeatable fields to be written as a stream
by Nistor Adrian (Jira)
[ https://issues.jboss.org/browse/IPROTO-74?page=com.atlassian.jira.plugin.... ]
Nistor Adrian updated IPROTO-74:
--------------------------------
Fix Version/s: 4.3.0.Alpha10
(was: 4.3.0.Alpha9)
> Allow repeatable fields to be written as a stream
> -------------------------------------------------
>
> Key: IPROTO-74
> URL: https://issues.jboss.org/browse/IPROTO-74
> Project: Infinispan ProtoStream
> Issue Type: Enhancement
> Affects Versions: 4.2.0.Final
> Reporter: Ryan Emerson
> Assignee: Nistor Adrian
> Priority: Major
> Fix For: 4.3.0.Alpha10, 4.3.0.Final
>
>
> Currently in order to write to a repeatable field it is necessary for an entire array or collection to be serialized at once. When writing larger collections it would be better if each object could be written individually from a stream.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 8 months