karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Ganchev (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-4254) NPE when building karaf-assembly target with installAllFeaturesByDefault=false
Date Fri, 08 Jan 2016 12:33:40 GMT
Tony Ganchev created KARAF-4254:
-----------------------------------

             Summary: NPE when building karaf-assembly target with installAllFeaturesByDefault=false
                 Key: KARAF-4254
                 URL: https://issues.apache.org/jira/browse/KARAF-4254
             Project: Karaf
          Issue Type: Bug
          Components: karaf-tooling
    Affects Versions: 4.0.3, 4.0.2, 4.0.1, 4.0.0, 4.0.4
         Environment: Win7 64 bit; jdk 1.8.0_25

Tested with two maven versions:

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 18:22:22+0300)
Maven home: D:\java\apache-maven-3.1.1
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: D:\runtimes\jdk\win64\jdk1.8.0_25\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"


            Reporter: Tony Ganchev
             Fix For: 4.0.4


I have a karaf sample  project spanning multiple bundles that get combined into a single KAR.
The KAR is then packaged through a karaf-assembly module in a karaf distro.

The project can be found at: https://github.com/tonyganchev/blog/commit/807ed40c80b597d90ecb955b28ccf613b7e02bfd
(pointed to the revision that introduces the issue)

When setting installAllFeaturesByDefault to false I get the following exception (on 4.0.4-SNAPSHOT
in this case, but essentially the same on all 4.0.x versions)

[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.4-SNAPSHOT:assembly
(default-assembly) on project karaf-assembly: Unable to build assembly: NullPointerException
-> [Help 1]                                  
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.4-SNAPSHOT:assembly
(default-assembly) on project karaf-assembly: Unable to build assembly                   

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
                                                                                         
                                                        
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
                                                                                         
                                                        
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
                                                                                         
                                                        
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
                                                                                         
                               
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
                                                                                         
                                
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
                                                                                         
                  
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
                                                                                         
                                                
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)                
                                                                                         
                                                         
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)                
                                                                                         
                                                         
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)                  
                                                                                         
                                                         
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)                      
                                                                                         
                                                         
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)                       
                                                                                         
                                                         
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)                         
                                                                                         
                                                         
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                   
                                                                                         
                                                         
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
                                                                                         
                                                         
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                                                                         
                                                  
        at java.lang.reflect.Method.invoke(Method.java:483)                              
                                                                                         
                                                         
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
                                                                                         
                                                    
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)   
                                                                                         
                                                         
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
                                                                                         
                                                  
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)     
                                                                                         
                                                         
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to build assembly      
                                                                                         
                                                         
        at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:234)          
                                                                                         
                                                         
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
                                                                                         
                                      
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
                                                                                         
                                                        
        ... 20 more                                                                      
                                                                                         
                                                         
Caused by: java.lang.NullPointerException                                                
                                                                                         
                                                         
        at org.apache.karaf.features.internal.region.SubsystemResolver.collectPrerequisites(SubsystemResolver.java:175)
                                                                                         
                           
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:223) 
                                                                                         
                                                         
        at org.apache.karaf.profile.assembly.Builder.resolve(Builder.java:1214)          
                                                                                         
                                                         
        at org.apache.karaf.profile.assembly.Builder.startupStage(Builder.java:1002)     
                                                                                         
                                                         
        at org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:606)
                                                                                         
                                                         
        at org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:389)  
                                                                                         
                                                         
        at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:392)        
                                                                                         
                                                         
        at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:228)          
                                                                                         
                                                         
        ... 22 more                                                                      
                                                                                         
                                                         



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message