Re: How to Define a Feature Configuration in Maven Project?

2015-06-20 Thread Jean-Baptiste Onofré

Hi Erwin,

for config/configfile, you have to create the features XML by hand.

Regards
JB

On 06/20/2015 11:50 PM, Erwin Hogeweg wrote:

Hi,

I would like to include something like this:


   myProperty = myValue


in a Maven generated feature.xml.

How/where do I specify that? The documentation here:
http://karaf.apache.org/manual/latest/developers-guide/karaf-maven-plugin-features-generate-descriptor.html
 doesn’t
seem to describe that.

Is there any other documentation on the karaf-maven-plugin?

As always, your help is greatly appreciated.


Kind Regards,

Erwin




--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Karaf Integration Testing

2015-06-20 Thread Stephen Kahmann
May be related to:

https://ops4j1.jira.com/browse/PAXURL-288




On 6/20/15, 6:23 PM, "Stephen Kahmann" 
wrote:

>JB,
>
>Thank you for your reply. Looks like the issue was in my pax-url-aether
>version. I upgraded from 2.3.0 to 2.4.1 and it looks like I get a little
>further. Now I am having an issue when Karaf starts:
>
>2015-06-20 18:18:54,166 | WARN  | FelixStartLevel  | FeaturesServiceImpl
>   | 20 - org.apache.karaf.features.core - 3.0.3 | Unable to add
>features repository mvn:org.ops4j.pax.exam/pax-exam-features/4.5.0/xml at
>startup
>java.io.IOException: Error resolving artifact
>org.ops4j.pax.exam:pax-exam-features:xml:4.5.0: Could not find artifact
>org.ops4j.pax.exam:pax-exam-features:xml:4.5.0
>   at 
>org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedReso
>l
>ver.java:487)
>   at 
>org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedReso
>l
>ver.java:433)
>   at 
>org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedReso
>l
>ver.java:411)
>   at 
>org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedReso
>l
>ver.java:386)
>   at 
>org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:1
>2
>4)
>   at 
>org.apache.karaf.features.internal.FeatureValidationUtil.load(FeatureValid
>a
>tionUtil.java:93)
>   at 
>org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureV
>a
>lidationUtil.java:58)
>   at 
>org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(
>F
>eaturesServiceImpl.java:162)
>...
>   at 
>org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevel
>I
>mpl.java:304)[org.apache.felix.framework-4.2.1.jar:]
>   at java.lang.Thread.run(Thread.java:745)[:1.8.0_40]
>2015-06-20 18:18:54,263 | ERROR | FelixStartLevel  | BootFeaturesInstaller
>   | 20 - org.apache.karaf.features.core - 3.0.3 | Error Boot
>feature exam not found
>__ __  
>   / //_/ __ _/ __/
>  / ,<  / __ `/ ___/ __ `/ /_
> / /| |/ /_/ / /  / /_/ / __/
>/_/ |_|\__,_/_/   \__,_/_/
>
>  Apache Karaf (3.0.3)
>
>Hit '' for a list of available commands
>and '[cmd] --help' for help on a specific command.
>Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
>
>karaf@root()>
>java.rmi.NotBoundException: 7fbbaa46-4dc1-4912-ae9b-da6b46ebf18f
>   at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:166)
>   at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
>   at 
> sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:410)
>   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:268)
>   at sun.rmi.transport.Transport$1.run(Transport.java:200)
>   at sun.rmi.transport.Transport$1.run(Transport.java:197)
>...
>   at 
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>6
>2)
>   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
>
>
>Process finished with exit code 255
>
>
>
>
>
>
>Thanks
>Stephen
>
>
>
>
>
>
>
>On 6/20/15, 2:49 PM, "Jean-Baptiste Onofré"  wrote:
>
>>Hi Stephen
>>
>>the org.apache.karaf.tooling.exam is now deprecated and only valid for
>>Karaf 2.3.x.
>>
>>If you use 2.4.x, 3.0.x (or 4.0.x), you can directly use pax-exam, which
>>provide now natively the Karaf container support.
>>
>>You can take a look on Karaf or Cellar itest for example.
>>
>>I will update the documentation.
>>
>>For your issue, it's weird, it looks like pax-logging doesn't come with
>>Karaf. Please use the Karaf itest for sample.
>>
>>Regards
>>JB
>>
>>On 06/20/2015 07:36 PM, Stephen Kahmann wrote:
>>> Hi,
>>>
>>> I am trying to write integration tests for Karaf and I am following
>>> 
>>>https://karaf.apache.org/manual/latest/developers-guide/writing-tests.ht
>>>m
>>>l.
>>> That page says to include:
>>>
>>> 
>>>org.apache.karaf.tooling.exam
>>>org.apache.karaf.tooling.exam.container
>>>3.0.3-SNAPSHOT
>>>test
>>> 
>>>
>>>
>>> But I can¹t find this dependency in Maven.
>>>
>>> I also tried the guide here:
>>> https://ops4j1.jira.com/wiki/display/PAXEXAM4/Karaf+Container:
>>>
>>> @RunWith(PaxExam.class)
>>> public classConfigurableMemoryRepositoryIT {
>>>
>>>  @Configuration
>>>  publicOption[]config() {
>>>  MavenArtifactUrlReference karafUrl =maven()
>>>  .groupId("org.apache.karaf")
>>>  .artifactId("apache-karaf")
>>>  .version("3.0.3")
>>>  .type("tar.gz");
>>>  MavenUrlReference karafStandardRepo =maven()
>>>  .groupId("org.apache.karaf.features")
>>>  .artifactId("standard")
>>>  .classifier("features")
>>>  .version("3.0.3")
>>>  .type("xml");
>>>  return newOption[] {
>>>  karafDistributionConfiguration()
>>>  .frameworkUrl(karafUrl)
>>> 

Re: Karaf Integration Testing

2015-06-20 Thread Stephen Kahmann
JB,

Thank you for your reply. Looks like the issue was in my pax-url-aether
version. I upgraded from 2.3.0 to 2.4.1 and it looks like I get a little
further. Now I am having an issue when Karaf starts:

2015-06-20 18:18:54,166 | WARN  | FelixStartLevel  | FeaturesServiceImpl
   | 20 - org.apache.karaf.features.core - 3.0.3 | Unable to add
features repository mvn:org.ops4j.pax.exam/pax-exam-features/4.5.0/xml at
startup
java.io.IOException: Error resolving artifact
org.ops4j.pax.exam:pax-exam-features:xml:4.5.0: Could not find artifact
org.ops4j.pax.exam:pax-exam-features:xml:4.5.0
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResol
ver.java:487)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResol
ver.java:433)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResol
ver.java:411)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResol
ver.java:386)
at 
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:12
4)
at 
org.apache.karaf.features.internal.FeatureValidationUtil.load(FeatureValida
tionUtil.java:93)
at 
org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureVa
lidationUtil.java:58)
at 
org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(F
eaturesServiceImpl.java:162)
...
at 
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelI
mpl.java:304)[org.apache.felix.framework-4.2.1.jar:]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_40]
2015-06-20 18:18:54,263 | ERROR | FelixStartLevel  | BootFeaturesInstaller
   | 20 - org.apache.karaf.features.core - 3.0.3 | Error Boot
feature exam not found
__ __  
   / //_/ __ _/ __/
  / ,<  / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / /  / /_/ / __/
/_/ |_|\__,_/_/   \__,_/_/

  Apache Karaf (3.0.3)

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.

karaf@root()>
java.rmi.NotBoundException: 7fbbaa46-4dc1-4912-ae9b-da6b46ebf18f
at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:166)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at 
sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:410)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:268)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
...
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6
2)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)


Process finished with exit code 255






Thanks
Stephen







On 6/20/15, 2:49 PM, "Jean-Baptiste Onofré"  wrote:

>Hi Stephen
>
>the org.apache.karaf.tooling.exam is now deprecated and only valid for
>Karaf 2.3.x.
>
>If you use 2.4.x, 3.0.x (or 4.0.x), you can directly use pax-exam, which
>provide now natively the Karaf container support.
>
>You can take a look on Karaf or Cellar itest for example.
>
>I will update the documentation.
>
>For your issue, it's weird, it looks like pax-logging doesn't come with
>Karaf. Please use the Karaf itest for sample.
>
>Regards
>JB
>
>On 06/20/2015 07:36 PM, Stephen Kahmann wrote:
>> Hi,
>>
>> I am trying to write integration tests for Karaf and I am following
>> 
>>https://karaf.apache.org/manual/latest/developers-guide/writing-tests.htm
>>l.
>> That page says to include:
>>
>> 
>>org.apache.karaf.tooling.exam
>>org.apache.karaf.tooling.exam.container
>>3.0.3-SNAPSHOT
>>test
>> 
>>
>>
>> But I can¹t find this dependency in Maven.
>>
>> I also tried the guide here:
>> https://ops4j1.jira.com/wiki/display/PAXEXAM4/Karaf+Container:
>>
>> @RunWith(PaxExam.class)
>> public classConfigurableMemoryRepositoryIT {
>>
>>  @Configuration
>>  publicOption[]config() {
>>  MavenArtifactUrlReference karafUrl =maven()
>>  .groupId("org.apache.karaf")
>>  .artifactId("apache-karaf")
>>  .version("3.0.3")
>>  .type("tar.gz");
>>  MavenUrlReference karafStandardRepo =maven()
>>  .groupId("org.apache.karaf.features")
>>  .artifactId("standard")
>>  .classifier("features")
>>  .version("3.0.3")
>>  .type("xml");
>>  return newOption[] {
>>  karafDistributionConfiguration()
>>  .frameworkUrl(karafUrl)
>>  .unpackDirectory(newFile("target/exam"))
>>  .useDeployFolder(false),
>>  keepRuntimeFolder(),
>>  features(karafStandardRepo,"scr"),
>>  };
>>  }
>>
>>  @Test
>>  public voidtest()throwsExceptio

How to Define a Feature Configuration in Maven Project?

2015-06-20 Thread Erwin Hogeweg
Hi, 

I would like to include something like this:

  myProperty = myValue

in a Maven generated feature.xml.

How/where do I specify that? The documentation here: 
http://karaf.apache.org/manual/latest/developers-guide/karaf-maven-plugin-features-generate-descriptor.html
 

 doesn’t seem to describe that.

Is there any other documentation on the karaf-maven-plugin?

As always, your help is greatly appreciated.


Kind Regards,

Erwin




Re: 4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Erwin Hogeweg
Hi JB,

Ok, thanks. I was wondering about that Jetty error.

So I switched back to Karaf 3 since I need CXF-DOSGi, and, AFAIK, that requires 
CXF < 3.0.0.
Although I get the error below, it seems to work, and the remote services are 
registered.

karaf@root()> feature:repo-add cxf 2.7.8
Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/2.7.8/xml/features
karaf@root()> feature:install cxf/2.7.8
Error executing command: Can't install feature cxf/2.7.8:   
Could not start bundle mvn:org.apache.cxf/cxf-bundle-compatible/2.7.8 in 
feature(s) cxf-2.7.8: Unresolved constraint in bundle org.apache.cxf.bundle 
[161]: Unable to resolve 161.0: missing requirement [161.0] osgi.wiring.bundle; 
(osgi.wiring.bundle=org.springframework.beans)
karaf@root()> feature:repo-add cxf-dosgi 1.6.0
Adding feature url mvn:org.apache.cxf.dosgi/cxf-dosgi/1.6.0/xml/features
karaf@root()> feature:install cxf-dosgi-discovery-distributed/1.6.0
karaf@root()> feature:install webconsole
...

Thanks again for your help.

Erwin

> On Jun 20, 2015, at 15:58, Jean-Baptiste Onofré  wrote:
> 
> Hi Erwin,
> 
> Karaf 4.x comes with Jetty 9 (not 8). So, you have to update your CXF version 
> (3.11 for instance) or downgrade to Karaf 3 (which provides Jetty 8).
> 
> Regards
> JB
> 
> On 06/20/2015 09:28 PM, Erwin Hogeweg wrote:
>> From a fresh installation:
>> 
>> *karaf*@root()> feature:install http
>> *karaf*@root()> feature:repo-add cxf 3.0.2
>> Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
>> *karaf*@root()> feature:install -v cxf/3.0.2
>> Adding features: cxf/[3.0.2,3.0.2]
>> Error executing command: Unable to resolve root: missing requirement
>> [root] osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature;
>> version=3.0.2 [caused by: Unable to resolve cxf-http-jetty/3.0.2:
>> missing requirement [cxf-http-jetty/3.0.2] osgi.identity;
>> osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty;
>> type=osgi.bundle; version="[3.0.2,3.0.2]"; resolution:=mandatory [caused
>> by: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2:
>> missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2]
>> osgi.wiring.package;
>> filter:="(&(osgi.wiring.package=org.eclipse.jetty.continuation)(version>=7.6.0)(!(version>=8.2.0)))"]]
>> *karaf*@root()>
>> 
>> 
>>> On Jun 20, 2015, at 15:11, Jean-Baptiste Onofré >> > wrote:
>>> 
>>> Can you first try to install the http feature before the cxf one:
>>> 
>>> feature:install http
>>> feature:install cxf
>>> 
>>> The http feature should install the servlet-api bundle.
>>> 
>>> Regards
>>> JB
>>> 
>>> On 06/20/2015 08:59 PM, Erwin Hogeweg wrote:
> I guess the same happens with a simple feature:install cxf ?
 Yeah ,that doesn’t seem to work quite right either.
 
 *karaf*@root()> feature:install cxf
 Error executing command: Unable to resolve root: missing requirement
 [root] osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature;
 version=3.0.2 [caused by: Unable to resolve cxf-http-jetty/3.0.2:
 missing requirement [cxf-http-jetty/3.0.2] osgi.identity;
 osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty;
 type=osgi.bundle; version="[3.0.2,3.0.2]"; resolution:=mandatory [caused
 by: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2:
 missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2]
 osgi.wiring.package;
 filter:="(&(osgi.wiring.package=javax.servlet)(version>=0.0.0)(!(version>=4.0.0)))"]]
 *karaf*@root()>
 
 Regards,
 
 Erwin
 
> 
> Regards
> JB
> 
> On 06/20/2015 08:02 PM, Erwin Hogeweg wrote:
>> Hi -
>> 
>> Trying to install cxf feature in 4.0.0.M3, following the steps in the
>> Cookbook, I am getting the errors below. I assume this is a user error,
>> but apart from the Jira issue KARAF- cannot find any documentation
>> on which version I should use.
>> 
>> 
>> *karaf*@root()> feature:repo-add cxf 3.0.2
>> Adding feature url
>> mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
>> *karaf*@root()> feature:install -v cxf/3.0.2
>> Adding features: cxf/[3.0.2,3.0.2]
>> Error executing command: Error
>> *karaf*@root()>
>> 
>> Please advise.
>> 
>> Thanks,
>> 
>> Erwin
>> 
> 
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> 
> http://blog.nanthrax.net 
> Talend -http://www.talend.com 
 
 
 
>>> 
>>> --
>>> Jean-Baptiste Onofré
>>> jbono...@apache.org 
>>> http://blog.nanthrax.net 
>>> Talend -http://www.talend.com 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com



Re: 4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Jean-Baptiste Onofré

Hi Erwin,

Karaf 4.x comes with Jetty 9 (not 8). So, you have to update your CXF 
version (3.11 for instance) or downgrade to Karaf 3 (which provides 
Jetty 8).


Regards
JB

On 06/20/2015 09:28 PM, Erwin Hogeweg wrote:

 From a fresh installation:

*karaf*@root()> feature:install http
*karaf*@root()> feature:repo-add cxf 3.0.2
Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
*karaf*@root()> feature:install -v cxf/3.0.2
Adding features: cxf/[3.0.2,3.0.2]
Error executing command: Unable to resolve root: missing requirement
[root] osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature;
version=3.0.2 [caused by: Unable to resolve cxf-http-jetty/3.0.2:
missing requirement [cxf-http-jetty/3.0.2] osgi.identity;
osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty;
type=osgi.bundle; version="[3.0.2,3.0.2]"; resolution:=mandatory [caused
by: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2:
missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2]
osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.eclipse.jetty.continuation)(version>=7.6.0)(!(version>=8.2.0)))"]]
*karaf*@root()>



On Jun 20, 2015, at 15:11, Jean-Baptiste Onofré mailto:j...@nanthrax.net>> wrote:

Can you first try to install the http feature before the cxf one:

feature:install http
feature:install cxf

The http feature should install the servlet-api bundle.

Regards
JB

On 06/20/2015 08:59 PM, Erwin Hogeweg wrote:

I guess the same happens with a simple feature:install cxf ?

Yeah ,that doesn’t seem to work quite right either.

*karaf*@root()> feature:install cxf
Error executing command: Unable to resolve root: missing requirement
[root] osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature;
version=3.0.2 [caused by: Unable to resolve cxf-http-jetty/3.0.2:
missing requirement [cxf-http-jetty/3.0.2] osgi.identity;
osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty;
type=osgi.bundle; version="[3.0.2,3.0.2]"; resolution:=mandatory [caused
by: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2:
missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2]
osgi.wiring.package;
filter:="(&(osgi.wiring.package=javax.servlet)(version>=0.0.0)(!(version>=4.0.0)))"]]
*karaf*@root()>

Regards,

Erwin



Regards
JB

On 06/20/2015 08:02 PM, Erwin Hogeweg wrote:

Hi -

Trying to install cxf feature in 4.0.0.M3, following the steps in the
Cookbook, I am getting the errors below. I assume this is a user error,
but apart from the Jira issue KARAF- cannot find any documentation
on which version I should use.


*karaf*@root()> feature:repo-add cxf 3.0.2
Adding feature url
mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
*karaf*@root()> feature:install -v cxf/3.0.2
Adding features: cxf/[3.0.2,3.0.2]
Error executing command: Error
*karaf*@root()>

Please advise.

Thanks,

Erwin



--
Jean-Baptiste Onofré
jbono...@apache.org

http://blog.nanthrax.net 
Talend -http://www.talend.com 






--
Jean-Baptiste Onofré
jbono...@apache.org 
http://blog.nanthrax.net 
Talend -http://www.talend.com 




--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: 4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Erwin Hogeweg
From a fresh installation:

karaf@root()> feature:install http
karaf@root()> feature:repo-add cxf 3.0.2
Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
karaf@root()> feature:install -v cxf/3.0.2
Adding features: cxf/[3.0.2,3.0.2]
Error executing command: Unable to resolve root: missing requirement [root] 
osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature; version=3.0.2 
[caused by: Unable to resolve cxf-http-jetty/3.0.2: missing requirement 
[cxf-http-jetty/3.0.2] osgi.identity; 
osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty; type=osgi.bundle; 
version="[3.0.2,3.0.2]"; resolution:=mandatory [caused by: Unable to resolve 
org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2: missing requirement 
[org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.eclipse.jetty.continuation)(version>=7.6.0)(!(version>=8.2.0)))"]]
karaf@root()> 


> On Jun 20, 2015, at 15:11, Jean-Baptiste Onofré  wrote:
> 
> Can you first try to install the http feature before the cxf one:
> 
> feature:install http
> feature:install cxf
> 
> The http feature should install the servlet-api bundle.
> 
> Regards
> JB
> 
> On 06/20/2015 08:59 PM, Erwin Hogeweg wrote:
>>> I guess the same happens with a simple feature:install cxf ?
>> Yeah ,that doesn’t seem to work quite right either.
>> 
>> *karaf*@root()> feature:install cxf
>> Error executing command: Unable to resolve root: missing requirement
>> [root] osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature;
>> version=3.0.2 [caused by: Unable to resolve cxf-http-jetty/3.0.2:
>> missing requirement [cxf-http-jetty/3.0.2] osgi.identity;
>> osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty;
>> type=osgi.bundle; version="[3.0.2,3.0.2]"; resolution:=mandatory [caused
>> by: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2:
>> missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2]
>> osgi.wiring.package;
>> filter:="(&(osgi.wiring.package=javax.servlet)(version>=0.0.0)(!(version>=4.0.0)))"]]
>> *karaf*@root()>
>> 
>> Regards,
>> 
>> Erwin
>> 
>>> 
>>> Regards
>>> JB
>>> 
>>> On 06/20/2015 08:02 PM, Erwin Hogeweg wrote:
 Hi -
 
 Trying to install cxf feature in 4.0.0.M3, following the steps in the
 Cookbook, I am getting the errors below. I assume this is a user error,
 but apart from the Jira issue KARAF- cannot find any documentation
 on which version I should use.
 
 
 *karaf*@root()> feature:repo-add cxf 3.0.2
 Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
 *karaf*@root()> feature:install -v cxf/3.0.2
 Adding features: cxf/[3.0.2,3.0.2]
 Error executing command: Error
 *karaf*@root()>
 
 Please advise.
 
 Thanks,
 
 Erwin
 
>>> 
>>> --
>>> Jean-Baptiste Onofré
>>> jbono...@apache.org  
>>> >
>>> http://blog.nanthrax.net 
>>> Talend - http://www.talend.com 
>> 
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org 
> http://blog.nanthrax.net 
> Talend - http://www.talend.com 


Re: 4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Jean-Baptiste Onofré

Can you first try to install the http feature before the cxf one:

feature:install http
feature:install cxf

The http feature should install the servlet-api bundle.

Regards
JB

On 06/20/2015 08:59 PM, Erwin Hogeweg wrote:

I guess the same happens with a simple feature:install cxf ?

Yeah ,that doesn’t seem to work quite right either.

*karaf*@root()> feature:install cxf
Error executing command: Unable to resolve root: missing requirement
[root] osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature;
version=3.0.2 [caused by: Unable to resolve cxf-http-jetty/3.0.2:
missing requirement [cxf-http-jetty/3.0.2] osgi.identity;
osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty;
type=osgi.bundle; version="[3.0.2,3.0.2]"; resolution:=mandatory [caused
by: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2:
missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2]
osgi.wiring.package;
filter:="(&(osgi.wiring.package=javax.servlet)(version>=0.0.0)(!(version>=4.0.0)))"]]
*karaf*@root()>

Regards,

Erwin



Regards
JB

On 06/20/2015 08:02 PM, Erwin Hogeweg wrote:

Hi -

Trying to install cxf feature in 4.0.0.M3, following the steps in the
Cookbook, I am getting the errors below. I assume this is a user error,
but apart from the Jira issue KARAF- cannot find any documentation
on which version I should use.


*karaf*@root()> feature:repo-add cxf 3.0.2
Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
*karaf*@root()> feature:install -v cxf/3.0.2
Adding features: cxf/[3.0.2,3.0.2]
Error executing command: Error
*karaf*@root()>

Please advise.

Thanks,

Erwin



--
Jean-Baptiste Onofré
jbono...@apache.org 
http://blog.nanthrax.net
Talend - http://www.talend.com






--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: 4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Erwin Hogeweg
> I guess the same happens with a simple feature:install cxf ?
Yeah ,that doesn’t seem to work quite right either.

karaf@root()> feature:install cxf
Error executing command: Unable to resolve root: missing requirement [root] 
osgi.identity; osgi.identity=cxf-http-jetty; type=karaf.feature; version=3.0.2 
[caused by: Unable to resolve cxf-http-jetty/3.0.2: missing requirement 
[cxf-http-jetty/3.0.2] osgi.identity; 
osgi.identity=org.apache.cxf.cxf-rt-transports-http-jetty; type=osgi.bundle; 
version="[3.0.2,3.0.2]"; resolution:=mandatory [caused by: Unable to resolve 
org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2: missing requirement 
[org.apache.cxf.cxf-rt-transports-http-jetty/3.0.2] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=javax.servlet)(version>=0.0.0)(!(version>=4.0.0)))"]]
karaf@root()> 

Regards,

Erwin

> 
> Regards
> JB
> 
> On 06/20/2015 08:02 PM, Erwin Hogeweg wrote:
>> Hi -
>> 
>> Trying to install cxf feature in 4.0.0.M3, following the steps in the
>> Cookbook, I am getting the errors below. I assume this is a user error,
>> but apart from the Jira issue KARAF- cannot find any documentation
>> on which version I should use.
>> 
>> 
>> *karaf*@root()> feature:repo-add cxf 3.0.2
>> Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
>> *karaf*@root()> feature:install -v cxf/3.0.2
>> Adding features: cxf/[3.0.2,3.0.2]
>> Error executing command: Error
>> *karaf*@root()>
>> 
>> Please advise.
>> 
>> Thanks,
>> 
>> Erwin
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com





Re: 4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Jean-Baptiste Onofré

I guess the same happens with a simple feature:install cxf ?

Regards
JB

On 06/20/2015 08:02 PM, Erwin Hogeweg wrote:

Hi -

Trying to install cxf feature in 4.0.0.M3, following the steps in the
Cookbook, I am getting the errors below. I assume this is a user error,
but apart from the Jira issue KARAF- cannot find any documentation
on which version I should use.


*karaf*@root()> feature:repo-add cxf 3.0.2
Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
*karaf*@root()> feature:install -v cxf/3.0.2
Adding features: cxf/[3.0.2,3.0.2]
Error executing command: Error
*karaf*@root()>

Please advise.

Thanks,

Erwin



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Karaf Integration Testing

2015-06-20 Thread Jean-Baptiste Onofré

Hi Stephen

the org.apache.karaf.tooling.exam is now deprecated and only valid for 
Karaf 2.3.x.


If you use 2.4.x, 3.0.x (or 4.0.x), you can directly use pax-exam, which 
provide now natively the Karaf container support.


You can take a look on Karaf or Cellar itest for example.

I will update the documentation.

For your issue, it's weird, it looks like pax-logging doesn't come with 
Karaf. Please use the Karaf itest for sample.


Regards
JB

On 06/20/2015 07:36 PM, Stephen Kahmann wrote:

Hi,

I am trying to write integration tests for Karaf and I am following
https://karaf.apache.org/manual/latest/developers-guide/writing-tests.html.
That page says to include:


   org.apache.karaf.tooling.exam
   org.apache.karaf.tooling.exam.container
   3.0.3-SNAPSHOT
   test



But I can’t find this dependency in Maven.

I also tried the guide here:
https://ops4j1.jira.com/wiki/display/PAXEXAM4/Karaf+Container:

@RunWith(PaxExam.class)
public classConfigurableMemoryRepositoryIT {

 @Configuration
 publicOption[]config() {
 MavenArtifactUrlReference karafUrl =maven()
 .groupId("org.apache.karaf")
 .artifactId("apache-karaf")
 .version("3.0.3")
 .type("tar.gz");
 MavenUrlReference karafStandardRepo =maven()
 .groupId("org.apache.karaf.features")
 .artifactId("standard")
 .classifier("features")
 .version("3.0.3")
 .type("xml");
 return newOption[] {
 karafDistributionConfiguration()
 .frameworkUrl(karafUrl)
 .unpackDirectory(newFile("target/exam"))
 .useDeployFolder(false),
 keepRuntimeFolder(),
 features(karafStandardRepo,"scr"),
 };
 }

 @Test
 public voidtest()throwsException {
 assertTrue(true);
 }
}

But I am getting the following exception:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at
shaded.org.apache.http.conn.ssl.AbstractVerifier.(AbstractVerifier.java:89)
at
shaded.org.apache.http.conn.ssl.AllowAllHostnameVerifier.(AllowAllHostnameVerifier.java:40)
at
shaded.org.apache.http.conn.ssl.SSLConnectionSocketFactory.(SSLConnectionSocketFactory.java:124)
at
org.ops4j.pax.url.mvn.internal.HttpClients.createConnManager(HttpClients.java:70)
at
org.ops4j.pax.url.mvn.internal.HttpClients.createClient(HttpClients.java:39)
at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.(AetherBasedResolver.java:132)
at
org.ops4j.pax.url.mvn.MavenResolvers.createMavenResolver(MavenResolvers.java:36)
at
org.ops4j.pax.url.mvn.MavenResolvers.createMavenResolver(MavenResolvers.java:29)
at org.ops4j.pax.url.mvn.Handler.openConnection(Handler.java:50)

My pax-exam dependencies are attached.

Can anyone help with this?

Thanks


--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: 4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Erwin Hogeweg
FYI - I see this in the log file… 

2015-06-20 13:57:33,420 | ERROR | nsole user karaf | ShellUtil  
  | 42 - org.apache.karaf.shell.core - 4.0.0.M3 | Exception caught while 
executing command
org.apache.karaf.features.internal.util.MultiException: Error
at 
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.(MavenDownloadManager.java:84)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:350)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:347)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:178)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:261)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1061)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:960)[6:org.apache.karaf.features.core:4.0.0.M3]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_60]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_60]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_60]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
Caused by: java.lang.IllegalArgumentException: Duplicate 
'osgi.service.blueprint.namespace' in: 
org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/blueprint/core",org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/configuration/beans",org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/configuration/parameterized-types",org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/configuration/security"org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://schemas.xmlsoap.org/wsdl/";,
at 
org.apache.karaf.features.internal.resolver.ResourceBuilder.parseStandardHeader(ResourceBuilder.java:991)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:205)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:65)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:552)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.region.Subsystem$1.downloaded(Subsystem.java:368)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListeners(DefaultFuture.java:329)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.DefaultFuture.setValue(DefaultFuture.java:255)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.AbstractDownloadTask.setFile(AbstractDownloadTask.java:61)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:59)[6:org.apache.karaf.features.core:4.0.0.M3]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_60]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_60]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_60]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_60]
... 3 more

> On Jun 20, 2015, at 14:02, Erwin Hogeweg  wro

4.0.0.M3 error installing cxf feature - User Error?

2015-06-20 Thread Erwin Hogeweg
Hi -

Trying to install cxf feature in 4.0.0.M3, following the steps in the Cookbook, 
I am getting the errors below. I assume this is a user error, but apart from 
the Jira issue KARAF- cannot find any documentation on which version I 
should use.


karaf@root()> feature:repo-add cxf 3.0.2
Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
karaf@root()> feature:install -v cxf/3.0.2
Adding features: cxf/[3.0.2,3.0.2]
Error executing command: Error
karaf@root()> 

Please advise.

Thanks,

Erwin



Karaf Integration Testing

2015-06-20 Thread Stephen Kahmann
Hi,

I am trying to write integration tests for Karaf and I am following 
https://karaf.apache.org/manual/latest/developers-guide/writing-tests.html. 
That page says to include:



  org.apache.karaf.tooling.exam
  org.apache.karaf.tooling.exam.container
  3.0.3-SNAPSHOT
  test


But I can't find this dependency in Maven.

I also tried the guide here: 
https://ops4j1.jira.com/wiki/display/PAXEXAM4/Karaf+Container:


@RunWith(PaxExam.class)
public class ConfigurableMemoryRepositoryIT {

@Configuration
public Option[] config() {
MavenArtifactUrlReference karafUrl = maven()
.groupId("org.apache.karaf")
.artifactId("apache-karaf")
.version("3.0.3")
.type("tar.gz");
MavenUrlReference karafStandardRepo = maven()
.groupId("org.apache.karaf.features")
.artifactId("standard")
.classifier("features")
.version("3.0.3")
.type("xml");
return new Option[] {
karafDistributionConfiguration()
.frameworkUrl(karafUrl)
.unpackDirectory(new File("target/exam"))
.useDeployFolder(false),
keepRuntimeFolder(),
features(karafStandardRepo, "scr"),
};
}

@Test
public void test() throws Exception {
assertTrue(true);
}
}

But I am getting the following exception:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at 
shaded.org.apache.http.conn.ssl.AbstractVerifier.(AbstractVerifier.java:89)
at 
shaded.org.apache.http.conn.ssl.AllowAllHostnameVerifier.(AllowAllHostnameVerifier.java:40)
at 
shaded.org.apache.http.conn.ssl.SSLConnectionSocketFactory.(SSLConnectionSocketFactory.java:124)
at 
org.ops4j.pax.url.mvn.internal.HttpClients.createConnManager(HttpClients.java:70)
at org.ops4j.pax.url.mvn.internal.HttpClients.createClient(HttpClients.java:39)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.(AetherBasedResolver.java:132)
at 
org.ops4j.pax.url.mvn.MavenResolvers.createMavenResolver(MavenResolvers.java:36)
at 
org.ops4j.pax.url.mvn.MavenResolvers.createMavenResolver(MavenResolvers.java:29)
at org.ops4j.pax.url.mvn.Handler.openConnection(Handler.java:50)

My pax-exam dependencies are attached.

Can anyone help with this?

Thanks

org.ops4j.pax.exam
pax-exam-container-karaf
4.4.0
test


org.ops4j.pax.exam
pax-exam-junit4
4.4.0
test


org.ops4j.pax.exam
pax-exam
4.4.0
test


org.ops4j.pax.url
pax-url-aether
2.3.0
test