8 Replies Latest reply on Mar 6, 2015 4:05 AM by grgrzybek

    Fabric error: "Cannot obtain service: org.osgi.service.url.URLStreamHandlerService(url.handler.protocol=profile)"

    kodiak22

      Hi,

       

      After successfully creating a new fabric (with fabric:create) and restarting the fuse container I get an exception (see later).

      Looking at the OSGI service registry the required ProfileUrlHandler service is definitely there.

       

      I've located a recent change in "io.fabric8.agent.service.Agent" that intends to fix bundle loading errors by wating 30 seconds for the ProfileUrlHandler service.

      The source comment:

      // FABRIC-790, FABRIC-981 - wait for ProfileUrlHandler before attempting to load bundles (in subsystem.resolve())

      // (which may be the case with bundle.xxx=blueprint:profile:xxx URLs in io.fabric8.agent PID)

       

      It seems that the fix doesn't work in this case. (Maybe 30 seconds is not enough to wait?)

       

      Can anybody help me solve this, or should I file an issue?

       

      thanks

      Peter

       

       

      Fuse version: 6.2.0.redhat-066 (early access)

      Java version: 1.7.0_60 (Oracle HotSpot JVM)

      Provision Exception:
      • java.lang.IllegalStateException: Cannot obtain service: org.osgi.service.url.URLStreamHandlerService(url.handler.protocol=profile)
      •   at io.fabric8.api.gravia.ServiceLocator.awaitService(ServiceLocator.java:125)
      •   at io.fabric8.agent.service.Agent.awaitService(Agent.java:350)
      •   at io.fabric8.agent.service.Agent.provision(Agent.java:333)
      •   at io.fabric8.agent.service.Agent.provision(Agent.java:190)
      •   at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:569)
      •   at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:216)
      •   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      •   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      •   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      •   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      •   at java.lang.Thread.run(Thread.java:745)