BadLocationException when querying for work items using Java API
java.lang.NoClassDefFoundError: org.eclipse.jface.text.BadLocationException
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.verify(J9VMInternals.java:70)
at java.lang.J9VMInternals.verify(J9VMInternals.java:70)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at com.ibm.team.process.internal.common.util.AbstractProcess.computeConfigurationData(AbstractProcess.java:325)
at com.ibm.team.process.internal.common.util.AbstractProcess.getProjectConfigurationData(AbstractProcess.java:313)
at com.ibm.team.process.internal.common.util.AbstractProcess.getProjectConfigurationData(AbstractProcess.java:299)
at com.ibm.team.workitem.client.internal.AuditableClientProcess.findProcessConfiguration(AuditableClientProcess.java:68)
at com.ibm.team.workitem.common.internal.EnumerationManager$InternalEnumerations.resolve(EnumerationManager.java:52)
at com.ibm.team.workitem.common.internal.EnumerationManager.updateCache(EnumerationManager.java:198)
at com.ibm.team.workitem.common.internal.util.CacheHelper.internalCheckCache(CacheHelper.java:131)
at com.ibm.team.workitem.common.internal.util.CacheHelper.checkCache(CacheHelper.java:81)
at com.ibm.team.workitem.common.internal.util.CacheHelper.checkCache(CacheHelper.java:72)
at com.ibm.team.workitem.common.internal.EnumerationManager.internalResolve(EnumerationManager.java:173)
at com.ibm.team.workitem.common.internal.EnumerationManager.resolve(EnumerationManager.java:169)
at com.ibm.team.workitem.common.internal.WorkItemCommon.resolveEnumeration(WorkItemCommon.java:453)
at com.ibm.team.workitem.common.internal.model.EnumerationAttributeType.getNullValue(EnumerationAttributeType.java:41)
at com.ibm.team.workitem.common.internal.model.impl.AttributeImpl.getNullValue(AttributeImpl.java:875)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.ibm.team.repository.common.internal.util.ItemStore$ItemInvocationHandler.invoke(ItemStore.java:597)
at $Proxy16.getNullValue(Unknown Source)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.getNullValue(WorkItemQueryAttributeFactory.java:274)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.findNonLinkAttributes(WorkItemQueryAttributeFactory.java:238)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.updateCache(WorkItemQueryAttributeFactory.java:172)
at com.ibm.team.workitem.common.internal.util.CacheHelper.internalCheckCache(CacheHelper.java:131)
at com.ibm.team.workitem.common.internal.util.CacheHelper.checkCache(CacheHelper.java:81)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.findAttribute(WorkItemQueryAttributeFactory.java:137)
at com.nbn.ib2b.infra.scm.common.RTCWorkItemManager.printWorkItemTypes(RTCWorkItemManager.java:105)
at com.nbn.ib2b.infra.scm.SCMQueryWorkItems.executeQuery(SCMQueryWorkItems.java:73)
at com.nbn.ib2b.infra.scm.SCMQueryWorkItems.run(SCMQueryWorkItems.java:40)
at com.nbn.ib2b.infra.scm.common.RTCBase.execute(RTCBase.java:187)
at com.nbn.ib2b.infra.scm.test.SCMQueryWorkItemsTest.testExecute(SCMQueryWorkItemsTest.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jface.text.BadLocationException
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:77)
at java.net.URLClassLoader.findClass(URLClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
... 54 more
Getting above stack trace when running a simple snippet as gathered from other posts on forum (this bit is what's in 'printWorkItemTypes'):
IProjectArea projectArea = findProjectArea(projectAreaName);
IQueryableAttributeFactory attFactory = QueryableAttributes.getFactory(IWorkItem.ITEM_TYPE);
IQueryableAttribute workItemTypeAttribute = attFactory.findAttribute(projectArea, IWorkItem.TYPE_PROPERTY, auditableClient, null);
The projectArea and auditableClient values are valid, so I'm a bit stuck at the minute.
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.verify(J9VMInternals.java:70)
at java.lang.J9VMInternals.verify(J9VMInternals.java:70)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at com.ibm.team.process.internal.common.util.AbstractProcess.computeConfigurationData(AbstractProcess.java:325)
at com.ibm.team.process.internal.common.util.AbstractProcess.getProjectConfigurationData(AbstractProcess.java:313)
at com.ibm.team.process.internal.common.util.AbstractProcess.getProjectConfigurationData(AbstractProcess.java:299)
at com.ibm.team.workitem.client.internal.AuditableClientProcess.findProcessConfiguration(AuditableClientProcess.java:68)
at com.ibm.team.workitem.common.internal.EnumerationManager$InternalEnumerations.resolve(EnumerationManager.java:52)
at com.ibm.team.workitem.common.internal.EnumerationManager.updateCache(EnumerationManager.java:198)
at com.ibm.team.workitem.common.internal.util.CacheHelper.internalCheckCache(CacheHelper.java:131)
at com.ibm.team.workitem.common.internal.util.CacheHelper.checkCache(CacheHelper.java:81)
at com.ibm.team.workitem.common.internal.util.CacheHelper.checkCache(CacheHelper.java:72)
at com.ibm.team.workitem.common.internal.EnumerationManager.internalResolve(EnumerationManager.java:173)
at com.ibm.team.workitem.common.internal.EnumerationManager.resolve(EnumerationManager.java:169)
at com.ibm.team.workitem.common.internal.WorkItemCommon.resolveEnumeration(WorkItemCommon.java:453)
at com.ibm.team.workitem.common.internal.model.EnumerationAttributeType.getNullValue(EnumerationAttributeType.java:41)
at com.ibm.team.workitem.common.internal.model.impl.AttributeImpl.getNullValue(AttributeImpl.java:875)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.ibm.team.repository.common.internal.util.ItemStore$ItemInvocationHandler.invoke(ItemStore.java:597)
at $Proxy16.getNullValue(Unknown Source)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.getNullValue(WorkItemQueryAttributeFactory.java:274)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.findNonLinkAttributes(WorkItemQueryAttributeFactory.java:238)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.updateCache(WorkItemQueryAttributeFactory.java:172)
at com.ibm.team.workitem.common.internal.util.CacheHelper.internalCheckCache(CacheHelper.java:131)
at com.ibm.team.workitem.common.internal.util.CacheHelper.checkCache(CacheHelper.java:81)
at com.ibm.team.workitem.common.internal.expression.WorkItemQueryAttributeFactory.findAttribute(WorkItemQueryAttributeFactory.java:137)
at com.nbn.ib2b.infra.scm.common.RTCWorkItemManager.printWorkItemTypes(RTCWorkItemManager.java:105)
at com.nbn.ib2b.infra.scm.SCMQueryWorkItems.executeQuery(SCMQueryWorkItems.java:73)
at com.nbn.ib2b.infra.scm.SCMQueryWorkItems.run(SCMQueryWorkItems.java:40)
at com.nbn.ib2b.infra.scm.common.RTCBase.execute(RTCBase.java:187)
at com.nbn.ib2b.infra.scm.test.SCMQueryWorkItemsTest.testExecute(SCMQueryWorkItemsTest.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jface.text.BadLocationException
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:77)
at java.net.URLClassLoader.findClass(URLClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
... 54 more
Getting above stack trace when running a simple snippet as gathered from other posts on forum (this bit is what's in 'printWorkItemTypes'):
IProjectArea projectArea = findProjectArea(projectAreaName);
IQueryableAttributeFactory attFactory = QueryableAttributes.getFactory(IWorkItem.ITEM_TYPE);
IQueryableAttribute workItemTypeAttribute = attFactory.findAttribute(projectArea, IWorkItem.TYPE_PROPERTY, auditableClient, null);
The projectArea and auditableClient values are valid, so I'm a bit stuck at the minute.
2 answers
Ah, don't worry, had to figure out that I was missing "org.eclipse.text" JAR in my classpath as opposed to "org.eclipse.jface.text" ... it works now :)
On the same topic though, how do I find all "work item types"? My project has customized types I'm trying to find the IDs of, but the following does not print what I need?
for(IQueryableAttribute attribute: workItemTypeAttribute.getChildAttributes())
{
System.out.println("Work item type:" +attribute.getDisplayName());
workItemTypes.add(attribute.getDisplayName());
}
On the same topic though, how do I find all "work item types"? My project has customized types I'm trying to find the IDs of, but the following does not print what I need?
for(IQueryableAttribute attribute: workItemTypeAttribute.getChildAttributes())
{
System.out.println("Work item type:" +attribute.getDisplayName());
workItemTypes.add(attribute.getDisplayName());
}