Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread yogu13
Hello Christian,

You can check the karaf logs on why isn't your bundle installing / starting.

Regards,
-Yogesh




--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763896.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Schneider

You probably forgot the version in the mvn: uri

Christian

On 10.03.2015 08:45, Christian Eugster wrote:

Hi,

I want to explore camel in karaf and for that I want install the sample bundle 
provided by Apache Karaf Cookbook (Chapter 2, Recipe 2), I ran  mvn:install and 
found the installed bundle in ~/m2e repository. But when I try install -s 
mvn:com.packt/sample from within karaf, I get an Error executing command: Error 
installing bundles: Unable to install bundle mvn:com.packt/sample. What am I 
doing wrong? Thank you!

Regards Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch









--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Eugster
Hi Yogesh,

thank you for responding. The log says, but I don't see what is wrong and I 
don't understand what No highest version found for com.packt:sample:jar:(0.0,] 
means.

2015-03-10 13:30:19,280 | ERROR | l for user karaf | ShellUtil  
  | 25 - org.apache.karaf.shell.console - 3.0.3 | Exception caught while 
executing command
org.apache.karaf.shell.console.MultiException: Error installing bundles:
Unable to install bundle mvn:com.packt/sample
at 
org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:92)
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:69)
at 
org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3]
at Proxy7fbc9e19_dc50_4b3b_82db_0045b0ce5b99.execute(Unknown Source)[:]
at Proxy7fbc9e19_dc50_4b3b_82db_0045b0ce5b99.execute(Unknown Source)[:]
at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
at 
org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208)
at 
org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_51]
at 
org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[26:org.apache.karaf.jaas.modules:3.0.3]
at 
org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)[25:org.apache.karaf.shell.console:3.0.3]
Caused by: java.lang.Exception: Unable to install bundle mvn:com.packt/sample
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:45)
... 17 more
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: 
mvn:com.packt/sample
at org.apache.felix.framework.Felix.installBundle(Felix.java:2870)
at 
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
... 17 more
Caused by: java.io.IOException: Error resolving artifact 
com.packt:sample:jar:LATEST
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:491)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386)
at 
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124)
at 
org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
at 
org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
at 
org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77)
at 
org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
at 
org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
at 
org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153)
at 
org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
... 19 more
Caused by: 
shaded.org.eclipse.aether.resolution.VersionRangeResolutionException: No 
highest version found for com.packt:sample:jar:(0.0,]
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveLatestVersionRange(AetherBasedResolver.java:666)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:475)
... 31 more


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 10.03.2015 um 12:26 schrieb yog

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Eugster
The example is from Apache Karaf Cookbook. I didn't change anything and 
installed it in local maven repository without any problems.

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 10.03.2015 um 13:32 schrieb Christian Schneider :
> 
> You probably forgot the version in the mvn: uri
> 
> Christian
> 
> On 10.03.2015 08:45, Christian Eugster wrote:
>> Hi,
>> 
>> I want to explore camel in karaf and for that I want install the sample 
>> bundle provided by Apache Karaf Cookbook (Chapter 2, Recipe 2), I ran  
>> mvn:install and found the installed bundle in ~/m2e repository. But when I 
>> try install -s mvn:com.packt/sample from within karaf, I get an Error 
>> executing command: Error installing bundles: Unable to install bundle 
>> mvn:com.packt/sample. What am I doing wrong? Thank you!
>> 
>> Regards Christian
>> 
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugs...@docuteam.ch
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> http://www.talend.com
> 



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Schneider
I am not sure under which circumstance the automatic detection of the 
LATEST version works but just add the actual version and you are fine.


Christian

On 10.03.2015 13:38, Christian Eugster wrote:

The example is from Apache Karaf Cookbook. I didn't change anything and 
installed it in local maven repository without any problems.

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread yogu13
Hello Christian!

Looks like you did miss the version of the bundle installing.

Try following readme @  chapter2-recipe2/sample

  

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763901.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Eugster
Hi Yogesh + Christian,

that does not work neither: osgi:install is not known bei karaf (3.0.3). And 
bundle:install -s mvn:com.packt/sample/1.0.0-SNAPSHOT does not work neither. 
Any idea?

Thanks!

Regards Christian


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 10.03.2015 um 13:46 schrieb yogu13 :
> 
> Hello Christian!
> 
> Looks like you did miss the version of the bundle installing.
> 
> Try following readme @  chapter2-recipe2/sample
> 
>   
> 
> Regards,
> -Yogesh
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763901.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Schneider

bundle:install should work. But you need to first build the example locally.

Christian

On 10.03.2015 16:39, Christian Eugster wrote:

Hi Yogesh + Christian,

that does not work neither: osgi:install is not known bei karaf (3.0.3). And 
bundle:install -s mvn:com.packt/sample/1.0.0-SNAPSHOT does not work neither. 
Any idea?

Thanks!

Regards Christian


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch






Am 10.03.2015 um 13:46 schrieb yogu13 :

Hello Christian!

Looks like you did miss the version of the bundle installing.

Try following readme @  chapter2-recipe2/sample


Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763901.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Eugster
HI Christian,

sorry to bother you. I did like the book describes: I did first an mvn:install 
from eclipse (with success). After that I did the bundle:install -s 
mvn:com.packt/sample in different variations (with and without version). Does 
not work. Don't know, what I am missing.

Regards Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 10.03.2015 um 16:58 schrieb Christian Schneider :
> 
> bundle:install should work. But you need to first build the example locally.
> 
> Christian
> 
> On 10.03.2015 16:39, Christian Eugster wrote:
>> Hi Yogesh + Christian,
>> 
>> that does not work neither: osgi:install is not known bei karaf (3.0.3). And 
>> bundle:install -s mvn:com.packt/sample/1.0.0-SNAPSHOT does not work neither. 
>> Any idea?
>> 
>> Thanks!
>> 
>> Regards Christian
>> 
>> 
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugs...@docuteam.ch
>> 
>> 
>> 
>> 
>> 
>>> Am 10.03.2015 um 13:46 schrieb yogu13 :
>>> 
>>> Hello Christian!
>>> 
>>> Looks like you did miss the version of the bundle installing.
>>> 
>>> Try following readme @  chapter2-recipe2/sample
>>> 
>>> 
>>> Regards,
>>> -Yogesh
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: 
>>> http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763901.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> 
> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> http://www.talend.com
> 



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Schneider

Maybe your maven repository is not at the default location.
Karaf will then not use it and so at runtime you do not find the class.

Christian

On 10.03.2015 17:26, Christian Eugster wrote:

HI Christian,

sorry to bother you. I did like the book describes: I did first an mvn:install 
from eclipse (with success). After that I did the bundle:install -s 
mvn:com.packt/sample in different variations (with and without version). Does 
not work. Don't know, what I am missing.

Regards Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch






--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Eugster
My local maven repository is at ~/.m2e. Maybe I have to configure this location 
in karaf? Or reconfigure it in maven?

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 10.03.2015 um 17:54 schrieb Christian Schneider :
> 
> Maybe your maven repository is not at the default location.
> Karaf will then not use it and so at runtime you do not find the class.
> 
> Christian
> 
> On 10.03.2015 17:26, Christian Eugster wrote:
>> HI Christian,
>> 
>> sorry to bother you. I did like the book describes: I did first an 
>> mvn:install from eclipse (with success). After that I did the bundle:install 
>> -s mvn:com.packt/sample in different variations (with and without version). 
>> Does not work. Don't know, what I am missing.
>> 
>> Regards Christian
>> 
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugs...@docuteam.ch
>> 
>> 
>> 
> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> http://www.talend.com
> 



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Schneider
You can configure it in etc/org.ops4j.pax.url.mvn.cfg but using the 
default will save you from many problems.


Christian

On 10.03.2015 17:58, Christian Eugster wrote:

My local maven repository is at ~/.m2e. Maybe I have to configure this location 
in karaf? Or reconfigure it in maven?

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread yogu13
Check the version in your pom.xml i hope it matches your install mvn
parameter

Regards,
-Yogesh

On Tuesday, March 10, 2015, Christian Eugster-2 [via Camel] <
ml-node+s465427n576394...@n5.nabble.com> wrote:

> HI Christian,
>
> sorry to bother you. I did like the book describes: I did first an
> mvn:install from eclipse (with success). After that I did the
> bundle:install -s mvn:com.packt/sample in different variations (with and
> without version). Does not work. Don't know, what I am missing.
>
> Regards Christian
>
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37
> [hidden email] 
>
>
>
>
>
> > Am 10.03.2015 um 16:58 schrieb Christian Schneider <[hidden email]
> >:
> >
> > bundle:install should work. But you need to first build the example
> locally.
> >
> > Christian
> >
> > On 10.03.2015 16:39, Christian Eugster wrote:
> >> Hi Yogesh + Christian,
> >>
> >> that does not work neither: osgi:install is not known bei karaf
> (3.0.3). And bundle:install -s mvn:com.packt/sample/1.0.0-SNAPSHOT does not
> work neither. Any idea?
> >>
> >> Thanks!
> >>
> >> Regards Christian
> >>
> >>
> >> Christian Eugster
> >> Docuteam GmbH
> >> Langacker 16
> >> Postfach
> >> CH-5405 Baden-Dättwil
> >> +41 (0)56 470 03 37
> >> [hidden email] 
> >>
> >>
> >>
> >>
> >>
> >>> Am 10.03.2015 um 13:46 schrieb yogu13 <[hidden email]
> >:
> >>>
> >>> Hello Christian!
> >>>
> >>> Looks like you did miss the version of the bundle installing.
> >>>
> >>> Try following readme @  chapter2-recipe2/sample
> >>> <
> https://github.com/jgoodyear/ApacheKarafCookbook/tree/master/chapter2/chapter2-recipe2/sample>
>
> >>>
> >>> Regards,
> >>> -Yogesh
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763901.html
> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >
> >
> > --
> > Christian Schneider
> > http://www.liquid-reality.de
> >
> > Open Source Architect
> > http://www.talend.com
> >
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763941.html
>  To unsubscribe from Error when executing: install -s
> mvn:com.packt/sample, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-when-executing-install-s-mvn-com-packt-sample-tp5763885p5763943.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Schneider
Can you try some of the examples from my site and see if you hit the 
same problems?

I wonder if the problem is specific to the packt example or general.

http://liquid-reality.de/display/liquid/Karaf+Tutorials
https://github.com/cschneider/Karaf-Tutorial

Christian

On 10.03.2015 18:20, Christian Eugster wrote:

I would say, the default path in org.ops4j.pax.url.mvn.cfg is right. Looking in 
user.home/.m2/repository, I find the respective jar in the right place:

~/.m2/repository/com/packt/sample/1.0.0-SNAPSHOT/sample-1.0.0-SNAPSHOT.jar

The settings file in ~/.m2 had no extension. I added .xml and tried again, but 
nothing better.

My steps:
1. I imported the sample projects of the book into eclipse
2. I run mvn install on Chapter2/recipe2/sample/pom.xml - succeeded
3. In karaf i did bundle:install -s mvn:com.packt/sample in different 
variations I always get the error message Unable to install and karaf.log as 
provided in one of the previous emails.

Regards Christian


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch






Am 10.03.2015 um 18:04 schrieb Christian Schneider :

You can configure it in etc/org.ops4j.pax.url.mvn.cfg but using the default 
will save you from many problems.

Christian

On 10.03.2015 17:58, Christian Eugster wrote:

My local maven repository is at ~/.m2e. Maybe I have to configure this location 
in karaf? Or reconfigure it in maven?

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com






--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Eugster
Hi Christian,

I tried tasklist/pom.xml and got the following stacktrace while mvn install:

2015-03-10 19:04:16,193 | WARN  | FelixStartLevel  | AetherBasedResolver
  | 44 - org.ops4j.pax.url.mvn - 1.6.0 | Error resolving 
artifactnet.lr.tasklist:tasklist-features:xml:1.0.0-SNAPSHOT:Could not find 
artifact net.lr.tasklist:tasklist-features:xml:1.0.0-SNAPSHOT in defaultlocal 
(file:/Users/christian/Downloads/cschneider-Karaf-Tutorial-96070cf/tasklist/tasklist-itests/target/exam/a6104df3-464c-4a77-9f6e-00edcb58ee3b/$%7Buser.home%7D/.m2/repository/)
org.sonatype.aether.resolution.ArtifactResolutionException: Could not find 
artifact net.lr.tasklist:tasklist-features:xml:1.0.0-SNAPSHOT in defaultlocal 
(file:/Users/christian/Downloads/cschneider-Karaf-Tutorial-96070cf/tasklist/tasklist-itests/target/exam/a6104df3-464c-4a77-9f6e-00edcb58ee3b/$%7Buser.home%7D/.m2/repository/)
at 
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at 
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at 
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at 
org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:250)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveFile(AetherBasedResolver.java:239)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:223)
at 
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:122)
at 
org.apache.karaf.features.internal.FeatureValidationUtil.load(FeatureValidationUtil.java:85)
at 
org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureValidationUtil.java:56)
at 
org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(FeaturesServiceImpl.java:151)
at 
org.apache.karaf.features.internal.FeaturesServiceImpl.internalAddRepository(FeaturesServiceImpl.java:222)
at 
org.apache.karaf.features.internal.FeaturesServiceImpl.initState(FeaturesServiceImpl.java:791)
at 
org.apache.karaf.features.internal.FeaturesServiceImpl.start(FeaturesServiceImpl.java:803)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)[:1.8.0_40]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_40]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_40]
at 
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[4:org.apache.aries.blueprint.core:1.3.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40]
at 
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[4:org.apache.aries.blueprint.core:1.3.0]
at 
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[4:org.apache.aries.blueprint.core:1.3.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40]
at 
org.apache.aries.blueprint.di.Abstrac

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Achim Nierbeck
Hi Christian,

I just verified if there is an issue with the sample, which isn't.
Did you follow the instructions in the book, also did you make sure the
Karaf is in a "Vanilla" state?

For recipe2 of chapter2 to work you need to have camel installed:

feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.12.2/xml/features
feature:install camel

To install the sample recipe:
install -s mvn:com.packt/sample/1.0.0-SNAPSHOT

Could you try to create this sample via a build in a shell instead of
eclipse. Maybe your eclipse does something different.

regards, Achim




2015-03-10 19:09 GMT+01:00 Christian Eugster :

> Hi Christian,
>
> I tried tasklist/pom.xml and got the following stacktrace while mvn
> install:
>
> 2015-03-10 19:04:16,193 | WARN  | FelixStartLevel  | AetherBasedResolver
> | 44 - org.ops4j.pax.url.mvn - 1.6.0 | Error resolving
> artifactnet.lr.tasklist:tasklist-features:xml:1.0.0-SNAPSHOT:Could not find
> artifact net.lr.tasklist:tasklist-features:xml:1.0.0-SNAPSHOT in
> defaultlocal
> (file:/Users/christian/Downloads/cschneider-Karaf-Tutorial-96070cf/tasklist/tasklist-itests/target/exam/a6104df3-464c-4a77-9f6e-00edcb58ee3b/$%7Buser.home%7D/.m2/repository/)
> org.sonatype.aether.resolution.ArtifactResolutionException: Could not find
> artifact net.lr.tasklist:tasklist-features:xml:1.0.0-SNAPSHOT in
> defaultlocal
> (file:/Users/christian/Downloads/cschneider-Karaf-Tutorial-96070cf/tasklist/tasklist-itests/target/exam/a6104df3-464c-4a77-9f6e-00edcb58ee3b/$%7Buser.home%7D/.m2/repository/)
> at
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
> at
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
> at
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
> at
> org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
> at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:250)
> at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveFile(AetherBasedResolver.java:239)
> at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:223)
> at
> org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:122)
> at
> org.apache.karaf.features.internal.FeatureValidationUtil.load(FeatureValidationUtil.java:85)
> at
> org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureValidationUtil.java:56)
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(FeaturesServiceImpl.java:151)
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.internalAddRepository(FeaturesServiceImpl.java:222)
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.initState(FeaturesServiceImpl.java:791)
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.start(FeaturesServiceImpl.java:803)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)[:1.8.0_40]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_40]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_40]
> at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_40]
> at
> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40]
> at
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)[4:org.apache.aries.blueprint.core:1.3.0]
> at
> org.apache.aries.blueprint.container.BeanRecipe.setPropert

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-10 Thread Christian Eugster
Hi Achim,

The descriptions in Apache Karaf Cookbook are really easy to understand, so I 
don't think I missed something:

1. I installed karaf 3.0.3 from scratch
2. I feature:added-repo and feature:installed camel
3. I mvned install the sample module of chapter 2, recipe 2
4. I bundle:installed this sample as described

Today I tried any other bundle to install in karaf for testing. That worked.
Then I tried the bundle in question another time. It seems, that karaf does not 
use the local bundle, or the local repository is corrupted? (see below bolded):

2015-03-11 07:10:24,255 | WARN  | l for user karaf | AetherBasedResolver
  | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.1 | Error resolving 
artifactcom.packt:sample:jar:1.0.0-SNAPSHOT:Could not find artifact 
com.packt:sample:jar:1.0.0-SNAPSHOT in apache 
(http://repository.apache.org/content/groups/snapshots-group/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not 
find artifact com.packt:sample:jar:1.0.0-SNAPSHOT in apache 
(http://repository.apache.org/content/groups/snapshots-group/)
at 
shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at 
shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at 
shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at 
shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:476)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411)
at 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386)
at 
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124)
at 
org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
at 
org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
at 
org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77)
at 
org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
at 
org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
at 
org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153)
at 
org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
at 
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
at 
org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3]
at Proxy54d9195b_32e3_4ddd_8da7_4f229913259b.execute(Unknown Source)[:]
at Proxy54d9195b_32e3_4ddd_8da7_4f229913259b.execute(Unknown Source)[:]
at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:3.0.3]
at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
at 
org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208)
at 
org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_51]
at 
org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[26:org.apache.karaf.jaas.modules:3.0.3]
at 
org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)[25:org.apache.karaf.shell.console:3.0.3]
Caused by: shaded.org.eclipse.aether.transfer.ArtifactNotFoundE

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-11 Thread Achim Nierbeck
Hi Christian,

this is rather strange. Are you still building with your eclipse mvn?
Do you happen to have a maven usable from command line?
Another thing, maybe you should post us your ${home}/.m2/settings.xml maybe
something strange there.

regards, Achim


2015-03-11 7:15 GMT+01:00 Christian Eugster :

> Hi Achim,
>
> The descriptions in Apache Karaf Cookbook are really easy to understand,
> so I don't think I missed something:
>
> 1. I installed karaf 3.0.3 from scratch
> 2. I feature:added-repo and feature:installed camel
> 3. I mvned install the sample module of chapter 2, recipe 2
> 4. I bundle:installed this sample as described
>
> Today I tried any other bundle to install in karaf for testing. That
> worked.
> Then I tried the bundle in question another time. It seems, that karaf
> does not use the local bundle, or the local repository is corrupted? (see
> below bolded):
>
> 2015-03-11 07:10:24,255 | WARN  | l for user karaf | AetherBasedResolver
> | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.1 | Error
> resolving artifactcom.packt:sample:jar:1.0.0-SNAPSHOT:Could not find
> artifact com.packt:sample:jar:1.0.0-SNAPSHOT in apache (
> http://repository.apache.org/content/groups/snapshots-group/)
> shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could
> not find artifact com.packt:sample:jar:1.0.0-SNAPSHOT in apache (
> http://repository.apache.org/content/groups/snapshots-group/)
> at
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
> at
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
> at
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
> at
> shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
> at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:476)
> at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433)
> at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411)
> at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386)
> at
> org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124)
> at
> org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
> at
> org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
> at
> org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77)
> at
> org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
> at
> org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
> at
> org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153)
> at
> org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
> at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
> at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
> at
> org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
> at
> org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3]
> at Proxy54d9195b_32e3_4ddd_8da7_4f229913259b.execute(Unknown
> Source)[:]
> at Proxy54d9195b_32e3_4ddd_8da7_4f229913259b.execute(Unknown
> Source)[:]
> at
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:3.0.3]
> at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
> at
> org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208)
> at
> org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-11 Thread Christian Eugster
Hi Achim,

yes I tried from command line too, same result. Nearby my settings.xml from 
~/.m2:

http://maven.apache.org/SETTINGS/1.0.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
  http://maven.apache.org/xsd/settings-1.0.0.xsd";>
  ${user.home}/.m2/repository
  true
  false
  false


Thanks and regards

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 11.03.2015 um 08:07 schrieb Achim Nierbeck :
> 
> Hi Christian,
> 
> this is rather strange. Are you still building with your eclipse mvn?
> Do you happen to have a maven usable from command line?
> Another thing, maybe you should post us your ${home}/.m2/settings.xml maybe
> something strange there.
> 
> regards, Achim
> 
> 
> 2015-03-11 7:15 GMT+01:00 Christian Eugster :
> 
>> Hi Achim,
>> 
>> The descriptions in Apache Karaf Cookbook are really easy to understand,
>> so I don't think I missed something:
>> 
>> 1. I installed karaf 3.0.3 from scratch
>> 2. I feature:added-repo and feature:installed camel
>> 3. I mvned install the sample module of chapter 2, recipe 2
>> 4. I bundle:installed this sample as described
>> 
>> Today I tried any other bundle to install in karaf for testing. That
>> worked.
>> Then I tried the bundle in question another time. It seems, that karaf
>> does not use the local bundle, or the local repository is corrupted? (see
>> below bolded):
>> 
>> 2015-03-11 07:10:24,255 | WARN  | l for user karaf | AetherBasedResolver
>>| 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.1 | Error
>> resolving artifactcom.packt:sample:jar:1.0.0-SNAPSHOT:Could not find
>> artifact com.packt:sample:jar:1.0.0-SNAPSHOT in apache (
>> http://repository.apache.org/content/groups/snapshots-group/)
>> shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could
>> not find artifact com.packt:sample:jar:1.0.0-SNAPSHOT in apache (
>> http://repository.apache.org/content/groups/snapshots-group/)
>>at
>> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
>>at
>> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
>>at
>> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
>>at
>> shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
>>at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:476)
>>at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433)
>>at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411)
>>at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386)
>>at
>> org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124)
>>at
>> org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
>>at
>> org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
>>at
>> org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77)
>>at
>> org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
>>at
>> org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
>>at
>> org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153)
>>at
>> org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
>>at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
>>at
>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
>>at
>> org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
>>at
>> org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
>>at
>> org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
>>at
>> org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3]
>>at Proxy54d9195b_32e3_4ddd_8da7_4f229913259b.execute(Unknown
>> Source)[:]
>>at Proxy54d9195b_32e3_4ddd_8da7_4f229913259b.execute(Unknown
>> Source)[:]
>>at
>> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3]
>>at
>> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3]
>>at
>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-11 Thread Achim Nierbeck
Hi Christian,

this is rather strange effect you got there, is any of the other samples
working for you?
I somehow have the impression it's a missmatch of your local repo and the
repo defined in the Karaf server.

Anything else that is special on your machine?

regards, Achim


2015-03-11 8:14 GMT+01:00 Christian Eugster :

> Hi Achim,
>
> yes I tried from command line too, same result. Nearby my settings.xml
> from ~/.m2:
>
> http://maven.apache.org/SETTINGS/1.0.0";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
>   http://maven.apache.org/xsd/settings-1.0.0.xsd";>
>   ${user.home}/.m2/repository
>   true
>   false
>   false
> 
>
> Thanks and regards
>
> Christian
>
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37
> c.eugs...@docuteam.ch
>
>
>
>
>
> > Am 11.03.2015 um 08:07 schrieb Achim Nierbeck :
> >
> > Hi Christian,
> >
> > this is rather strange. Are you still building with your eclipse mvn?
> > Do you happen to have a maven usable from command line?
> > Another thing, maybe you should post us your ${home}/.m2/settings.xml
> maybe
> > something strange there.
> >
> > regards, Achim
> >
> >
> > 2015-03-11 7:15 GMT+01:00 Christian Eugster :
> >
> >> Hi Achim,
> >>
> >> The descriptions in Apache Karaf Cookbook are really easy to understand,
> >> so I don't think I missed something:
> >>
> >> 1. I installed karaf 3.0.3 from scratch
> >> 2. I feature:added-repo and feature:installed camel
> >> 3. I mvned install the sample module of chapter 2, recipe 2
> >> 4. I bundle:installed this sample as described
> >>
> >> Today I tried any other bundle to install in karaf for testing. That
> >> worked.
> >> Then I tried the bundle in question another time. It seems, that karaf
> >> does not use the local bundle, or the local repository is corrupted?
> (see
> >> below bolded):
> >>
> >> 2015-03-11 07:10:24,255 | WARN  | l for user karaf | AetherBasedResolver
> >>| 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.1 | Error
> >> resolving artifactcom.packt:sample:jar:1.0.0-SNAPSHOT:Could not find
> >> artifact com.packt:sample:jar:1.0.0-SNAPSHOT in apache (
> >> http://repository.apache.org/content/groups/snapshots-group/)
> >> shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could
> >> not find artifact com.packt:sample:jar:1.0.0-SNAPSHOT in apache (
> >> http://repository.apache.org/content/groups/snapshots-group/)
> >>at
> >>
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
> >>at
> >>
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
> >>at
> >>
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
> >>at
> >>
> shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
> >>at
> >>
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:476)
> >>at
> >>
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:433)
> >>at
> >>
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:411)
> >>at
> >>
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:386)
> >>at
> >>
> org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:124)
> >>at
> >>
> org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
> >>at
> >>
> org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
> >>at
> >> org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77)
> >>at
> >>
> org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
> >>at
> >>
> org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
> >>at
> >>
> org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153)
> >>at
> >>
> org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
> >>at
> org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
> >>at
> >>
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
> >>at
> >> org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
> >>at
> >>
> org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
> >>at
> >>
> org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
> >>at
> >>
> org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractComma

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-11 Thread Christian Eugster
Hi Christian,

I removed the line and IT WORKS! This problem is solved now, thank you.

Now there is the javax.naming.ConfigurationException (see mail before).

Regards Christian


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 11.03.2015 um 11:10 schrieb Christian Schneider :
> 
> I think the problem is
> 
>  ${user.home}/.m2/repository
> 
> Can you remove this?
> 
> Christian
> 
> On 11.03.2015 08:14, Christian Eugster wrote:
>> Hi Achim,
>> 
>> yes I tried from command line too, same result. Nearby my settings.xml from 
>> ~/.m2:
>> 
>> http://maven.apache.org/SETTINGS/1.0.0";
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
>>   http://maven.apache.org/xsd/settings-1.0.0.xsd";>
>>   ${user.home}/.m2/repository
>>   true
>>   false
>>   false
>> 
>> 
>> Thanks and regards
>> 
>> Christian
>> 
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugs...@docuteam.ch
>> 
>> 
>> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de 
> 
> Open Source Architect
> http://www.talend.com 


Re: Error when executing: install -s mvn:com.packt/sample

2015-03-11 Thread Morgan Hautman

Hi Christian,

I think that on Mac there is a problem with the 0.0.0.0 binding.
Try in etc/org.apache.karaf.management.cfg to change 0.0.0.0 to 127.0.0.1


On 11/03/2015 11:12, Christian Eugster wrote:

Hi Achim,

as I wrote before, I succeeded to bundle:install another bundle. But maybe this 
was done via global maven repo. Now I disconnected the computer from network, 
bundle:uninstall(ed) the bundle, that I successfully installed before, and 
reinstalled it again with bundle:install. It worked, but as I suspect, it's in 
the cache anywhere in karaf. So I tried to install another bundle, not yet 
installed before, and it did not work. So I suspect, as you wrote, that karaf 
does not points to the right local repository.

Now I removed the whole karaf installation, downloaded karaf-3.0.3 again, 
extracted and started it. Some seconds after start, there is a RuntimeException 
thrown like:

Last login: Wed Mar 11 08:10:39 on ttys001
ChristimMacBook:~ christian$ cd Projekte/ceugster/Frameworks/apache-karaf-3.0.3
ChristimMacBook:apache-karaf-3.0.3 christian$ bin/karaf
 __ __  
/ //_/ __ _/ __/
   / ,<  / __ `/ ___/ __ `/ /_
  / /| |/ /_/ / /  / /_/ / __/
 /_/ |_|\__,_/_/   \__,_/_/

   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()> Exception in thread "JMX Connector Thread 
[service:jmx:rmi://0.0.0.0:4/jndi/rmi://0.0.0.0:1099/karaf-root]" 
java.lang.RuntimeException: Could not start JMX connector server
at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:258)
Caused by: java.io.IOException: Cannot bind to URL 
[rmi://0.0.0.0:1099/karaf-root]: javax.naming.ConfigurationException [Root 
exception is java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
exception is:
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known]
at 
javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)
at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:245)
Caused by: javax.naming.ConfigurationException [Root exception is 
java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested exception is:
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known]
at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:143)
at 
com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:226)
at javax.naming.InitialContext.bind(InitialContext.java:419)
at 
javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:643)
at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)
... 1 more
Caused by: java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
exception is:
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:616)
at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:137)
... 5 more
Caused by: java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.(Socket.java:425)
at java.net.Socket.(Socket.java:208)
at 
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at 
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 10 more
Caused by: java.net.UnknownHostException: ChristimMacBook: nodename nor 
servname provided, or not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at 
java.net.InetAddress.getAddress

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-11 Thread Achim Nierbeck
Hi Christian,

awesome :-)

regards, Achim

2015-03-11 17:55 GMT+01:00 Christian Eugster :

> Now everything seems to work. Thank you all!
>
> Christian
>
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37
> c.eugs...@docuteam.ch
>
>
>
>
>
> > Am 11.03.2015 um 11:20 schrieb Morgan Hautman  >:
> >
> > Hi Christian,
> >
> > I think that on Mac there is a problem with the 0.0.0.0 binding.
> > Try in etc/org.apache.karaf.management.cfg to change 0.0.0.0 to 127.0.0.1
> >
> >
> > On 11/03/2015 11:12, Christian Eugster wrote:
> >> Hi Achim,
> >>
> >> as I wrote before, I succeeded to bundle:install another bundle. But
> maybe this was done via global maven repo. Now I disconnected the computer
> from network, bundle:uninstall(ed) the bundle, that I successfully
> installed before, and reinstalled it again with bundle:install. It worked,
> but as I suspect, it's in the cache anywhere in karaf. So I tried to
> install another bundle, not yet installed before, and it did not work. So I
> suspect, as you wrote, that karaf does not points to the right local
> repository.
> >>
> >> Now I removed the whole karaf installation, downloaded karaf-3.0.3
> again, extracted and started it. Some seconds after start, there is a
> RuntimeException thrown like:
> >>
> >> Last login: Wed Mar 11 08:10:39 on ttys001
> >> ChristimMacBook:~ christian$ cd
> Projekte/ceugster/Frameworks/apache-karaf-3.0.3
> >> ChristimMacBook:apache-karaf-3.0.3 christian$ bin/karaf
> >> __ __  
> >>/ //_/ __ _/ __/
> >>   / ,<  / __ `/ ___/ __ `/ /_
> >>  / /| |/ /_/ / /  / /_/ / __/
> >> /_/ |_|\__,_/_/   \__,_/_/
> >>
> >>   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()> Exception in thread "JMX Connector Thread
> [service:jmx:rmi://0.0.0.0:4/jndi/rmi://0.0.0.0:1099/karaf-root]"
> java.lang.RuntimeException: Could not start JMX connector server
> >>  at
> org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:258)
> >> Caused by: java.io.IOException: Cannot bind to URL [rmi://
> 0.0.0.0:1099/karaf-root]: javax.naming.ConfigurationException [Root
> exception is java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested
> exception is:
> >>  java.net.UnknownHostException: ChristimMacBook: ChristimMacBook:
> nodename nor servname provided, or not known]
> >>  at
> javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)
> >>  at
> javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
> >>  at
> org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:245)
> >> Caused by: javax.naming.ConfigurationException [Root exception is
> java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested exception is:
> >>  java.net.UnknownHostException: ChristimMacBook: ChristimMacBook:
> nodename nor servname provided, or not known]
> >>  at
> com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:143)
> >>  at
> com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:226)
> >>  at javax.naming.InitialContext.bind(InitialContext.java:419)
> >>  at
> javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:643)
> >>  at
> javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)
> >>  ... 1 more
> >> Caused by: java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested
> exception is:
> >>  java.net.UnknownHostException: ChristimMacBook: ChristimMacBook:
> nodename nor servname provided, or not known
> >>  at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:616)
> >>  at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
> >>  at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
> >>  at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
> >>  at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
> >>  at
> com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:137)
> >>  ... 5 more
> >> Caused by: java.net.UnknownHostException: ChristimMacBook:
> ChristimMacBook: nodename nor servname provided, or not known
> >>  at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
> >>  at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
> >>  at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> >>  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> >>  at java.net.Socket.connect(Socket.java:579)
> >>  at java.net.Socket.connect(Socket.java:528)
> >>  at java.net.Socket.(Socket.java:425)
> >>  at java.net.Socket.(Socket.java:208)
> >>  

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-11 Thread Morgan Hautman

Hi Christian,

Glad I could help.
Since all these issues and the book you're reading is about Karaf, maybe 
post your issues on the Karaf mailing list next time. :)


http://karaf.apache.org/index/community/mailing-lists.html

On 11/03/2015 17:55, Christian Eugster wrote:

Now everything seems to work. Thank you all!

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch






Am 11.03.2015 um 11:20 schrieb Morgan Hautman :

Hi Christian,

I think that on Mac there is a problem with the 0.0.0.0 binding.
Try in etc/org.apache.karaf.management.cfg to change 0.0.0.0 to 127.0.0.1


On 11/03/2015 11:12, Christian Eugster wrote:

Hi Achim,

as I wrote before, I succeeded to bundle:install another bundle. But maybe this 
was done via global maven repo. Now I disconnected the computer from network, 
bundle:uninstall(ed) the bundle, that I successfully installed before, and 
reinstalled it again with bundle:install. It worked, but as I suspect, it's in 
the cache anywhere in karaf. So I tried to install another bundle, not yet 
installed before, and it did not work. So I suspect, as you wrote, that karaf 
does not points to the right local repository.

Now I removed the whole karaf installation, downloaded karaf-3.0.3 again, 
extracted and started it. Some seconds after start, there is a RuntimeException 
thrown like:

Last login: Wed Mar 11 08:10:39 on ttys001
ChristimMacBook:~ christian$ cd Projekte/ceugster/Frameworks/apache-karaf-3.0.3
ChristimMacBook:apache-karaf-3.0.3 christian$ bin/karaf
 __ __  
/ //_/ __ _/ __/
   / ,<  / __ `/ ___/ __ `/ /_
  / /| |/ /_/ / /  / /_/ / __/
 /_/ |_|\__,_/_/   \__,_/_/

   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()> Exception in thread "JMX Connector Thread 
[service:jmx:rmi://0.0.0.0:4/jndi/rmi://0.0.0.0:1099/karaf-root]" 
java.lang.RuntimeException: Could not start JMX connector server
at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:258)
Caused by: java.io.IOException: Cannot bind to URL 
[rmi://0.0.0.0:1099/karaf-root]: javax.naming.ConfigurationException [Root 
exception is java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
exception is:
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known]
at 
javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)
at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:245)
Caused by: javax.naming.ConfigurationException [Root exception is 
java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested exception is:
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known]
at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:143)
at 
com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:226)
at javax.naming.InitialContext.bind(InitialContext.java:419)
at 
javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:643)
at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)
... 1 more
Caused by: java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
exception is:
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:616)
at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:137)
... 5 more
Caused by: java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.(Socket.java:425)
at java.net.Socket.(Socket.java:208)
at 
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-12 Thread Christian Schneider

I think the problem is

  ${user.home}/.m2/repository

Can you remove this?

Christian

On 11.03.2015 08:14, Christian Eugster wrote:

Hi Achim,

yes I tried from command line too, same result. Nearby my settings.xml from 
~/.m2:

http://maven.apache.org/SETTINGS/1.0.0";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
   http://maven.apache.org/xsd/settings-1.0.0.xsd";>
   ${user.home}/.m2/repository
   true
   false
   false


Thanks and regards

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-12 Thread Christian Eugster
I would say, the default path in org.ops4j.pax.url.mvn.cfg is right. Looking in 
user.home/.m2/repository, I find the respective jar in the right place:

~/.m2/repository/com/packt/sample/1.0.0-SNAPSHOT/sample-1.0.0-SNAPSHOT.jar

The settings file in ~/.m2 had no extension. I added .xml and tried again, but 
nothing better.

My steps:
1. I imported the sample projects of the book into eclipse
2. I run mvn install on Chapter2/recipe2/sample/pom.xml - succeeded
3. In karaf i did bundle:install -s mvn:com.packt/sample in different 
variations I always get the error message Unable to install and karaf.log as 
provided in one of the previous emails.

Regards Christian


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 10.03.2015 um 18:04 schrieb Christian Schneider :
> 
> You can configure it in etc/org.ops4j.pax.url.mvn.cfg but using the default 
> will save you from many problems.
> 
> Christian
> 
> On 10.03.2015 17:58, Christian Eugster wrote:
>> My local maven repository is at ~/.m2e. Maybe I have to configure this 
>> location in karaf? Or reconfigure it in maven?
>> 
>> Christian
>> 
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugs...@docuteam.ch
>> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> http://www.talend.com
> 



Re: Error when executing: install -s mvn:com.packt/sample

2015-03-12 Thread Christian Eugster
Hi Achim,

as I wrote before, I succeeded to bundle:install another bundle. But maybe this 
was done via global maven repo. Now I disconnected the computer from network, 
bundle:uninstall(ed) the bundle, that I successfully installed before, and 
reinstalled it again with bundle:install. It worked, but as I suspect, it's in 
the cache anywhere in karaf. So I tried to install another bundle, not yet 
installed before, and it did not work. So I suspect, as you wrote, that karaf 
does not points to the right local repository. 

Now I removed the whole karaf installation, downloaded karaf-3.0.3 again, 
extracted and started it. Some seconds after start, there is a RuntimeException 
thrown like:

Last login: Wed Mar 11 08:10:39 on ttys001
ChristimMacBook:~ christian$ cd Projekte/ceugster/Frameworks/apache-karaf-3.0.3
ChristimMacBook:apache-karaf-3.0.3 christian$ bin/karaf
__ __    
   / //_/ __ _/ __/  
  / ,<  / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / /  / /_/ / __/
/_/ |_|\__,_/_/   \__,_/_/ 

  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()> Exception in thread "JMX Connector Thread 
[service:jmx:rmi://0.0.0.0:4/jndi/rmi://0.0.0.0:1099/karaf-root]" 
java.lang.RuntimeException: Could not start JMX connector server
at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:258)
Caused by: java.io.IOException: Cannot bind to URL 
[rmi://0.0.0.0:1099/karaf-root]: javax.naming.ConfigurationException [Root 
exception is java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
exception is: 
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known]
at 
javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)
at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:245)
Caused by: javax.naming.ConfigurationException [Root exception is 
java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested exception is: 
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known]
at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:143)
at 
com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:226)
at javax.naming.InitialContext.bind(InitialContext.java:419)
at 
javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:643)
at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)
... 1 more
Caused by: java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
exception is: 
java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:616)
at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:137)
... 5 more
Caused by: java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
nodename nor servname provided, or not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.(Socket.java:425)
at java.net.Socket.(Socket.java:208)
at 
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at 
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 10 more
Caused by: java.net.UnknownHostException: ChristimMacBook: nodename nor 
servname provided, or not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at 
java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
... 20 more

sight. What is that?

Regards Christian

Re: Error when executing: install -s mvn:com.packt/sample

2015-03-12 Thread Christian Eugster
Now everything seems to work. Thank you all!

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugs...@docuteam.ch





> Am 11.03.2015 um 11:20 schrieb Morgan Hautman :
> 
> Hi Christian,
> 
> I think that on Mac there is a problem with the 0.0.0.0 binding.
> Try in etc/org.apache.karaf.management.cfg to change 0.0.0.0 to 127.0.0.1
> 
> 
> On 11/03/2015 11:12, Christian Eugster wrote:
>> Hi Achim,
>> 
>> as I wrote before, I succeeded to bundle:install another bundle. But maybe 
>> this was done via global maven repo. Now I disconnected the computer from 
>> network, bundle:uninstall(ed) the bundle, that I successfully installed 
>> before, and reinstalled it again with bundle:install. It worked, but as I 
>> suspect, it's in the cache anywhere in karaf. So I tried to install another 
>> bundle, not yet installed before, and it did not work. So I suspect, as you 
>> wrote, that karaf does not points to the right local repository.
>> 
>> Now I removed the whole karaf installation, downloaded karaf-3.0.3 again, 
>> extracted and started it. Some seconds after start, there is a 
>> RuntimeException thrown like:
>> 
>> Last login: Wed Mar 11 08:10:39 on ttys001
>> ChristimMacBook:~ christian$ cd 
>> Projekte/ceugster/Frameworks/apache-karaf-3.0.3
>> ChristimMacBook:apache-karaf-3.0.3 christian$ bin/karaf
>> __ __  
>>/ //_/ __ _/ __/
>>   / ,<  / __ `/ ___/ __ `/ /_
>>  / /| |/ /_/ / /  / /_/ / __/
>> /_/ |_|\__,_/_/   \__,_/_/
>> 
>>   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()> Exception in thread "JMX Connector Thread 
>> [service:jmx:rmi://0.0.0.0:4/jndi/rmi://0.0.0.0:1099/karaf-root]" 
>> java.lang.RuntimeException: Could not start JMX connector server
>>  at 
>> org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:258)
>> Caused by: java.io.IOException: Cannot bind to URL 
>> [rmi://0.0.0.0:1099/karaf-root]: javax.naming.ConfigurationException [Root 
>> exception is java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
>> exception is:
>>  java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
>> nodename nor servname provided, or not known]
>>  at 
>> javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)
>>  at 
>> javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
>>  at 
>> org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:245)
>> Caused by: javax.naming.ConfigurationException [Root exception is 
>> java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested exception is:
>>  java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
>> nodename nor servname provided, or not known]
>>  at 
>> com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:143)
>>  at 
>> com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:226)
>>  at javax.naming.InitialContext.bind(InitialContext.java:419)
>>  at 
>> javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:643)
>>  at 
>> javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)
>>  ... 1 more
>> Caused by: java.rmi.UnknownHostException: Unknown host: 0.0.0.0; nested 
>> exception is:
>>  java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
>> nodename nor servname provided, or not known
>>  at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:616)
>>  at 
>> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
>>  at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
>>  at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
>>  at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
>>  at 
>> com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:137)
>>  ... 5 more
>> Caused by: java.net.UnknownHostException: ChristimMacBook: ChristimMacBook: 
>> nodename nor servname provided, or not known
>>  at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
>>  at 
>> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
>>  at 
>> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
>>  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>  at java.net.Socket.connect(Socket.java:579)
>>  at java.net.Socket.connect(Socket.java:528)
>>  at java.net.Socket.(Socket.java:425)
>>  at java.net.Socket.(Socket.java:208)
>>  at 
>> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
>>  at 
>> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RM