Get NPE in FeatureDeploymentListener.bundleChanged()

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Get NPE in FeatureDeploymentListener.bundleChanged()

KARR, DAVID
I'm working with a team that is trying to upgrade a legacy service from Karaf 3.0.1 to 4.2.5.  When they try to deploy it, they're seeing the following:

---------------------------
2019-05-15T21:45:36,871 | INFO  | activator-1-thread-2 | Activator                        | 12 - org.apache.karaf.deployer.features - 4.2.5 | Deployment finished. Registering FeatureDeploymentListener
2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 | FeatureDeploymentListener        | 12 - org.apache.karaf.deployer.features - 4.2.5 | Unable to update deployed features for bundle: org.apache.felix.framework - 5.6.12
java.lang.NullPointerException: null
        at org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247) [12:org.apache.karaf.deployer.features:4.2.5]
        at org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95) [12:org.apache.karaf.deployer.features:4.2.5]
---------------------

About all I can tell from this is that the NPE occurs in the following "removeAll" call:
--------------------
            Map<String, Set<String>> requirements = featuresService.listRequirements();
            requirements.get(ROOT_REGION).removeAll(reqsToRemove);
            requirements.get(ROOT_REGION).addAll(reqsToAdd);
--------------------

What other information can we provide to help diagnose this?
Reply | Threaded
Open this post in threaded view
|

Re: Get NPE in FeatureDeploymentListener.bundleChanged()

jbonofre
Hi,

It seems that your feature is changing the OSGi framework state and ROOT
REGION.

Can you please share your features XML ?

That's probably a mistake in the req/cap of your features.

Regards
JB

On 21/05/2019 22:30, KARR, DAVID wrote:

> I'm working with a team that is trying to upgrade a legacy service from Karaf 3.0.1 to 4.2.5.  When they try to deploy it, they're seeing the following:
>
> ---------------------------
> 2019-05-15T21:45:36,871 | INFO  | activator-1-thread-2 | Activator                        | 12 - org.apache.karaf.deployer.features - 4.2.5 | Deployment finished. Registering FeatureDeploymentListener
> 2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 | FeatureDeploymentListener        | 12 - org.apache.karaf.deployer.features - 4.2.5 | Unable to update deployed features for bundle: org.apache.felix.framework - 5.6.12
> java.lang.NullPointerException: null
> at org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247) [12:org.apache.karaf.deployer.features:4.2.5]
> at org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95) [12:org.apache.karaf.deployer.features:4.2.5]
> ---------------------
>
> About all I can tell from this is that the NPE occurs in the following "removeAll" call:
> --------------------
>             Map<String, Set<String>> requirements = featuresService.listRequirements();
>             requirements.get(ROOT_REGION).removeAll(reqsToRemove);
>             requirements.get(ROOT_REGION).addAll(reqsToAdd);
> --------------------
>
> What other information can we provide to help diagnose this?
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

RE: Get NPE in FeatureDeploymentListener.bundleChanged()

KARR, DAVID
> -----Original Message-----
> From: Jean-Baptiste Onofré <[hidden email]>
> Sent: Tuesday, May 21, 2019 9:33 PM
> To: [hidden email]
> Subject: Re: Get NPE in FeatureDeploymentListener.bundleChanged()
>
> Hi,
>
> It seems that your feature is changing the OSGi framework state and ROOT
> REGION.
>
> Can you please share your features XML ?

I'm not really sure which of these are relevant, if any.  This may have a low SNR.
----------------------
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="onemap-service-${pom.version}">
    <repository>mvn:com.att.ecom.apis/event-dashboard-impl/1.1.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:org.apache.cxf.karaf/apache-cxf/2.7.11/xml/features</repository>
        <repository>mvn:com.att.ecom.apis/apis-base/1.1.0-SNAPSHOT/xml/features</repository>
         
    <feature name='onemap-impl' version='${pom.version}' resolver='(obr)'>
        <feature version="${pom.version}">onemap-api</feature>
        <feature version="1.1.0-SNAPSHOT">common-spring-jdbc</feature>
        <bundle>mvn:org.hibernate/hibernate-validator/4.2.0.Final</bundle>
        <bundle>mvn:com.att.ecom.apis/onemap-impl/${pom.version}</bundle>
        <configfile override="true" finalname="/etc/OneMapImpl.ApplicationProperties.cfg">mvn:com.att.ecom.apis/onemap-impl/${pom.version}/cfg/OneMapImpl.ApplicationProperties</configfile>
        <configfile override="true" finalname="/etc/OneMapImpl.BingMaps.cfg">mvn:com.att.ecom.apis/onemap-impl/${pom.version}/cfg/OneMapImpl.BingMaps</configfile>
        <configfile override="true" finalname="/etc/OneMapImpl.WaiCoverageProperties.cfg">mvn:com.att.ecom.apis/onemap-impl/${pom.version}/cfg/OneMapImpl.WaiCoverageProperties</configfile>
        <configfile override="true" finalname="/etc/OneMapImpl.CoverageCacheProperties.cfg">mvn:com.att.ecom.apis/onemap-impl/${pom.version}/cfg/OneMapImpl.CoverageCacheProperties</configfile>
    </feature>

    <feature name='onemap-api' version='${pom.version}' resolver='(obr)'>
         <feature version="1.1.0-SNAPSHOT">apis-base</feature>
         <bundle>mvn:javax.validation/com.springsource.javax.validation/1.0.0.GA</bundle>
         <bundle>mvn:com.att.ecom.apis/onemap-api/${pom.version}</bundle>
    </feature>

    <feature name='onemap-rest' version='${pom.version}' resolver='(obr)'>
        <feature version="1.1.0-SNAPSHOT">rest</feature>
        <feature version="1.1.0-SNAPSHOT">event-dashboard-impl</feature>
        <bundle>mvn:com.att.ecom.apis/onemap-rest/${pom.version}</bundle>
        <bundle>mvn:com.att.ecom.apis/rest-base/1.1.0-SNAPSHOT</bundle>
        <configfile override="true" finalname="/etc/OneMapRest.ApplicationProperties.cfg">mvn:com.att.ecom.apis/onemap-rest/${pom.version}/cfg/OneMapRest.ApplicationProperties</configfile>
    </feature>

    <feature name='onemap-service' version='${pom.version}' resolver='(obr)'>
        <feature version="${pom.version}">onemap-api</feature>
        <feature version="${pom.version}">onemap-impl</feature>
        <feature version="${pom.version}">onemap-rest</feature>
    </feature>
</features>
---------------------
---------------------
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="common-features-${pom.version}">
    <feature name='jackson' version='2.9.8' resolver='(obr)'>
        <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr339-api-m10/2.9.0</bundle>
        <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.9.8</bundle>
        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.9.8</bundle>
        <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.9.8</bundle>
        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.9.8</bundle>
        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.9.8</bundle>
        <bundle>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.9.8</bundle>
    </feature>

    <feature name='httpclient' version='3.1.7' resolver='(obr)'>
        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/3.1_7</bundle>
        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_5</bundle>
        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-io/1.4_3</bundle>
    </feature>

    <feature name='common' version='1.1.0-SNAPSHOT' resolver='(obr)'>
        <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
        <bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>
    </feature>

    <feature name='common-spring-jdbc' version='1.1.0-SNAPSHOT' resolver='(obr)'>
        <bundle>mvn:org.springframework/org.springframework.web/3.2.4.RELEASE</bundle>
        <bundle>mvn:org.springframework/org.springframework.jdbc/3.2.4.RELEASE</bundle>
        <bundle>mvn:org.springframework.ws/spring-xml/2.1.4.RELEASE</bundle>
    </feature>
   
    <feature name='quartz' version='2.3.1' resolver='(obr)'>
        <bundle>wrap:mvn:org.quartz-scheduler/quartz/2.3.1$Bundle-Name=quartz&amp;Bundle-SymbolicName=quartz&amp;Bundle-Version=2.3.1</bundle>
    </feature>
   
    <feature name='rest' version='1.1.0-SNAPSHOT' resolver='(obr)'>
        <feature version="1.1.0-SNAPSHOT">common</feature>
        <feature version="3.2.7">cxf</feature>
        <feature version="2.9.8">jackson</feature>
<!--         <feature version="3.1.7">httpclient</feature> -->
        <!-- By default cxf deploys with a "/cxf" context -->
        <config name="org.apache.cxf.osgi">
            org.apache.cxf.servlet.context=/*
        </config>
    </feature>
</features>
-----------------
-----------------
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="features-aggregate-1.1.55-SNAPSHOT">
    <repository>mvn:com.att.ecom.apis/onemap-impl/1.4.3-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/external-services-impl/1.1.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/cassandra-dao-impl/1.1.7-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/unlock-features/1.1.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/service-monitoring/1.1.1-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/eai-service-impl/1.1.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/gddn-service-impl/1.1.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/sli-service-impl/1.1.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/fraud-alert-impl/1.1.2-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.personalization/personalization/1.1.11-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/fan-profile-automation/1.1.5-SNAPSHOT/xml/features</repository>
    <repository>mvn:com.att.ecom.apis/email-service/1.1.0-SNAPSHOT/xml/features</repository>

    <feature name='full-deploy' version='1.1.55-SNAPSHOT' resolver='(obr)'>
        <bundle>mvn:org.jolokia/jolokia-osgi/1.6.1</bundle>
        <feature version="1.4.3-SNAPSHOT">onemap-service</feature>
        <feature version="1.1.0-SNAPSHOT">external-services</feature>
        <feature version="1.1.7-SNAPSHOT">cassandra-dao</feature>
        <feature version="1.0.0">unlock-features</feature>
        <feature version="1.1.1-SNAPSHOT">service-monitoring</feature>
        <feature version="1.1.0-SNAPSHOT">eai-service-impl</feature>
        <feature version="1.1.0-SNAPSHOT">gddn-service-impl</feature>
        <feature version="1.1.0-SNAPSHOT">sli-service-impl</feature>
        <feature version="1.1.2-SNAPSHOT">fraud-alert-impl</feature>
        <feature version="1.1.2-SNAPSHOT">fraud-alert-rest</feature>
        <feature version="1.1.11-SNAPSHOT">personalization-incub</feature>
        <feature version="1.1.5-SNAPSHOT">fan-profile-automation</feature>
        <feature version="1.1.0-SNAPSHOT">email-service</feature>
    </feature>
</features>
-------------------

>
> That's probably a mistake in the req/cap of your features.
>
> Regards
> JB
>
> On 21/05/2019 22:30, KARR, DAVID wrote:
> > I'm working with a team that is trying to upgrade a legacy service
> from Karaf 3.0.1 to 4.2.5.  When they try to deploy it, they're seeing
> the following:
> >
> > ---------------------------
> > 2019-05-15T21:45:36,871 | INFO  | activator-1-thread-2 | Activator
> | 12 - org.apache.karaf.deployer.features - 4.2.5 | Deployment finished.
> Registering FeatureDeploymentListener
> > 2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 |
> FeatureDeploymentListener        | 12 -
> org.apache.karaf.deployer.features - 4.2.5 | Unable to update deployed
> features for bundle: org.apache.felix.framework - 5.6.12
> > java.lang.NullPointerException: null
> > at
> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChang
> ed(FeatureDeploymentListener.java:247)
> [12:org.apache.karaf.deployer.features:4.2.5]
> > at
> org.apache.karaf.deployer.features.FeatureDeploymentListener.init(Featur
> eDeploymentListener.java:95)
> [12:org.apache.karaf.deployer.features:4.2.5]
> > ---------------------
> >
> > About all I can tell from this is that the NPE occurs in the following
> "removeAll" call:
> > --------------------
> >             Map<String, Set<String>> requirements =
> featuresService.listRequirements();
> >             requirements.get(ROOT_REGION).removeAll(reqsToRemove);
> >             requirements.get(ROOT_REGION).addAll(reqsToAdd);
> > --------------------
> >
> > What other information can we provide to help diagnose this?
> >
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__blog.nanthrax.net&d=DwIDaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=OsTemSXEn-
> xy2uk0vYF_EA&m=m6ewWooBze_AOnr9cYYeEr845FGlE47ie9Mrbc88c5o&s=Uo8gSSHyeX9
> Q98vu6H96PSxzgkNx0l7g3DnD0EzU4Ys&e=
> Talend - https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.talend.com&d=DwIDaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=OsTemSXEn-
> xy2uk0vYF_EA&m=m6ewWooBze_AOnr9cYYeEr845FGlE47ie9Mrbc88c5o&s=Nh3Cy079iHQ
> d_RxEaeDk3Shez0rOPh6H71aSa3iYHo8&e=
Reply | Threaded
Open this post in threaded view
|

Re: Get NPE in FeatureDeploymentListener.bundleChanged()

Bob Paulin
In reply to this post by KARR, DAVID
Hi,

I'm getting a similar error trying to run the standard feature as a
startup feature.  Everything seems to still startup fine but the logs
are noisy at the beginning.  Am I doing something wrong or unsupported:


My pom.xml


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.bobpaulin.karaf.startup</groupId>
    <artifactId>karaf-startup-standard</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>karaf-assembly</packaging>
    <name>Startup Standard Distribution</name>
   
    <properties>
        <karaf.version>4.2.8</karaf.version>
    </properties>
   
     <!-- Import Karaf POM to use the correct version of the Karaf
dependencies -->
    <dependencyManagement>
    <dependencies>
            <dependency>
                <groupId>org.apache.karaf</groupId>
                <artifactId>karaf</artifactId>
                <version>${karaf.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
        <!-- scope is compile so all features (there is only one) are
installed into startup.properties and the feature repo itself is not
added in etc/org.apache.karaf.features.cfg file -->
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${karaf.version}</version>
            <type>kar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <classifier>features</classifier>
            <version>${karaf.version}</version>
            <type>xml</type>
        </dependency>
       
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>enterprise</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>spring</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
        </dependency>
        <dependency>
        <!-- scope is runtime so the feature repo is listed in
etc/org.apache.karaf.features.cfg file, and features will installed into
the system directory -->
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <classifier>features</classifier>
            <version>${karaf.version}</version>
            <type>xml</type>
        </dependency>
    </dependencies>

    <build>
        <!-- if you want to include resources in the distribution -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/filtered-resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <!-- if you want to include resources in the distribution -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
                <executions>
                    <execution>
                        <id>process-resources</id>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- karaf-maven-plugin will call both assembly and archive
goals -->
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>${karaf.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <startupFeatures>
                        <startupFeature>standard</startupFeature>
                        <startupFeature>eventadmin</startupFeature>
                    </startupFeatures>
                    <useReferenceUrls>true</useReferenceUrls>
                    <javase>1.8</javase>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


Happy to provide a patch if just some null checking is needed.  Thanks!

 Bob


On 2019/05/21 20:30:28, "KARR, DAVID" <[hidden email]> wrote:
> I'm working with a team that is trying to upgrade a legacy service
from Karaf 3.0.1 to 4.2.5. When they try to deploy it, they're seeing
the following:>
>
> --------------------------->
> 2019-05-15T21:45:36,871 | INFO | activator-1-thread-2 | Activator | 12
- org.apache.karaf.deployer.features - 4.2.5 | Deployment finished.
Registering FeatureDeploymentListener>
> 2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 |
FeatureDeploymentListener | 12 - org.apache.karaf.deployer.features -
4.2.5 | Unable to update deployed features for bundle:
org.apache.felix.framework - 5.6.12>
> java.lang.NullPointerException: null>
> at
org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247)
[12:org.apache.karaf.deployer.features:4.2.5]>
> at
org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95)
[12:org.apache.karaf.deployer.features:4.2.5]>
> --------------------->
>
> About all I can tell from this is that the NPE occurs in the following
"removeAll" call:>
> -------------------->
> Map<String, Set<String>> requirements =
featuresService.listRequirements();>
> requirements.get(ROOT_REGION).removeAll(reqsToRemove);>
> requirements.get(ROOT_REGION).addAll(reqsToAdd);>
> -------------------->
>
> What other information can we provide to help diagnose this?>
>

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Get NPE in FeatureDeploymentListener.bundleChanged()

jbonofre
Hi Bob,

Thanks for sharing, I will try to reproduce and fix.

By the way, are you on Windows or Unix ?

I already have a question: why do you use reference URLs without static
distribution ?

Regards
JB

On 31/01/2020 04:45, Bob Paulin wrote:

> Hi,
>
> I'm getting a similar error trying to run the standard feature as a
> startup feature.  Everything seems to still startup fine but the logs
> are noisy at the beginning.  Am I doing something wrong or unsupported:
>
>
> My pom.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>
>     <groupId>com.bobpaulin.karaf.startup</groupId>
>     <artifactId>karaf-startup-standard</artifactId>
>     <version>0.0.1-SNAPSHOT</version>
>     <packaging>karaf-assembly</packaging>
>     <name>Startup Standard Distribution</name>
>    
>     <properties>
>         <karaf.version>4.2.8</karaf.version>
>     </properties>
>    
>      <!-- Import Karaf POM to use the correct version of the Karaf
> dependencies -->
>     <dependencyManagement>
>     <dependencies>
>             <dependency>
>                 <groupId>org.apache.karaf</groupId>
>                 <artifactId>karaf</artifactId>
>                 <version>${karaf.version}</version>
>                 <type>pom</type>
>                 <scope>import</scope>
>             </dependency>
>         </dependencies>
>     </dependencyManagement>
>
>     <dependencies>
>         <dependency>
>         <!-- scope is compile so all features (there is only one) are
> installed into startup.properties and the feature repo itself is not
> added in etc/org.apache.karaf.features.cfg file -->
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>framework</artifactId>
>             <version>${karaf.version}</version>
>             <type>kar</type>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>framework</artifactId>
>             <classifier>features</classifier>
>             <version>${karaf.version}</version>
>             <type>xml</type>
>         </dependency>
>        
>         <dependency>
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>enterprise</artifactId>
>             <classifier>features</classifier>
>             <type>xml</type>
>             <version>${karaf.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>spring</artifactId>
>             <version>${karaf.version}</version>
>             <classifier>features</classifier>
>             <type>xml</type>
>         </dependency>
>         <dependency>
>         <!-- scope is runtime so the feature repo is listed in
> etc/org.apache.karaf.features.cfg file, and features will installed into
> the system directory -->
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>standard</artifactId>
>             <classifier>features</classifier>
>             <version>${karaf.version}</version>
>             <type>xml</type>
>         </dependency>
>     </dependencies>
>
>     <build>
>         <!-- if you want to include resources in the distribution -->
>         <resources>
>             <resource>
>                 <directory>src/main/resources</directory>
>                 <filtering>false</filtering>
>                 <includes>
>                     <include>**/*</include>
>                 </includes>
>             </resource>
>             <resource>
>                 <directory>src/main/filtered-resources</directory>
>                 <filtering>true</filtering>
>                 <includes>
>                     <include>**/*</include>
>                 </includes>
>             </resource>
>         </resources>
>
>         <plugins>
>             <!-- if you want to include resources in the distribution -->
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-resources-plugin</artifactId>
>                 <version>3.0.2</version>
>                 <executions>
>                     <execution>
>                         <id>process-resources</id>
>                         <goals>
>                             <goal>resources</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>             <!-- karaf-maven-plugin will call both assembly and archive
> goals -->
>             <plugin>
>                 <groupId>org.apache.karaf.tooling</groupId>
>                 <artifactId>karaf-maven-plugin</artifactId>
>                 <version>${karaf.version}</version>
>                 <extensions>true</extensions>
>                 <configuration>
>                     <startupFeatures>
>                         <startupFeature>standard</startupFeature>
>                         <startupFeature>eventadmin</startupFeature>
>                     </startupFeatures>
>                     <useReferenceUrls>true</useReferenceUrls>
>                     <javase>1.8</javase>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
> </project>
>
>
> Happy to provide a patch if just some null checking is needed.  Thanks!
>
>  Bob
>
>
> On 2019/05/21 20:30:28, "KARR, DAVID" <[hidden email]> wrote:
>> I'm working with a team that is trying to upgrade a legacy service
> from Karaf 3.0.1 to 4.2.5. When they try to deploy it, they're seeing
> the following:>
>>
>> --------------------------->
>> 2019-05-15T21:45:36,871 | INFO | activator-1-thread-2 | Activator | 12
> - org.apache.karaf.deployer.features - 4.2.5 | Deployment finished.
> Registering FeatureDeploymentListener>
>> 2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 |
> FeatureDeploymentListener | 12 - org.apache.karaf.deployer.features -
> 4.2.5 | Unable to update deployed features for bundle:
> org.apache.felix.framework - 5.6.12>
>> java.lang.NullPointerException: null>
>> at
> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247)
> [12:org.apache.karaf.deployer.features:4.2.5]>
>> at
> org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95)
> [12:org.apache.karaf.deployer.features:4.2.5]>
>> --------------------->
>>
>> About all I can tell from this is that the NPE occurs in the following
> "removeAll" call:>
>> -------------------->
>> Map<String, Set<String>> requirements =
> featuresService.listRequirements();>
>> requirements.get(ROOT_REGION).removeAll(reqsToRemove);>
>> requirements.get(ROOT_REGION).addAll(reqsToAdd);>
>> -------------------->
>>
>> What other information can we provide to help diagnose this?>
>>
--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Get NPE in FeatureDeploymentListener.bundleChanged()

Bob Paulin-2
Hi JB,
Thanks for taking a look.  I used windows for my test.  Also the reference urls was a layover from playing around with static distributions so that can be removed.  For my particular usecase static was too static (needed to support config changes).  I've put all this into a JIRA https://issues.apache.org/jira/browse/KARAF-6612.  Let me know if I can provide any more information.  Thanks again.
- Bob

On 2020/01/31 04:21:09, Jean-Baptiste Onofré <[hidden email]> wrote:

> Hi Bob,
>
> Thanks for sharing, I will try to reproduce and fix.
>
> By the way, are you on Windows or Unix ?
>
> I already have a question: why do you use reference URLs without static
> distribution ?
>
> Regards
> JB
>
> On 31/01/2020 04:45, Bob Paulin wrote:
> > Hi,
> >
> > I'm getting a similar error trying to run the standard feature as a
> > startup feature.  Everything seems to still startup fine but the logs
> > are noisy at the beginning.  Am I doing something wrong or unsupported:
> >
> >
> > My pom.xml
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <project xmlns="http://maven.apache.org/POM/4.0.0"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/xsd/maven-4.0.0.xsd">
> >     <modelVersion>4.0.0</modelVersion>
> >
> >     <groupId>com.bobpaulin.karaf.startup</groupId>
> >     <artifactId>karaf-startup-standard</artifactId>
> >     <version>0.0.1-SNAPSHOT</version>
> >     <packaging>karaf-assembly</packaging>
> >     <name>Startup Standard Distribution</name>
> >    
> >     <properties>
> >         <karaf.version>4.2.8</karaf.version>
> >     </properties>
> >    
> >      <!-- Import Karaf POM to use the correct version of the Karaf
> > dependencies -->
> >     <dependencyManagement>
> >     <dependencies>
> >             <dependency>
> >                 <groupId>org.apache.karaf</groupId>
> >                 <artifactId>karaf</artifactId>
> >                 <version>${karaf.version}</version>
> >                 <type>pom</type>
> >                 <scope>import</scope>
> >             </dependency>
> >         </dependencies>
> >     </dependencyManagement>
> >
> >     <dependencies>
> >         <dependency>
> >         <!-- scope is compile so all features (there is only one) are
> > installed into startup.properties and the feature repo itself is not
> > added in etc/org.apache.karaf.features.cfg file -->
> >             <groupId>org.apache.karaf.features</groupId>
> >             <artifactId>framework</artifactId>
> >             <version>${karaf.version}</version>
> >             <type>kar</type>
> >         </dependency>
> >         <dependency>
> >             <groupId>org.apache.karaf.features</groupId>
> >             <artifactId>framework</artifactId>
> >             <classifier>features</classifier>
> >             <version>${karaf.version}</version>
> >             <type>xml</type>
> >         </dependency>
> >        
> >         <dependency>
> >             <groupId>org.apache.karaf.features</groupId>
> >             <artifactId>enterprise</artifactId>
> >             <classifier>features</classifier>
> >             <type>xml</type>
> >             <version>${karaf.version}</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>org.apache.karaf.features</groupId>
> >             <artifactId>spring</artifactId>
> >             <version>${karaf.version}</version>
> >             <classifier>features</classifier>
> >             <type>xml</type>
> >         </dependency>
> >         <dependency>
> >         <!-- scope is runtime so the feature repo is listed in
> > etc/org.apache.karaf.features.cfg file, and features will installed into
> > the system directory -->
> >             <groupId>org.apache.karaf.features</groupId>
> >             <artifactId>standard</artifactId>
> >             <classifier>features</classifier>
> >             <version>${karaf.version}</version>
> >             <type>xml</type>
> >         </dependency>
> >     </dependencies>
> >
> >     <build>
> >         <!-- if you want to include resources in the distribution -->
> >         <resources>
> >             <resource>
> >                 <directory>src/main/resources</directory>
> >                 <filtering>false</filtering>
> >                 <includes>
> >                     <include>**/*</include>
> >                 </includes>
> >             </resource>
> >             <resource>
> >                 <directory>src/main/filtered-resources</directory>
> >                 <filtering>true</filtering>
> >                 <includes>
> >                     <include>**/*</include>
> >                 </includes>
> >             </resource>
> >         </resources>
> >
> >         <plugins>
> >             <!-- if you want to include resources in the distribution -->
> >             <plugin>
> >                 <groupId>org.apache.maven.plugins</groupId>
> >                 <artifactId>maven-resources-plugin</artifactId>
> >                 <version>3.0.2</version>
> >                 <executions>
> >                     <execution>
> >                         <id>process-resources</id>
> >                         <goals>
> >                             <goal>resources</goal>
> >                         </goals>
> >                     </execution>
> >                 </executions>
> >             </plugin>
> >             <!-- karaf-maven-plugin will call both assembly and archive
> > goals -->
> >             <plugin>
> >                 <groupId>org.apache.karaf.tooling</groupId>
> >                 <artifactId>karaf-maven-plugin</artifactId>
> >                 <version>${karaf.version}</version>
> >                 <extensions>true</extensions>
> >                 <configuration>
> >                     <startupFeatures>
> >                         <startupFeature>standard</startupFeature>
> >                         <startupFeature>eventadmin</startupFeature>
> >                     </startupFeatures>
> >                     <useReferenceUrls>true</useReferenceUrls>
> >                     <javase>1.8</javase>
> >                 </configuration>
> >             </plugin>
> >         </plugins>
> >     </build>
> > </project>
> >
> >
> > Happy to provide a patch if just some null checking is needed.  Thanks!
> >
> >  Bob
> >
> >
> > On 2019/05/21 20:30:28, "KARR, DAVID" <[hidden email]> wrote:
> >> I'm working with a team that is trying to upgrade a legacy service
> > from Karaf 3.0.1 to 4.2.5. When they try to deploy it, they're seeing
> > the following:>
> >>
> >> --------------------------->
> >> 2019-05-15T21:45:36,871 | INFO | activator-1-thread-2 | Activator | 12
> > - org.apache.karaf.deployer.features - 4.2.5 | Deployment finished.
> > Registering FeatureDeploymentListener>
> >> 2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 |
> > FeatureDeploymentListener | 12 - org.apache.karaf.deployer.features -
> > 4.2.5 | Unable to update deployed features for bundle:
> > org.apache.felix.framework - 5.6.12>
> >> java.lang.NullPointerException: null>
> >> at
> > org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247)
> > [12:org.apache.karaf.deployer.features:4.2.5]>
> >> at
> > org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95)
> > [12:org.apache.karaf.deployer.features:4.2.5]>
> >> --------------------->
> >>
> >> About all I can tell from this is that the NPE occurs in the following
> > "removeAll" call:>
> >> -------------------->
> >> Map<String, Set<String>> requirements =
> > featuresService.listRequirements();>
> >> requirements.get(ROOT_REGION).removeAll(reqsToRemove);>
> >> requirements.get(ROOT_REGION).addAll(reqsToAdd);>
> >> -------------------->
> >>
> >> What other information can we provide to help diagnose this?>
> >>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Get NPE in FeatureDeploymentListener.bundleChanged()

jbonofre
Any chance to test on Unix ?

Regards
JB

On 31/01/2020 15:55, Bob Paulin wrote:

> Hi JB,
> Thanks for taking a look.  I used windows for my test.  Also the reference urls was a layover from playing around with static distributions so that can be removed.  For my particular usecase static was too static (needed to support config changes).  I've put all this into a JIRA https://issues.apache.org/jira/browse/KARAF-6612.  Let me know if I can provide any more information.  Thanks again.
> - Bob
>
> On 2020/01/31 04:21:09, Jean-Baptiste Onofré <[hidden email]> wrote:
>> Hi Bob,
>>
>> Thanks for sharing, I will try to reproduce and fix.
>>
>> By the way, are you on Windows or Unix ?
>>
>> I already have a question: why do you use reference URLs without static
>> distribution ?
>>
>> Regards
>> JB
>>
>> On 31/01/2020 04:45, Bob Paulin wrote:
>>> Hi,
>>>
>>> I'm getting a similar error trying to run the standard feature as a
>>> startup feature.  Everything seems to still startup fine but the logs
>>> are noisy at the beginning.  Am I doing something wrong or unsupported:
>>>
>>>
>>> My pom.xml
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>>>     <modelVersion>4.0.0</modelVersion>
>>>
>>>     <groupId>com.bobpaulin.karaf.startup</groupId>
>>>     <artifactId>karaf-startup-standard</artifactId>
>>>     <version>0.0.1-SNAPSHOT</version>
>>>     <packaging>karaf-assembly</packaging>
>>>     <name>Startup Standard Distribution</name>
>>>    
>>>     <properties>
>>>         <karaf.version>4.2.8</karaf.version>
>>>     </properties>
>>>    
>>>      <!-- Import Karaf POM to use the correct version of the Karaf
>>> dependencies -->
>>>     <dependencyManagement>
>>>     <dependencies>
>>>             <dependency>
>>>                 <groupId>org.apache.karaf</groupId>
>>>                 <artifactId>karaf</artifactId>
>>>                 <version>${karaf.version}</version>
>>>                 <type>pom</type>
>>>                 <scope>import</scope>
>>>             </dependency>
>>>         </dependencies>
>>>     </dependencyManagement>
>>>
>>>     <dependencies>
>>>         <dependency>
>>>         <!-- scope is compile so all features (there is only one) are
>>> installed into startup.properties and the feature repo itself is not
>>> added in etc/org.apache.karaf.features.cfg file -->
>>>             <groupId>org.apache.karaf.features</groupId>
>>>             <artifactId>framework</artifactId>
>>>             <version>${karaf.version}</version>
>>>             <type>kar</type>
>>>         </dependency>
>>>         <dependency>
>>>             <groupId>org.apache.karaf.features</groupId>
>>>             <artifactId>framework</artifactId>
>>>             <classifier>features</classifier>
>>>             <version>${karaf.version}</version>
>>>             <type>xml</type>
>>>         </dependency>
>>>        
>>>         <dependency>
>>>             <groupId>org.apache.karaf.features</groupId>
>>>             <artifactId>enterprise</artifactId>
>>>             <classifier>features</classifier>
>>>             <type>xml</type>
>>>             <version>${karaf.version}</version>
>>>         </dependency>
>>>         <dependency>
>>>             <groupId>org.apache.karaf.features</groupId>
>>>             <artifactId>spring</artifactId>
>>>             <version>${karaf.version}</version>
>>>             <classifier>features</classifier>
>>>             <type>xml</type>
>>>         </dependency>
>>>         <dependency>
>>>         <!-- scope is runtime so the feature repo is listed in
>>> etc/org.apache.karaf.features.cfg file, and features will installed into
>>> the system directory -->
>>>             <groupId>org.apache.karaf.features</groupId>
>>>             <artifactId>standard</artifactId>
>>>             <classifier>features</classifier>
>>>             <version>${karaf.version}</version>
>>>             <type>xml</type>
>>>         </dependency>
>>>     </dependencies>
>>>
>>>     <build>
>>>         <!-- if you want to include resources in the distribution -->
>>>         <resources>
>>>             <resource>
>>>                 <directory>src/main/resources</directory>
>>>                 <filtering>false</filtering>
>>>                 <includes>
>>>                     <include>**/*</include>
>>>                 </includes>
>>>             </resource>
>>>             <resource>
>>>                 <directory>src/main/filtered-resources</directory>
>>>                 <filtering>true</filtering>
>>>                 <includes>
>>>                     <include>**/*</include>
>>>                 </includes>
>>>             </resource>
>>>         </resources>
>>>
>>>         <plugins>
>>>             <!-- if you want to include resources in the distribution -->
>>>             <plugin>
>>>                 <groupId>org.apache.maven.plugins</groupId>
>>>                 <artifactId>maven-resources-plugin</artifactId>
>>>                 <version>3.0.2</version>
>>>                 <executions>
>>>                     <execution>
>>>                         <id>process-resources</id>
>>>                         <goals>
>>>                             <goal>resources</goal>
>>>                         </goals>
>>>                     </execution>
>>>                 </executions>
>>>             </plugin>
>>>             <!-- karaf-maven-plugin will call both assembly and archive
>>> goals -->
>>>             <plugin>
>>>                 <groupId>org.apache.karaf.tooling</groupId>
>>>                 <artifactId>karaf-maven-plugin</artifactId>
>>>                 <version>${karaf.version}</version>
>>>                 <extensions>true</extensions>
>>>                 <configuration>
>>>                     <startupFeatures>
>>>                         <startupFeature>standard</startupFeature>
>>>                         <startupFeature>eventadmin</startupFeature>
>>>                     </startupFeatures>
>>>                     <useReferenceUrls>true</useReferenceUrls>
>>>                     <javase>1.8</javase>
>>>                 </configuration>
>>>             </plugin>
>>>         </plugins>
>>>     </build>
>>> </project>
>>>
>>>
>>> Happy to provide a patch if just some null checking is needed.  Thanks!
>>>
>>>  Bob
>>>
>>>
>>> On 2019/05/21 20:30:28, "KARR, DAVID" <[hidden email]> wrote:
>>>> I'm working with a team that is trying to upgrade a legacy service
>>> from Karaf 3.0.1 to 4.2.5. When they try to deploy it, they're seeing
>>> the following:>
>>>>
>>>> --------------------------->
>>>> 2019-05-15T21:45:36,871 | INFO | activator-1-thread-2 | Activator | 12
>>> - org.apache.karaf.deployer.features - 4.2.5 | Deployment finished.
>>> Registering FeatureDeploymentListener>
>>>> 2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 |
>>> FeatureDeploymentListener | 12 - org.apache.karaf.deployer.features -
>>> 4.2.5 | Unable to update deployed features for bundle:
>>> org.apache.felix.framework - 5.6.12>
>>>> java.lang.NullPointerException: null>
>>>> at
>>> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247)
>>> [12:org.apache.karaf.deployer.features:4.2.5]>
>>>> at
>>> org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95)
>>> [12:org.apache.karaf.deployer.features:4.2.5]>
>>>> --------------------->
>>>>
>>>> About all I can tell from this is that the NPE occurs in the following
>>> "removeAll" call:>
>>>> -------------------->
>>>> Map<String, Set<String>> requirements =
>>> featuresService.listRequirements();>
>>>> requirements.get(ROOT_REGION).removeAll(reqsToRemove);>
>>>> requirements.get(ROOT_REGION).addAll(reqsToAdd);>
>>>> -------------------->
>>>>
>>>> What other information can we provide to help diagnose this?>
>>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Get NPE in FeatureDeploymentListener.bundleChanged()

Bob Paulin-2
Yes.  I just tried on Centos 7.7 the result was the same.
- Bob

On 2020/01/31 15:09:55, Jean-Baptiste Onofré <[hidden email]> wrote:

> Any chance to test on Unix ?
>
> Regards
> JB
>
> On 31/01/2020 15:55, Bob Paulin wrote:
> > Hi JB,
> > Thanks for taking a look.  I used windows for my test.  Also the reference urls was a layover from playing around with static distributions so that can be removed.  For my particular usecase static was too static (needed to support config changes).  I've put all this into a JIRA https://issues.apache.org/jira/browse/KARAF-6612.  Let me know if I can provide any more information.  Thanks again.
> > - Bob
> >
> > On 2020/01/31 04:21:09, Jean-Baptiste Onofré <[hidden email]> wrote:
> >> Hi Bob,
> >>
> >> Thanks for sharing, I will try to reproduce and fix.
> >>
> >> By the way, are you on Windows or Unix ?
> >>
> >> I already have a question: why do you use reference URLs without static
> >> distribution ?
> >>
> >> Regards
> >> JB
> >>
> >> On 31/01/2020 04:45, Bob Paulin wrote:
> >>> Hi,
> >>>
> >>> I'm getting a similar error trying to run the standard feature as a
> >>> startup feature.  Everything seems to still startup fine but the logs
> >>> are noisy at the beginning.  Am I doing something wrong or unsupported:
> >>>
> >>>
> >>> My pom.xml
> >>>
> >>>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>> <project xmlns="http://maven.apache.org/POM/4.0.0"
> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> >>> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> >>>     <modelVersion>4.0.0</modelVersion>
> >>>
> >>>     <groupId>com.bobpaulin.karaf.startup</groupId>
> >>>     <artifactId>karaf-startup-standard</artifactId>
> >>>     <version>0.0.1-SNAPSHOT</version>
> >>>     <packaging>karaf-assembly</packaging>
> >>>     <name>Startup Standard Distribution</name>
> >>>    
> >>>     <properties>
> >>>         <karaf.version>4.2.8</karaf.version>
> >>>     </properties>
> >>>    
> >>>      <!-- Import Karaf POM to use the correct version of the Karaf
> >>> dependencies -->
> >>>     <dependencyManagement>
> >>>     <dependencies>
> >>>             <dependency>
> >>>                 <groupId>org.apache.karaf</groupId>
> >>>                 <artifactId>karaf</artifactId>
> >>>                 <version>${karaf.version}</version>
> >>>                 <type>pom</type>
> >>>                 <scope>import</scope>
> >>>             </dependency>
> >>>         </dependencies>
> >>>     </dependencyManagement>
> >>>
> >>>     <dependencies>
> >>>         <dependency>
> >>>         <!-- scope is compile so all features (there is only one) are
> >>> installed into startup.properties and the feature repo itself is not
> >>> added in etc/org.apache.karaf.features.cfg file -->
> >>>             <groupId>org.apache.karaf.features</groupId>
> >>>             <artifactId>framework</artifactId>
> >>>             <version>${karaf.version}</version>
> >>>             <type>kar</type>
> >>>         </dependency>
> >>>         <dependency>
> >>>             <groupId>org.apache.karaf.features</groupId>
> >>>             <artifactId>framework</artifactId>
> >>>             <classifier>features</classifier>
> >>>             <version>${karaf.version}</version>
> >>>             <type>xml</type>
> >>>         </dependency>
> >>>        
> >>>         <dependency>
> >>>             <groupId>org.apache.karaf.features</groupId>
> >>>             <artifactId>enterprise</artifactId>
> >>>             <classifier>features</classifier>
> >>>             <type>xml</type>
> >>>             <version>${karaf.version}</version>
> >>>         </dependency>
> >>>         <dependency>
> >>>             <groupId>org.apache.karaf.features</groupId>
> >>>             <artifactId>spring</artifactId>
> >>>             <version>${karaf.version}</version>
> >>>             <classifier>features</classifier>
> >>>             <type>xml</type>
> >>>         </dependency>
> >>>         <dependency>
> >>>         <!-- scope is runtime so the feature repo is listed in
> >>> etc/org.apache.karaf.features.cfg file, and features will installed into
> >>> the system directory -->
> >>>             <groupId>org.apache.karaf.features</groupId>
> >>>             <artifactId>standard</artifactId>
> >>>             <classifier>features</classifier>
> >>>             <version>${karaf.version}</version>
> >>>             <type>xml</type>
> >>>         </dependency>
> >>>     </dependencies>
> >>>
> >>>     <build>
> >>>         <!-- if you want to include resources in the distribution -->
> >>>         <resources>
> >>>             <resource>
> >>>                 <directory>src/main/resources</directory>
> >>>                 <filtering>false</filtering>
> >>>                 <includes>
> >>>                     <include>**/*</include>
> >>>                 </includes>
> >>>             </resource>
> >>>             <resource>
> >>>                 <directory>src/main/filtered-resources</directory>
> >>>                 <filtering>true</filtering>
> >>>                 <includes>
> >>>                     <include>**/*</include>
> >>>                 </includes>
> >>>             </resource>
> >>>         </resources>
> >>>
> >>>         <plugins>
> >>>             <!-- if you want to include resources in the distribution -->
> >>>             <plugin>
> >>>                 <groupId>org.apache.maven.plugins</groupId>
> >>>                 <artifactId>maven-resources-plugin</artifactId>
> >>>                 <version>3.0.2</version>
> >>>                 <executions>
> >>>                     <execution>
> >>>                         <id>process-resources</id>
> >>>                         <goals>
> >>>                             <goal>resources</goal>
> >>>                         </goals>
> >>>                     </execution>
> >>>                 </executions>
> >>>             </plugin>
> >>>             <!-- karaf-maven-plugin will call both assembly and archive
> >>> goals -->
> >>>             <plugin>
> >>>                 <groupId>org.apache.karaf.tooling</groupId>
> >>>                 <artifactId>karaf-maven-plugin</artifactId>
> >>>                 <version>${karaf.version}</version>
> >>>                 <extensions>true</extensions>
> >>>                 <configuration>
> >>>                     <startupFeatures>
> >>>                         <startupFeature>standard</startupFeature>
> >>>                         <startupFeature>eventadmin</startupFeature>
> >>>                     </startupFeatures>
> >>>                     <useReferenceUrls>true</useReferenceUrls>
> >>>                     <javase>1.8</javase>
> >>>                 </configuration>
> >>>             </plugin>
> >>>         </plugins>
> >>>     </build>
> >>> </project>
> >>>
> >>>
> >>> Happy to provide a patch if just some null checking is needed.  Thanks!
> >>>
> >>>  Bob
> >>>
> >>>
> >>> On 2019/05/21 20:30:28, "KARR, DAVID" <[hidden email]> wrote:
> >>>> I'm working with a team that is trying to upgrade a legacy service
> >>> from Karaf 3.0.1 to 4.2.5. When they try to deploy it, they're seeing
> >>> the following:>
> >>>>
> >>>> --------------------------->
> >>>> 2019-05-15T21:45:36,871 | INFO | activator-1-thread-2 | Activator | 12
> >>> - org.apache.karaf.deployer.features - 4.2.5 | Deployment finished.
> >>> Registering FeatureDeploymentListener>
> >>>> 2019-05-15T21:45:36,885 | ERROR | activator-1-thread-2 |
> >>> FeatureDeploymentListener | 12 - org.apache.karaf.deployer.features -
> >>> 4.2.5 | Unable to update deployed features for bundle:
> >>> org.apache.felix.framework - 5.6.12>
> >>>> java.lang.NullPointerException: null>
> >>>> at
> >>> org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247)
> >>> [12:org.apache.karaf.deployer.features:4.2.5]>
> >>>> at
> >>> org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95)
> >>> [12:org.apache.karaf.deployer.features:4.2.5]>
> >>>> --------------------->
> >>>>
> >>>> About all I can tell from this is that the NPE occurs in the following
> >>> "removeAll" call:>
> >>>> -------------------->
> >>>> Map<String, Set<String>> requirements =
> >>> featuresService.listRequirements();>
> >>>> requirements.get(ROOT_REGION).removeAll(reqsToRemove);>
> >>>> requirements.get(ROOT_REGION).addAll(reqsToAdd);>
> >>>> -------------------->
> >>>>
> >>>> What other information can we provide to help diagnose this?>
> >>>>
> >>
> >> --
> >> Jean-Baptiste Onofré
> >> [hidden email]
> >> http://blog.nanthrax.net
> >> Talend - http://www.talend.com
> >>
> >>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>