Re: [4.2.0.M1] - Assembly build failed with endorsed libraries

2017-11-06 Thread François Papon
Ok, I will remove this tag.

Thanks

Le 7 nov. 2017 00:17, Jean-Baptiste Onofré  a écrit :
>
> Hi, 
>
> As Karaf 4.2.x targets Java 9, we had to change some stuff. As endorsed 
> doesn't 
> exist anymore in Java 9,  tag should stay empty. 
>
> Regards 
> JB 
>
> On 11/06/2017 09:12 PM, Francois Papon wrote: 
> > Hi, 
> > 
> > I just change the Karaf version of my custom distribution from 4.1.2 to 
> > 4.2.0.M1 
> > and the maven build failed on the assembly. 
> > 
> > The endorsed librairies are found by the plugin in the local repository but 
> > not 
> > copy in the lib/endorsed target directory. 
> > 
> > Here the plugin declaration with  
> > 
> >               
> > org.apache.karaf.tooling 
> > karaf-maven-plugin 
> >                  ${karaf.version} 
> >                  true 
> >                   
> >                       
> >                          my-project 
> >                       
> >                       
> >                          wrapper 
> >                          wrap 
> > aries-blueprint 
> >                          shell 
> > shell-compat 
> >                          feature 
> >                          jaas 
> >                          ssh 
> >                          management 
> >                          bundle 
> >                          config 
> >                          deployer 
> >                          diagnostic 
> >                          instance 
> >                          kar 
> >                          log 
> >                          package 
> >                          service 
> >                          system 
> >                          eventadmin 
> >                          scr 
> > 
> >                          jdbc 
> >                          jndi 
> >                          jpa 
> >                          jms 
> >                          transaction 
> >                          eclipselink 
> >                          spring 
> >                          war 
> > 
> >                          cxf 
> >                          cxf-jaxrs 
> > cxf-rs-description-swagger2 
> > 
> >                          pax-jdbc 
> > pax-jdbc-config 
> > pax-jdbc-pool-hikaricp 
> > pax-jdbc-pool-aries 
> > pax-jdbc-postgresql 
> > 
> > activemq-client 
> >                          activemq-cf 
> >                          activemq 
> > activemq-camel 
> > 
> >                          camel 
> > camel-jackson 
> > camel-restlet 
> > camel-restlet-jackson 
> >                          camel-jms 
> > camel-servlet 
> > camel-swagger-java 
> > 
> >                           
> >                          cellar 
> >                       
> > *** 
> > **mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/${servicemix.specs.jaxrs.version};type:=endorsed;export:=true**
> >  
> > **mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/${servicemix.specs.json.version};type:=endorsed;export:=true**
> >  
> > **                    * 
> >                      1.8 
> >                   
> >               
> > 
> > 
> > [INFO] Downloading libraries 
> > [DEBUG] Resolved 
> > (org.apache.servicemix.specs:org.apache.servicemix.specs.jaxrs-api-2.1:jar:2.9.1)
> >  as 
> > /home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxrs-api-2.1/2.9.1/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
> >  
> > [INFO]    adding library: 
> > lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar 
> > [DEBUG] Resolved 
> > (org.apache.servicemix.specs:org.apache.servicemix.specs.json-api-1.1:jar:2.9.0)
> >  
> > as 
> > /home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.json-api-1.1/2.9.0/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
> >  
> > [INFO]    adding library: 
> > lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar 
> > ... 
> > [DEBUG] Connection manager is shutting down 
> > [DEBUG] Connection manager shut down 
> > [ERROR] Failed to execute goal 
> > org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly 
> > (default-assembly) 
> > on project moss-orchestrator-assembly: Unable to build assembly: Error: 
> > [ERROR] 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
> >  
> > [ERROR] 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
> >  
> > [ERROR] -> [Help 1] 
> > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> > goal 
> > org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly 
> > (default-assembly) 
> > on project moss-orchestrator-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 
> > 

Re: [4.2.0.M1] - Assembly build failed with endorsed libraries

2017-11-06 Thread Jean-Baptiste Onofré

Hi,

As Karaf 4.2.x targets Java 9, we had to change some stuff. As endorsed doesn't 
exist anymore in Java 9,  tag should stay empty.


Regards
JB

On 11/06/2017 09:12 PM, Francois Papon wrote:

Hi,

I just change the Karaf version of my custom distribution from 4.1.2 to 4.2.0.M1 
and the maven build failed on the assembly.


The endorsed librairies are found by the plugin in the local repository but not 
copy in the lib/endorsed target directory.


Here the plugin declaration with 

             
org.apache.karaf.tooling
karaf-maven-plugin
                 ${karaf.version}
                 true
                 
                     
                         my-project
                     
                     
                         wrapper
                         wrap
aries-blueprint
                         shell
shell-compat
                         feature
                         jaas
                         ssh
                         management
                         bundle
                         config
                         deployer
                         diagnostic
                         instance
                         kar
                         log
                         package
                         service
                         system
                         eventadmin
                         scr

                         jdbc
                         jndi
                         jpa
                         jms
                         transaction
                         eclipselink
                         spring
                         war

                         cxf
                         cxf-jaxrs
cxf-rs-description-swagger2

                         pax-jdbc
pax-jdbc-config
pax-jdbc-pool-hikaricp
pax-jdbc-pool-aries
pax-jdbc-postgresql

activemq-client
                         activemq-cf
                         activemq
activemq-camel

                         camel
camel-jackson
camel-restlet
camel-restlet-jackson
                         camel-jms
camel-servlet
camel-swagger-java

                         
                         cellar
                     
***
**mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/${servicemix.specs.jaxrs.version};type:=endorsed;export:=true**
**mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/${servicemix.specs.json.version};type:=endorsed;export:=true**
**                    *
                     1.8
                 
             


[INFO] Downloading libraries
[DEBUG] Resolved 
(org.apache.servicemix.specs:org.apache.servicemix.specs.jaxrs-api-2.1:jar:2.9.1) as 
/home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxrs-api-2.1/2.9.1/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
[INFO]    adding library: 
lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
[DEBUG] Resolved 
(org.apache.servicemix.specs:org.apache.servicemix.specs.json-api-1.1:jar:2.9.0) 
as 
/home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.json-api-1.1/2.9.0/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
[INFO]    adding library: 
lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar

...
[DEBUG] Connection manager is shutting down
[DEBUG] Connection manager shut down
[ERROR] Failed to execute goal 
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly (default-assembly) 
on project moss-orchestrator-assembly: Unable to build assembly: Error:
[ERROR] 
/home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
[ERROR] 
/home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar

[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly (default-assembly) 
on project moss-orchestrator-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 

[4.2.0.M1] - Assembly build failed with endorsed libraries

2017-11-06 Thread Francois Papon
Hi,

I just change the Karaf version of my custom distribution from 4.1.2 to
4.2.0.M1 and the maven build failed on the assembly.

The endorsed librairies are found by the plugin in the local repository
but not copy in the lib/endorsed target directory.

Here the plugin declaration with 

            
                org.apache.karaf.tooling
                karaf-maven-plugin
                ${karaf.version}
                true
                
                    
                        my-project
                    
                    
                        wrapper
                        wrap
                        aries-blueprint
                        shell
                        shell-compat
                        feature
                        jaas
                        ssh
                        management
                        bundle
                        config
                        deployer
                        diagnostic
                        instance
                        kar
                        log
                        package
                        service
                        system
                        eventadmin
                        scr

                        jdbc
                        jndi
                        jpa
                        jms
                        transaction
                        eclipselink
                        spring
                        war

                        cxf
                        cxf-jaxrs
                        cxf-rs-description-swagger2

                        pax-jdbc
                        pax-jdbc-config
                        pax-jdbc-pool-hikaricp
                        pax-jdbc-pool-aries
                        pax-jdbc-postgresql

                        activemq-client
                        activemq-cf
                        activemq
                        activemq-camel

                        camel
                        camel-jackson
                        camel-restlet
                        camel-restlet-jackson
                        camel-jms
                        camel-servlet
                        camel-swagger-java

                        
                        cellar
                    
                    ***
**                       
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/${servicemix.specs.jaxrs.version};type:=endorsed;export:=true**
**                       
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/${servicemix.specs.json.version};type:=endorsed;export:=true**
**                    *
                    1.8
                
            


[INFO] Downloading libraries
[DEBUG] Resolved
(org.apache.servicemix.specs:org.apache.servicemix.specs.jaxrs-api-2.1:jar:2.9.1)
as
/home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxrs-api-2.1/2.9.1/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
[INFO]    adding library:
lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
[DEBUG] Resolved
(org.apache.servicemix.specs:org.apache.servicemix.specs.json-api-1.1:jar:2.9.0)
as
/home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.json-api-1.1/2.9.0/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
[INFO]    adding library:
lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
...
[DEBUG] Connection manager is shutting down
[DEBUG] Connection manager shut down
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly
(default-assembly) on project moss-orchestrator-assembly: Unable to
build assembly: Error:
[ERROR]
/home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
[ERROR]
/home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly
(default-assembly) on project moss-orchestrator-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 

Re: version resolving

2017-11-06 Thread Michal Hlavac
hi Guillaume,

it starts with:
Caused by: 
shaded.org.eclipse.aether.resolution.VersionRangeResolutionException: No 
highest version found for 
org.ops4j.pax.cdi:pax-cdi-features:xml:features:[1.0.0.RC1,2)

but then it works!

thank you for your help... m.

On pondelok, 6. novembra 2017 14:26:28 CET Guillaume Nodet wrote:


In particular, change the etc/org.ops4j.pax.url.mvn.cfg with
  org.ops4j.pax.url.mvn.repositories= \
http://repo1.maven.org/maven2@id=central[1]


Also, remove your local ~/.m2/repository/org/ops4j/pax/cdi/pax-cdi-features


It should do the trick.


2017-11-06 14:12 GMT+01:00 Guillaume Nodet :


This is not really a bug imho, but there's no way to specify better the version 
range in maven.
In order to work around this behavior, you need to remove maven snapshot 
repositories containing pax-cdi.  This way, it should not be resolved.


2017-11-06 13:53 GMT+01:00 Michal Hlavac :


it means that there is bug in CXF, right?
 
Because I can't build offline karaf distribution with cxf-3.2.0
It searches for 1.0.0-SNAPSHOT on first start 
 
m.


Those version resolution are done by pax-url-aether which uses the aether 
library (the same one used by maven).
I think the behavior is correct, see
   
https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution[4]



2017-11-06 12:06 GMT+01:00 Michal Hlavac :


Hi,

I would like to ask about version resolving in repository element of feature 
file.I am asking because of line 21 in 
https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml[5]





Guillaume Nodet









-- 


Guillaume Nodet








Guillaume Nodet








[1] http://repo1.maven.org/maven2@id=central
[2] mailto:gno...@apache.org
[3] mailto:m...@hlavki.eu
[4] 
https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution
[5] 
https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml


Re: version resolving

2017-11-06 Thread Guillaume Nodet
In particular, change the etc/org.ops4j.pax.url.mvn.cfg with
  org.ops4j.pax.url.mvn.repositories= \
http://repo1.maven.org/maven2@id=central

Also, remove your local ~/.m2/repository/org/ops4j/pax/cdi/pax-cdi-features

It should do the trick.

2017-11-06 14:12 GMT+01:00 Guillaume Nodet :

> This is not really a bug imho, but there's no way to specify better the
> version range in maven.
> In order to work around this behavior, you need to remove maven snapshot
> repositories containing pax-cdi.  This way, it should not be resolved.
>
> 2017-11-06 13:53 GMT+01:00 Michal Hlavac :
>
>> it means that there is bug in CXF, right?
>>
>>
>>
>> Because I can't build offline karaf distribution with cxf-3.2.0
>>
>> It searches for 1.0.0-SNAPSHOT on first start
>>
>>
>>
>> m.
>>
>>
>> On pondelok, 6. novembra 2017 13:11:28 CET Guillaume Nodet wrote:
>>
>> Those version resolution are done by pax-url-aether which uses the aether
>> library (the same one used by maven).
>>
>> I think the behavior is correct, see
>>
>>https://cwiki.apache.org/confluence/display/MAVENOLD/Depend
>> ency+Mediation+and+Conflict+Resolution
>>
>>
>> 2017-11-06 12:06 GMT+01:00 Michal Hlavac :
>>
>> Hi,
>>
>> I would like to ask about version resolving in repository element of
>> feature file.
>> I am asking because of line 21 in https://github.com/apache/cxf/
>> blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml
>>
>> mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.RC
>> 1,2)/xml/features
>>
>> When I download karaf 4.1.3 and start it, then execute command:
>> feature:list | grep pax-cdi
>> output show version 1.0.0.RC2
>>
>> But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep
>> pax-cdi
>> it shows additional 1.0.0-SNAPSHOT
>>
>> I suspect that karaf cannot resolve RCx version sufix
>>
>> thanks, m.
>>
>>
>>
>>
>> --
>>
>> 
>> Guillaume Nodet
>>
>>
>>
>>
>
>
> --
> 
> Guillaume Nodet
>
>


-- 

Guillaume Nodet


Re: version resolving

2017-11-06 Thread Guillaume Nodet
This is not really a bug imho, but there's no way to specify better the
version range in maven.
In order to work around this behavior, you need to remove maven snapshot
repositories containing pax-cdi.  This way, it should not be resolved.

2017-11-06 13:53 GMT+01:00 Michal Hlavac :

> it means that there is bug in CXF, right?
>
>
>
> Because I can't build offline karaf distribution with cxf-3.2.0
>
> It searches for 1.0.0-SNAPSHOT on first start
>
>
>
> m.
>
>
> On pondelok, 6. novembra 2017 13:11:28 CET Guillaume Nodet wrote:
>
> Those version resolution are done by pax-url-aether which uses the aether
> library (the same one used by maven).
>
> I think the behavior is correct, see
>
>https://cwiki.apache.org/confluence/display/MAVENOLD/
> Dependency+Mediation+and+Conflict+Resolution
>
>
> 2017-11-06 12:06 GMT+01:00 Michal Hlavac :
>
> Hi,
>
> I would like to ask about version resolving in repository element of
> feature file.
> I am asking because of line 21 in https://github.com/apache/cxf/
> blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml
>
> mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.
> RC1,2)/xml/features
>
> When I download karaf 4.1.3 and start it, then execute command:
> feature:list | grep pax-cdi
> output show version 1.0.0.RC2
>
> But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep
> pax-cdi
> it shows additional 1.0.0-SNAPSHOT
>
> I suspect that karaf cannot resolve RCx version sufix
>
> thanks, m.
>
>
>
>
> --
>
> 
> Guillaume Nodet
>
>
>
>


-- 

Guillaume Nodet


Re: version resolving

2017-11-06 Thread Michal Hlavac
it means that there is bug in CXF, right?

Because I can't build offline karaf distribution with cxf-3.2.0
It searches for 1.0.0-SNAPSHOT on first start

m.

On pondelok, 6. novembra 2017 13:11:28 CET Guillaume Nodet wrote:


Those version resolution are done by pax-url-aether which uses the aether 
library (the same one used by maven).
I think the behavior is correct, see
   
https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution[1]



2017-11-06 12:06 GMT+01:00 Michal Hlavac :


Hi,

I would like to ask about version resolving in repository element of feature 
file.I am asking because of line 21 in 
https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml[3]





Guillaume Nodet








[1] 
https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution
[2] mailto:m...@hlavki.eu
[3] 
https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml


Re: version resolving

2017-11-06 Thread Guillaume Nodet
Those version resolution are done by pax-url-aether which uses the aether
library (the same one used by maven).
I think the behavior is correct, see

https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution

2017-11-06 12:06 GMT+01:00 Michal Hlavac :

> Hi,
>
> I would like to ask about version resolving in repository element of
> feature file.
> I am asking because of line 21 in https://github.com/apache/cxf/
> blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml
>
> mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.
> RC1,2)/xml/features
>
> When I download karaf 4.1.3 and start it, then execute command:
> feature:list | grep pax-cdi
> output show version 1.0.0.RC2
>
> But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep
> pax-cdi
> it shows additional 1.0.0-SNAPSHOT
>
> I suspect that karaf cannot resolve RCx version sufix
>
> thanks, m.
>
>


-- 

Guillaume Nodet


Fragment-Bundle to pax-logging not getting resolved

2017-11-06 Thread Eduard Vodicka
Hey guys,

i have stumbled upon some strage behaviour in the recent Karaf versions
(4.1.2 and 4.1.3). However, it was working in Karaf 4.1.1

What I am trying to accomplish:
I want to use a custom log42 Log Layout, so I am creating an extension
bundle for the pax-logging bundle. I created a sample project stripped down
of all logic to demonstrate my problem:
https://github.com/evodicka/pax-logging-test
This does nothing more than create a bundle, that is a fragment to
org.ops4j.pax.logging.pax-logging-log4j2
The observed behaviour is the same as in my real bundle.

The problem:
When I drop this bundle to Karaf's deploy folder, everything works as
expected. It gets resolved and is marked as a fragment bundle. When I now
restart Karaf, the bundle remains in state Installed. It works again when I
delete the bundle cache.
The logs show no indication that something went wrong when resolving the
bundle.

I tried creating a feature.xml with this bundle (also in the github
project). When I add this to the boot features of Karaf, it does not start
up and shows the following exception:

2017-11-06T11:43:57,683 | INFO  | features-1-thread-1 | FeaturesServiceImpl
 | 9 - org.apache.karaf.features.core - 4.1.3 |   null
2017-11-06T11:43:57,686 | ERROR | FelixStartLevel  | BootFeaturesInstaller
   | 9 - org.apache.karaf.features.core - 4.1.3 | Error installing
boot features
java.lang.IllegalStateException: Resource has no uri
at
org.apache.karaf.features.internal.service.Deployer.getBundleInputStream(Deployer.java:1457)
~[?:?]
at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:763)
~[?:?]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248)
~[?:?]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147)
~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]



The fragment mechanism seems to be working in general, because I can attach
this bundle as a fragment to one of my other bundles and it works without a
flaw.

Maybe you could point me in a direction where I am missing something
important?

Thanks and best Regards,
Eduard


version resolving

2017-11-06 Thread Michal Hlavac
Hi,

I would like to ask about version resolving in repository element of feature 
file.
I am asking because of line 21 in 
https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml

mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.RC1,2)/xml/features

When I download karaf 4.1.3 and start it, then execute command: feature:list | 
grep pax-cdi
output show version 1.0.0.RC2

But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep pax-cdi
it shows additional 1.0.0-SNAPSHOT

I suspect that karaf cannot resolve RCx version sufix

thanks, m.



Re: Karaf Bundle stuck in “Starting”-status when trying to install feature programmatically

2017-11-06 Thread Guillaume Nodet
I'm not exactly sure what happens, especially, the fact that you're saying
there's no log is weird.
If you are programmatically calling the FeaturesService, can you make sure
all exceptions caught from those calls are logged too ?
Because I don't think the service will log an exception before throwing it,
so the missing log statement could be in your plugin manager.

I suspect several things that could go wrong.  One of them being the fact
that the FeaturesService needs the repositories to be accessible using
their URIs, so you can't point the FeaturesService to a file:xxx location
and then remove that file.  You need to first remove the repository from
the FeaturesService.

Guillaume

2017-11-06 8:51 GMT+01:00 Marius Dienel :

> Hey Guys,
>
>
> we're having a problem with Karaf Version > 4.0.4. We are currently using
> 4.0.9, but are thinking of upgrading to 4.0.10 soon. In our application we
> have a lot of features. One of them installs a bundle (PluginManager),
> which itself adds, installs and starts one or multiple features on startup
> (plugins for our application). Users are able to install the plugins via
> the GUI and the files (.jar) won't get deleted after building
> karaf/assembly.
>
> For each of those features a feature repository is created, if there is
> not already one from earlier startups. Everything works fine, if there
> already is a feature repository, but after a new build, when the feature
> repository does not exist anymore the installation of the features does not
> work, which leads to the bundle (PluginManager) being stuck in
> "GracePeriod"-status, for versions 4.0.5,4.0.6,4.0.7 or in
> "Starting"-status for versions 4.0.8,4.0.9,4.0.10. Everything works as
> expected with version 4.0.4.
>
> The workflow to install the features/plugins is following:
>
> FeatureService.addRepository(featureUri) --> 
> FeatureService.getRepository(symbolicName)
> --> Repository.getFeatures() --> FeatureService.installFeatures(featureSet,
> options)
>
> After stepping over installFeatures in debug-mode the debugger is stuck
> and I cannot continue. The biggest problem is that there is no error or
> exception in karaf.log. Karaf is still starting correctly and everything
> except the plugins part is usable.
>
> Using 4.1.X is not an option right now, since there are dependency
> problems when upgrading.
>
> Thank you in advance for your help.
>
> Greetings Marius​
>
>
>
> -
> doubleSlash gehört zu "Deutschlands besten Arbeitgebern 2017"
> 
> --
> 
> -
>
> *Marius Dienel *Auszubildender
> doubleSlash Net-Business GmbH
> Otto-Lilienthal-Str. 2
> 
> D-88046 Friedrichshafen
>
> Fon: +49 7541 / 70078-211 <+49%207541%2070078211>
> Fax: +49 7541 / 70078-111 <+49%207541%2070078111>
> marius.die...@doubleslash.de
> https://doubleSlash.de
> --
> -
>
> doubleSlash Net-Business GmbH
> Geschäftsführung: Konrad Krafft, Andreas Strobel
> Sitz, Registergericht: Friedrichshafen, Amtsgericht Ulm HRB 631718
> 
> ---
>



-- 

Guillaume Nodet