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" <[email protected]> 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é
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to