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
_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to