Hi Katya,

Thanks a lot for the hints :)
We too are using org.eclipse.ecf for p2 file transferring purposes (we are
not modifying anything under the hood, and simply rely on the default p2
transport). If we look at the bundle states at our product start-up all the
ecf related bundles are in Active state as below.

46    ACTIVE      org.eclipse.core.runtime_3.7.0.v20110110
47    ACTIVE      org.eclipse.ecf_3.1.300.v20110531-2218
48    ACTIVE      org.eclipse.ecf.filetransfer_5.0.0.v20110531-2218
49    ACTIVE      org.eclipse.ecf.identity_3.1.100.v20110531-2218
50    ACTIVE      org.eclipse.ecf.provider.filetransfer_3.2.0.v20110531-2218

So, I think the ecf transports are available to our p2 runtime at this
point.
We are retrieving all the p2 related services via a p2 Agent. This p2 agent
is created  via the IProvisioningAgentProvider service offered by p2. We
load the IMetadataRepositoryManager service from the p2 agent as below.
provisioningAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
This service is used to retrieve the repo metadata, and it only fails with
remote repos.

So, does this mean the above loaded IMetadataRepositoryManager service
cannot find the ecf transport when it tries to load a remote p2 repo? Is
there any tweaks I can do to explicitly enable ecf transport to above
service?

Thanks,
Dileepa



On Tue, Mar 13, 2012 at 9:30 PM, <[email protected]> wrote:

> Send p2-dev mailing list submissions to
>        [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://dev.eclipse.org/mailman/listinfo/p2-dev
> or, via email, send a message with subject or body 'help' to
>        [email protected]
>
> You can reach the person managing the list at
>        [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of p2-dev digest..."
>
>
> Today's Topics:
>
>   1. Re: error while loading a remote repository       using
>      IMetadataRepositoryManager (Todorova, Katya)
>   2. shared installs (Domenico Alessi)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 13 Mar 2012 11:38:20 +0100
> From: "Todorova, Katya" <[email protected]>
> To: P2 developer discussions <[email protected]>
> Subject: Re: [p2-dev] error while loading a remote repository   using
>        IMetadataRepositoryManager
> Message-ID:
>        <4c5e2cecd458d344ac75145bab4f11de0cf3b5b...@dewdfeccr05.wdf.sap.corp
> >
> Content-Type: text/plain; charset="us-ascii"
>
> Hi Dileepa,
>
> A quick look at the source shows two possible reasons for the exception
> below - either there's no transport available at your runtime or the agent
> which is doing the provisioning operation doesn't know about it.
> What kind of transport do you expect to be used for file transfer? (for
> example Eclipse uses ecf) You may also check whether the corresponding
> transport bundles (if available) are started.
>
> Hope this helps,
> Katya
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Dileepa Jayakody
> Sent: Monday, March 12, 2012 11:21 AM
> To: [email protected]
> Subject: [p2-dev] error while loading a remote repository using
> IMetadataRepositoryManager
>
> Hi Devs,
>
> We are using equinox p2 version:3.7 as the provisioning platform for our
> osgi based product.
> I have an issue with
> org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager when
> I try to load a p2 repository from a remote URI.
> The code works fine with local repos but throws a null-pointer
> @metadataRepositoryManager.loadRepository(location, new
> NullProgressMonitor()); when trying to load a remote repository.
> It seems p2 cannot load an indexFile from the given remote repo URI.
> I tested this with a sample p2 repo both as a local repo and a hosted
> remote repo. It works fine with the local repo but fails when it's given as
> a hosted remote repo :(
>
> Can you guys give me a hint what could be going wrong here?
> Any help on this matter is much appreciated.
>
> Following is the stack-trace;
>
> java.lang.NullPointerException
>    at
> org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadIndexFile(AbstractRepositoryManager.java:721)
>    at
> org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:640)
>    at
> org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
>    at
> org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
>    at
> org.wso2.carbon.feature.mgt.core.util.RepositoryUtils.addRepository(RepositoryUtils.java:80)
>    at
> org.wso2.carbon.feature.mgt.services.prov.RepositoryAdminService.addRepository(RepositoryAdminService.java:56)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
>    at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
>    at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>    at
> org.apache.axis2.receivers.AbstractMessageReceiver$AsyncMessageReceiverWorker.run(AbstractMessageReceiver.java:271)
>    at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>    at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>    at java.lang.Thread.run(Thread.java:662)
>
>
> Thanks,
> Dileepa
> --
> Dileepa Jayakody,
> Software Engineer, WSO2 Inc.
> Lean . Enterprise . Middleware
>
> Mobile : +94777-857616
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://dev.eclipse.org/mailman/private/p2-dev/attachments/20120313/6bfbdf16/attachment.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 13 Mar 2012 11:07:43 -0400
> From: Domenico Alessi <[email protected]>
> To: P2 developer discussions <[email protected]>
> Subject: [p2-dev] shared installs
> Message-ID:
>        <
> 0ed867eb33ab2b45aab470d5a64cdbf6191153c...@eusaacms0701.eamcs.ericsson.se>
>
> Content-Type: text/plain; charset="us-ascii"
>
> HI All,
>
> I have a question regarding shared installs. We have shared location for
> eclipse on the network.  We then have in the eclipse.ini -data and
> -configuration specified.
>
> We have the following scenario:
>
> 1.User starts eclipse and it will create the -data and -configuration
> folders automatically
> 2. the user installs some plugins
> 3. User exits eclipse
> 4. we update the shared location to have new plugins, therefore the p2
> profiles have changed on the shared side of the installation
> 5. The user starts eclipse.  From the Installed software and installation
> history tab, the user has his/her info and shows the user specific plugins,
> but they are not loaded.  We see that the user's features/plugins are not
> seen in the relevant tabs
> 6. If we then install anything else from the user's eclipse it then brings
> back all of the previous plugins and the new one and everything is working
> fine.
>
> So, my question is, instead of having my users install anything to be able
> to bring back their previous plugins, is there anyway via a runtime option
> to trigger p2 so that it does it automatically?
>
> Thanks in advance,
> Dom
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://dev.eclipse.org/mailman/private/p2-dev/attachments/20120313/f3a4a0c2/attachment.htm
> >
>
> ------------------------------
>
> _______________________________________________
> p2-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/p2-dev
>
>
> End of p2-dev Digest, Vol 45, Issue 10
> **************************************
>



-- 
Dileepa Jayakody,
Software Engineer, WSO2 Inc.
Lean . Enterprise . Middleware

Mobile : +94777-857616
_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to