如何使用 OSGI 控制台在 wso2 中安装功能 [英] How to install features in wso2 using OSGI Console
问题描述
我是 wso2 的新手.我搜索了文章,发现我们可以使用 OSGI 控制台将功能安装到 carbon 中...例如,我想在 wso2 carbon 中安装学生管理功能(示例),而不使用功能管理(无用户界面).
如何做到这一点...我在本地有 REPO(比如 D://p2-repo)我想使用 OSGI 控制台在 carbon 中安装这些功能
尝试的步骤
1) 在 OSGI 控制台中启动 wso2 (bin\wso2server.bat -DosgiConsol
)2)然后我需要添加 Repo 对吗?3) 我试过 provaddrepo
命令
说provaddrepo file://D:/p2-repo
我的 p2-repo 结构是功能文件夹、插件文件夹、content.jar、artifact.jar
但是在执行此操作时,我收到如下错误
`osgi>provaddrepo 文件://C:/Users/473294nneh/Desktop/p2-repojava.io.FileNotFoundException: \\C\Users\473294nneh\Desktop\p2-repo\artifacts.xml(未找到网络路径)在 java.io.FileOutputStream.open(本机方法)在 java.io.FileOutputStream.(FileOutputStream.java:212)在 java.io.FileOutputStream.(FileOutputStream.java:165)在 org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:1187)在 org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:1168)在 org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.(SimpleArtifactRepository.java:348)在 org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory.create(SimpleArtifactRepositoryFactory.java:134)在 org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.factoryCreate(ArtifactRepositoryManager.java:61)在 org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.doCreateRepository(AbstractRepositoryManager.java:286)在 org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.createRepository(ArtifactRepositoryManager.java:49)在 org.eclipse.equinox.internal.p2.console.ProvisioningHelper.addArtifactRepository(ProvisioningHelper.java:87)在 org.eclipse.equinox.internal.p2.console.ProvCommandProvider._provaddrepo(ProvCommandProvider.java:83)在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在 java.lang.reflect.Method.invoke(Method.java:601)在 org.eclipse.equinox.console.command.adapter.CommandProviderAdapter.main(CommandProviderAdapter.java:46)在 org.eclipse.equinox.console.command.adapter.CommandProviderAdapter._main(CommandProviderAdapter.java:64)在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在 java.lang.reflect.Method.invoke(Method.java:601)在 org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)在 org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)在 org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)在 org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)在 org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)在 org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)在 org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)在 org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)在 org.apache.felix.gogo.shell.Console.run(Console.java:62)在 org.apache.felix.gogo.shell.Shell.console(Shell.java:203)在 org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在 java.lang.reflect.Method.invoke(Method.java:601)在 org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)在 org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)在 org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)在 org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)在 org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)在 org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)在 org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)在 org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)在 org.apache.felix.gogo.shell.Activator.run(Activator.java:75)在 java.lang.Thread.run(Thread.java:722)`
正如我所说,我是 wso2 的新手...>任何人都可以帮我解决这个问题...
我使用过这篇文章(http://wiki.eclipse.org/Equinox_p2_Console_Users_Guide)>
谁能帮我解决这个问题...提前致谢
我相信它可能只是 URI 中file:"之后的一个额外的正斜杠.
试试这个:
osgi>provaddrepo 文件:/C:/Users/473294nneh/Desktop/p2-repo
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
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
这篇关于如何使用 OSGI 控制台在 wso2 中安装功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!