简体   繁体   English

Apache Felix Web控制台

[英]Apache Felix Web Console

Trying to install Apache Felix Web Console at felix-4.6.1 . 尝试在felix-4.6.1上安装Apache Felix Web Console

I typed deploy -s "org.apache.felix.webconsole" 我输入了deploy -s "org.apache.felix.webconsole"

And what I get is: 我得到的是:

g! deploy -s "org.apache.felix.webconsole"  
Target resource(s):  
   Apache Felix Web Management Console (3.1.2)  
Required resource(s):  
   Apache Felix iPOJO (1.8.0)  
   Apache Felix HTTP Service Jetty (1.0.1)  
   Java Servlet API (3.1.0)  
Optional resource(s):  
   OSGi System Bundle (3.9.1.v20140110-1610) 
   osgi.cmpn (4.3.1.201210102024)  
   Java Persistence API 2.1 (2.1.0.v201304241213)  
   slf4j-api (1.7.10)  
   Equinox Util Bundle (1.0.500.v20130404-1337)  
   Apache Felix iPOJO WebConsole Plugins (1.6.0)  
   Apache Log4j API (2.2.0)  
   Declarative Services (1.4.101.v20130813-1853)  
   Apache Felix Log Service (1.0.0)  
   Apache Log4j SLF4J Binding (2.2.0) 

and the following exception ... 和以下异常...

Deploying... ERROR: Resolver: Start error - org.eclipse.osgi org.osgi.framework.BundleException: Activator start error in bundle org.eclipse.osgi [26].
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2273)  
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2141)  
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)  
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)  
        at org.apache.felix.bundlerepository.impl.ResolverImpl.deploy (ResolverImpl.java:661)  
        at org.apache.felix.gogo.command.OBR.deploy(OBR.java:395)  
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
        at java.lang.reflect.Method.invoke(Unknown Source)  
        at org.apache.felix.gogo.runtime.Reflective.invoke (Reflective.java:137)  
        at org.apache.felix.gogo.runtime.CommandProxy.execute (CommandProxy.java:82)  
        at org.apache.felix.gogo.runtime.Closure.executeCmd (Closure.java:477)  
        at org.apache.felix.gogo.runtime.Closure.executeStatement (Closure.java:403)  
        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:92)  
        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(Unknown Source)  
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
        at java.lang.reflect.Method.invoke(Unknown Source)  
        at org.apache.felix.gogo.runtime.Reflective.invoke (Reflective.java:137)  
        at org.apache.felix.gogo.runtime.CommandProxy.execute (CommandProxy.java:82)  
        at org.apache.felix.gogo.runtime.Closure.executeCmd (Closure.java:477)  
        at org.apache.felix.gogo.runtime.Closure.executeStatement (Closure.java:403)  
        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:92)  
        at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)  
        at java.lang.Thread.run(Unknown Source)   Caused by: java.lang.ClassCastException: org.eclipse.osgi.framework.internal.core.SystemBundleActivator cannot be cast to org.osgi.framework.BundleActivator
        at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4464)

        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2218)  
        ... 34 more

And my listed bundles are: 我列出的捆绑包是:

    g! lb 
    START LEVEL 1    
    ID|State      |Level|Name
     0|Active     |    0|System Bundle (4.6.1)
     1|Active     |    1|Apache Felix Bundle Repository (2.0.2)
     2|Active     |    1|Apache Felix File Install (3.4.2)
     3|Active     |    1|Apache Felix Gogo Command (0.14.0)
     4|Active     |    1|Apache Felix Gogo Runtime (0.12.1)
     5|Active     |    1|Apache Felix Gogo Shell (0.10.0)
     9|Installed  |    5|Apache Commons Exec (1.3.0)
    11|Resolved   |    5|Apache Felix Shell Service (1.4.2)
    26|Resolved   |    1|OSGi System Bundle (3.9.1.v20140110-1610)
    27|Active     |    1|osgi.cmpn (4.3.1.201210102024)
    28|Active     |    1|Java Persistence API 2.1 (2.1.0.v201304241213)
    29|Active     |    1|slf4j-api (1.7.10)
    30|Active     |    1|Equinox Util Bundle (1.0.500.v20130404-1337)
    31|Active     |    1|Apache Felix iPOJO  WebConsole Plugins (1.6.0)
    32|Active     |    1|Apache Log4j API (2.2.0)
    33|Active     |    1|Apache Felix iPOJO (1.8.0)
    34|Active     |    1|HTTP Service (1.0.1)
    35|Active     |    1|Apache Felix Web Management Console (3.1.2)
    36|Active     |    1|Declarative Services (1.4.101.v20130813-1853)
    37|Active     |    1|Apache Felix Log Service (1.0.0)
    38|Active     |    1|Apache Log4j SLF4J Binding (2.2.0)
    39|Active     |    1|Java Servlet API (3.1.0)

When I go to http://localhost:8080/system/console the page is loaded and I can see the web console. 当我转到http://localhost:8080/system/console ,页面已加载,并且可以看到Web控制台。 So why do I get the above exception? 那么为什么会出现上述异常? Should I worry about it? 我应该担心吗?

UPDATE UPDATE

I did a fresh install of the framework and now everything works fine without any exceptions. 我重新安装了该框架,现在一切正常,没有任何异常。 After running deploy -s "org.apache.felix.webconsole" I get: 运行deploy -s "org.apache.felix.webconsole"我得到:

Target resource(s): 
    Apache Felix Web Management Console (3.1.2)
Required resource(s):
    Apache Felix Configuration Admin Service (1.2.4)    
    Apache Felix Http Bundle (2.0.4)
    Apache Felix iPOJO (1.8.0)  
    Apache Felix HTTP Service Jetty (1.0.1)  
Optional resource(s):
    Apache Felix Declarative Services (1.6.0) 
    OSGi R4 Compendium Bundle (4.0.0)    
    Apache Felix iPOJO WebConsole Plugins (1.6.0)  
    Apache Felix Log Service (1.0.0)  
    Apache Felix Shell Service (1.4.2)  
    Deploying... 
    [INFO] Started bridged http service done.

This got me curious and I remembered that I had added my local Maven repository.xml as an OBR repository (at config.properties file) besides the default one. 这让我感到好奇,我想起除了默认目录外,还添加了本地Maven repository.xml作为OBR存储库(位于config.properties文件)。

So I went back to the old installation and run: g! list equi 所以我回到旧的安装并运行: g! list equi g! list equi and I got g! list equi ,我得到了

Common Eclipse Runtime (3.6.200.v20130402-1505)
Console plug-in (1.0.0.v20120430-1356) 
Declarative Services (1.4.101.v20130813-1853) 
Eclipse Preferences Mechanism (3.5.100.v20130422-1538) 
Equinox Application Container (1.3.100.v20130327-1442) 
Equinox Concurrent API (1.1.0.v20130327-1442) 
Equinox Framework Admin (2.0.100.v20130327-2119) 
Equinox Framework Admin for Equinox (1.0.500.v20130327-2119) 
Equinox Java Authentication and Authorization Service (JAAS) (1.2.0.v20130424-1801) 
Equinox Launcher (1.3.0.v20130327-1440) 
Equinox Launcher Linux X86 Fragment (1.1.200.v20140116-2212) 
Equinox Launcher Linux X86_64 Fragment (1.1.200.v20140116-2212) 
Equinox Launcher MacOSX Cocoa Fragment (1.1.200.v20140116-2212) 
Equinox Launcher Win32 X86 Fragment (1.1.200.v20140116-2212) 
Equinox Launcher Win32 X86_64 Fragment (1.1.200.v20140116-2212) 
Equinox Provisioning Artifact Repository Support (1.1.200.v20130515-2028) 
Equinox Provisioning Core (2.3.0.v20130327-2119) 
Equinox Provisioning Director (2.3.1.v20140221-1852) 
Equinox Provisioning Director Application (1.0.300.v20130819-1621) 
Equinox Provisioning ECF based Transport (1.1.0.v20130516-1858) 
Equinox Provisioning Eclipse Touchpoint (2.1.200.v20130327-2119) 
Equinox Provisioning Engine (2.3.0.v20130526-2122) 
Equinox Provisioning Garbage Collector (1.0.200.v20130327-2119) 
Equinox Provisioning JAR Processor (1.0.300.v20130327-2119) 
Equinox Provisioning Legacy Update Site Support (1.0.400.v20130515-2028) 
Equinox Provisioning Metadata (2.2.0.v20130523-1557)  
Equinox Provisioning Metadata Repository (1.2.100.v20130327-2119) 
Equinox Provisioning Native Touchpoint (1.1.100.v20130327-2119) 
Equinox Provisioning Publisher for Eclipse (1.1.200.v20130516-1953) 
Equinox Provisioning Publisher Infrastructure (1.3.0.v20140129-1405) 
Equinox Provisioning Repository (2.3.0.v20130412-2032) 
Equinox Provisioning Repository Tools (2.1.0.v20130327-2119) 
Equinox Util Bundle (1.0.500.v20130404-1337) 
Event Admin (1.3.0.v20130327-1442) 
Extension Registry Support (3.5.301.v20130717-1549) 
Extra JDK 6 packages required by Metro Web Services OSGi bundle (2.3.1.b419, ...) 
Simple Configurator (1.0.400.v20130327-2119) 
Simple Configurator Manipulator (2.0.0.v20130327-2119) 
Sisu Equinox Launching (Incubation) (0.20.0) 
Sisu Equinox Services API (Incubation) (0.20.0) 

When I removed the local Maven OBR everything worked fine. 当我删除本地Maven OBR时,一切正常。 So now the question could become: why don't the dependencies get resolved correctly in the first place? 所以现在的问题可能变成了:为什么首先不能正确解决依赖关系?

The error is caused by the org.eclipse.osgi "OSGi System Bundle", which kind of sounds like you are loading the Equinox OSGi framework inside Felix. 该错误是由org.eclipse.osgi “ OSGi System Bundle”引起的,听起来像是您正在Felix中加载Equinox OSGi框架。 If that is the case, you should just remove that bundle. 如果是这种情况,则应删除该捆绑包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM