How to install features in wso2 using OSGI Console

随声附和 提交于 2020-01-07 03:40:34

问题


I am new to wso2.. I have searched through articles and found that ,we can install features into carbon using OSGI Console... For eg,I want to install student management feature (Sample) in wso2 carbon,without using feature management(without UI) .

How to do this... I have the REPO in my local (Say D://p2-repo) I want to install these features in carbon using OSGI console

Steps Tried

1) Started wso2 in OSGI console (bin\wso2server.bat -DosgiConsol) 2) Then i need to add the Repo right? 3) i tried provaddrepo command

Say provaddrepo file://D:/p2-repo

My p2-repo structure is features folder,plugins folder,content.jar,artifact.jar

But while doing this, i am getting the error like below

`osgi> provaddrepo file://C:/Users/473294nneh/Desktop/p2-repo
    java.io.FileNotFoundException: \\C\Users\473294nneh\Desktop\p2-repo\artifacts.xml (The network path was not found)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
            at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:1187)
            at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:1168)
            at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.<init>(SimpleArtifactRepository.java:348)
            at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory.create(SimpleArtifactRepositoryFactory.java:134)
            at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.factoryCreate(ArtifactRepositoryManager.java:61)
            at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.doCreateRepository(AbstractRepositoryManager.java:286)
            at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.createRepository(ArtifactRepositoryManager.java:49)
            at org.eclipse.equinox.internal.p2.console.ProvisioningHelper.addArtifactRepository(ProvisioningHelper.java:87)
            at org.eclipse.equinox.internal.p2.console.ProvCommandProvider._provaddrepo(ProvCommandProvider.java:83)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.eclipse.equinox.console.command.adapter.CommandProviderAdapter.main(CommandProviderAdapter.java:46)
            at org.eclipse.equinox.console.command.adapter.CommandProviderAdapter._main(CommandProviderAdapter.java:64)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
            at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
            at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
            at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
            at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
            at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
            at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
            at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
            at org.apache.felix.gogo.shell.Console.run(Console.java:62)
            at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
            at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
            at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
            at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
            at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
            at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
            at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
            at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
            at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
            at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
            at java.lang.Thread.run(Thread.java:722)`

As i told,i am new to wso2..>CAN anyone please help me to resolve this issue...

I have used this article (http://wiki.eclipse.org/Equinox_p2_Console_Users_Guide)

CAN anyone please help me to resolve this issue...Thanks in Advance


回答1:


I believe that it may simply be an extra forward slash in your URI after "file:".

Try this:

osgi> provaddrepo file:/C:/Users/473294nneh/Desktop/p2-repo


来源:https://stackoverflow.com/questions/22753837/how-to-install-features-in-wso2-using-osgi-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!