Развертывание функций Karaf 4.1.x - PullRequest
0 голосов
/ 17 сентября 2018

Какая-то странная проблема. Запустите чистый дистрибутив Karaf 4.1.6 с официального сайта, без каких-либо дополнений. Сделать простой проектный комплект из karaf " karaf-blueprint-archetype "

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"               xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ">

            <bean id="serviceBean" class="com.itprofix.simple.MyServiceImpl"/>
            <service ref="serviceBean" interface="com.itprofix.simple.MyService"/>
</blueprint>

сделай банку и сделай простой test-feature.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features name="test-features-pack" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
    <feature name="feature-a" version="1.0" description="test A" install="auto">
            <bundle start="true" start-level="82">file:base/simple-bundle-1.0-SNAPSHOT.jar</bundle>
    </feature>
</features>

развертывание test-feature.xml. Все окей.

INFO  | fileinstall-C:\apache-karaf-4.1.6/deploy | fileinstall                      | 9 - org.apache.felix.fileinstall - 3.6.4 | Installing bundle test-features.xml / 0.0.0                                 
INFO  | fileinstall-C:\apache-karaf-4.1.6/deploy | fileinstall                      | 9 - org.apache.felix.fileinstall - 3.6.4 | Started bundle: feature:file:/C:/apache-karaf-4.1.6/deploy/test-features.xml
INFO  | FelixDispatchQueue | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | Adding features: feature-a/[1.0.0,1.0.0]                                                       
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | Changes to perform:                                                                           
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 |   Region: root                                                                                
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 |     Bundles to install:                                                                       
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 |       file:base/simple-bundle-1.0-SNAPSHOT.jar                                                
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | Installing bundles:                                                                           
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 |   file:base/simple-bundle-1.0-SNAPSHOT.jar                                                    
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | Starting bundles:                                                                             
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 |   simple-bundle/1.0.0.SNAPSHOT                                                                
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | Done.                                                                                         

Перезагрузите Карафа, и он застрял во время загрузки.

INFO: Lock acquired. Setting startlevel to 100
INFO  | FelixStartLevel  | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | The specified feature: 'feature-a' version '1.0.0' is already installed
INFO  | FelixStartLevel  | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | Adding features: feature-a/[1.0.0,1.0.0]                               
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | No deployment change.                                               
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 | Starting bundles:                                                   
INFO  | features-1-thread-1 | FeaturesServiceImpl              | 10 - org.apache.karaf.features.core - 4.1.6 |   org.apache.karaf.deployer.features/4.1.6                          

В чем может быть проблема?

...