It's all about the answers!

Ask a question

Error provisioning precondition extending AbstractScmService

Atul Kumar (1872329) | asked May 13 '14, 12:42 a.m.
edited May 16 '14, 1:18 a.m. by Sreerupa Sen (1.0k4)
Following is the Advisor code:
public class DeliverWhenReviewCompletedInTR extends AbstractScmService implements IOperationAdvisor {
    IRepositoryItemService itemService;  
    public void run(AdvisableOperation operation, IProcessConfigurationElement advisorConfiguration, IAdvisorInfoCollector collector, IProgressMonitor monitor)         throws TeamRepositoryException {
        Properties prop = new Properties();
        try {   
            prop.load(new FileInputStream(""));
        } catch (IOException ex) {
        Object operationData = operation.getOperationData();
        if (!(operationData instanceof DeliverOperationData)) {
        DeliverOperationData data = (DeliverOperationData) operationData;
        List<IChangeSetHandle> changeSetHandles = data.getChangeSetHandles();

        itemService = getService(IRepositoryItemService.class);
        RestClient client = new RestClient();
        Resource resource = client.resource(prop.getProperty("TeamReviewServerURL") + "/rtcArtifact");
        List<String> rtcArtifactUuids = new ArrayList<String>();
        for (IChangeSetHandle iChangeSetHandle : changeSetHandles) {
        MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl<String, String>();
        queryParams.put(, rtcArtifactUuids);
        ClientResponse response = resource.contentType("text/plain").accept("text/plain").get();
        //Handle response here...

Tried testing the precondition with different versions of JTS:

a. 4.0.3 :- the provision status shows "the bundle could not be resolved" for the precondition. Searched this on jazz forum to find a similar question ( This question also noted this : I have not faced such issue with RTC 3.x and RTC 4.0.1 but facing for RTC 4.0.3.

Also tried writing a simple HelloWorld kind-of precondition and delploying it on the same server. But this also resulted in the same error - bundle could not be resolved.

b. :- on this server, with the zip I found on the machine \\\e$, after deploying the precondition, requestResetting, and restarting the server, the CCM application becomes unavailable. Any references to CCM result in 404 error.

c. 4.0.4 :- installed 4.0.4 from the repository on machine  On starting the server, on the steps, deploying JTS and CCM applications, following exception is thrown, although the server starts
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.eclipse.equinox.weaving.aspectj.AspectJWeavingActivator.start(Unknown Source)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(
        at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(
        at org.eclipse.osgi.framework.eventmgr.EventManager$
Caused by: java.lang.NoClassDefFoundError: org.eclipse.equinox.service.weaving.IWeavingServiceFactory
        at org.eclipse.equinox.weaving.aspectj.AspectJWeavingStarter.start(Unknown Source)
        ... 19 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.equinox.service.weaving.IWeavingServiceFactory
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        ... 20 more
No JMX HTML Adapter available

Tried uninstalling and installing this server multiple times, but the same exception resulted. As the server started with this error, I provisioned my precondition and did requestReset. Now, on restarting the server, I again get the same exception and the CCM application becomes unavailable, and all the URLs related to CCM result in HTTP 404.

Accepted answer

permanent link
Ralph Schoon (63.1k33646) | answered May 13 '14, 2:37 a.m.
There are far too many cases that could cause your problem. If your deployment is not right an it is wrong enough the CCM application would not start. Does your extension work with Jetty? If you did not try yet, please perform and also read .

Once your development environment is set up and your extension deploys in Jetty, we might be able to help get it deployed on other Appservers. All you can really do wrong then is missing libraries, packaging, *.ini files.

Atul Kumar selected this answer as the correct answer

Atul Kumar commented May 15 '14, 8:26 a.m.

Haven't tried the extension on Jetty. Tried provisioning on the default server (tomcat) that comes with JTS.

Ralph Schoon commented May 15 '14, 8:34 a.m.

My experience is that it is a lot of wasted time to try to deploy an extensions without trying it out on Jetty first. The effort of following the Extensions Workshop and setting up a proper environment with Jetty and Tomcat for debugging and using it as described there saves 5 times more time than it costs.

2 other answers

permanent link
Olivier Thomann (111) | answered May 16 '14, 2:09 p.m.
You might want to go through this article .

It might help you to find out what is wrong with the deployment.


Atul Kumar commented May 20 '14, 2:31 a.m.

Hi Olivier,

Had gone through this article, but it provides only basic steps to provision a precondition.

Thanks for the pointer.

permanent link
Atul Kumar (1872329) | answered May 20 '14, 2:02 a.m.
Hi Ralph,
The plugin was missing a dependency on another project, which was not getting available on the classpath at server. The provisionStatus didn't provide any stacktraces, so it became difficult to figure that out. So, started with your advisor (, and added my logic step-by-step to figure out the dependency issue.

The precondition is successfully provisioned now, and is working fine too!

Thanks a lot for your help.

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.