如何使用OSGI Console在wso2中安装功能

时间:2014-03-31 04:50:21

标签: wso2 wso2esb wso2carbon

我是wso2的新手。我搜索过文章并发现,我们可以使用OSGI控制台将功能安装到碳...例如,我想在wso2碳中安装学生管理功能(样本),而不使用功能管理(无UI )。

如何做到这一点......我在当地有REPO(说D:// p2-repo)我想用OSGI控制台在碳中安装这些功能

尝试的步骤

1)在OSGI控制台(bin\wso2server.bat -DosgiConsol)中启动wso2 2)然后我需要添加Repo对吗? 3)我尝试了provaddrepo命令

provaddrepo file:// D:/ p2-repo

我的p2-repo结构是 功能文件夹,插件文件夹,content.jar,artifact.jar

但在这样做时,我收到的错误如下

`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)`

正如我所说,我是wso2的新手..&gt;任何人都可以帮我解决这个问题......

我使用过这篇文章(http://wiki.eclipse.org/Equinox_p2_Console_Users_Guide

任何人都可以帮我解决这个问题......在此先感谢

1 个答案:

答案 0 :(得分:0)

我相信在&#34;文件之后,它可能只是你的URI中的额外正斜杠:&#34;。

试试这个:

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