Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Attempting to get unset feature: InternalExpression

 Hello,


I'm getting following exception when I call hasNext() on results I got from IQueryClient.getQueryResult()/getResolvedQueryResults().

Exception in thread "main" java.lang.IllegalStateException: Attempting to get unset feature: InternalExpression
at com.ibm.team.workitem.common.internal.query.impl.QueryDescriptorImpl.getInternalExpression(QueryDescriptorImpl.java:488)
at com.ibm.team.workitem.common.internal.query.impl.QueryDescriptorCustomImpl.getExpression(QueryDescriptorCustomImpl.java:41)
at com.ibm.team.workitem.common.internal.query.impl.QueryDescriptorCustomImpl.getResolvedExpression(QueryDescriptorCustomImpl.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.ibm.team.repository.common.internal.util.ItemStore$ItemInvocationHandler.invoke(ItemStore.java:597)
at com.sun.proxy.$Proxy19.getResolvedExpression(Unknown Source)
at com.ibm.team.workitem.common.internal.query.QueryResultIterator.fetchFirstPage(QueryResultIterator.java:147)
at com.ibm.team.workitem.common.internal.query.QueryResultIterator.update(QueryResultIterator.java:129)
at com.ibm.team.workitem.common.internal.query.QueryResultIterator.hasNext(QueryResultIterator.java:94)

Do I need to set the 'InternalExpression' feature to run the query successfully?
If so, how do I set the 'InternalExpression' feature?

Thank you.

0 votes



One answer

Permanent link

I was able to resolve the error by using IQueryDescriptor.FULL_PROFILE.

I initially tried following profile but received another error below.

IQueryDescriptor.SMALL_PROFILE.createExtension(Collections.singletonList(IQueryDescriptor.EXPRESSION_PROPERTY))

Exception in thread "main" java.lang.IllegalStateException: Attempting to get unset feature: SerializationVersion
at com.ibm.team.workitem.common.internal.query.impl.QueryDescriptorImpl.getSerializationVersion(QueryDescriptorImpl.java:537)
at com.ibm.team.workitem.common.internal.query.impl.QueryDescriptorCustomImpl.getExpression(QueryDescriptorCustomImpl.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.ibm.team.repository.common.internal.util.ItemStore$ItemInvocationHandler.invoke(ItemStore.java:597)

createExtension() failed when I added 'SerializationVersion' as below.

IQueryDescriptor.SMALL_PROFILE.createExtension(Arrays.asList(IQueryDescriptor.EXPRESSION_PROPERTY, "SerializationVersion"))

I tried to optimize the profile but ended up using IQueryDescriptor.FULL_PROFILE to successfully run the query.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,943

Question asked: Feb 23 '18, 12:32 a.m.

Question was seen: 1,455 times

Last updated: Feb 23 '18, 11:30 a.m.

Confirmation Cancel Confirm