It's all about the answers!

Ask a question

Attempting to get unset feature: InternalExpression


Andy Choi (2623) | asked Feb 23 '18, 12:32 a.m.

 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.

One answer



permanent link
Andy Choi (2623) | answered Feb 23 '18, 11:27 a.m.
edited Feb 23 '18, 11:30 a.m.

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.

Your answer


Register or 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.