Hi,

following is the reply we got from p2-dev:

"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."

AFAIK we too are using org.eclipse.ecf for p2 file transferring purposes
under the hood. If we look at the bundle states at carbon startup 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

We are retrieving all the p2 related services via the p2 Agent in carbon.
This p2 agent is created  via the IProvisioningAgentProvider service
offered by p2. As per the hint given by p2-dev guys, probably our agent
cannot see the ecf transport although it successfully loads the
IMetadataRepositoryManager  service via which the repository meta data is
retrieved.
Any idea on how to fix this issue with loading remote p2 repositories in
our feature manager?

Thanks,
Dileepa

On Tue, Mar 13, 2012 at 6:07 PM, Dileepa Jayakody <[email protected]> wrote:

> The related carbon Jira: https://wso2.org/jira/browse/CARBON-12612
>
>
> On Tue, Mar 13, 2012 at 6:03 PM, Dileepa Jayakody <[email protected]>wrote:
>
>> Hi All,
>>
>> Sent the same mail to p2-dev, waiting for a reply.
>>
>> Any help on this matter is much appreciated.
>>
>> Thanks,
>> Dileepa
>>
>>
>> ---------- Forwarded message ----------
>> From: Dileepa Jayakody <[email protected]>
>> Date: Mon, Mar 12, 2012 at 2:51 PM
>> Subject: error while loading a remote repository using
>> IMetadataRepositoryManager
>> To: [email protected]
>>
>>
>> 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
>>
>>
>
>
> --
> Dileepa Jayakody,
> Software Engineer, WSO2 Inc.
> Lean . Enterprise . Middleware
>
> Mobile : +94777-857616
>
>


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

Mobile : +94777-857616
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to