Hi Gareth,

thanks for the detailed information, I fix that (it's not a big deal ;)).

Regards
JB

On 09/09/2011 06:51 PM, Gareth wrote:
Hello Jean-Baptiste,

I found the scenario to reproduce the error.

So following from what you did (start karaf and install cave). Then I:

(1) karaf@root>  cave:create-repository cave-repo-7
(2) karaf@root>  cave:upload-artifact cave-repo-7
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_5

Looking at http://mymachine:8182/cave/cave-repo-7-repository.xml I see:

<repository name="cave-repo-7" lastmodified="20110909123049.500">
<resource id="org.apache.servicemix.bundles.commons-lang/2.4.0.5"
symbolicname="org.apache.servicemix.bundles.commons-lang"
presentationname="Apache ServiceMix :: Bundles :: commons-lang"
uri="org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar"
version="2.4.0.5">

(3) karaf@root>  cave:scan-repository cave-repo-7

Everything is good. Just the timestamp changes:

<repository name="cave-repo-7" lastmodified="20110909123408.590">
<resource id="org.apache.servicemix.bundles.commons-lang/2.4.0.5"
symbolicname="org.apache.servicemix.bundles.commons-lang"
presentationname="Apache ServiceMix :: Bundles :: commons-lang"
uri="org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar"
version="2.4.0.5">

(4) Shutdown karaf and restart. Currently the cave configuration is
not saved across restarts (which I didn't realize) so I have to
recreate the repository.
(5) cave:create-repository cave-repo-7

When I go to http://mymachine:8182/cave/cave-repo-7-repository.xml,
the file is already there, great!:

<repository name="cave-repo-7" lastmodified="20110909123408.590">
<resource id="org.apache.servicemix.bundles.commons-lang/2.4.0.5"
symbolicname="org.apache.servicemix.bundles.commons-lang"
presentationname="Apache ServiceMix :: Bundles :: commons-lang"
uri="org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar"
version="2.4.0.5">

(6) cave:scan-repository cave-repo-7

Now the file gets messed up:

<repository name="cave-repo-7" lastmodified="20110909123820.878">
<resource id="org.apache.servicemix.bundles.commons-lang/2.4.0.5"
symbolicname="org.apache.servicemix.bundles.commons-lang"
presentationname="Apache ServiceMix :: Bundles :: commons-lang"
uri="file:/home/osgi/apache-karaf-2.2.3-cave/cave/cave-repo-7/org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar"
version="2.4.0.5">

So when I start another karaf instance and run:
karaf@root>  obr:addurl http://mymachine1:8182/cave/cave-repo-7-repository.xml
karaf@root>  obr:list
org.apache.servicemix.bundles.commons-lang - Apache ServiceMix ::
Bundles :: commons-lang (2.4.0.5)
karaf@root>  obr:info org.apache.servicemix.bundles.commons-lang

--------------------------------------------
Apache ServiceMix :: Bundles :: commons-lang
--------------------------------------------
id: org.apache.servicemix.bundles.commons-lang/2.4.0.5
.
.
uri: 
file:/home/osgi/apache-karaf-2.2.3-cave/cave/cave-repo-7/org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar

(7) Now if I shutdown karaf cave again and remove the repository file
(/home/osgi/apache-karaf-2.2.3-cave/cave/cave-repo-7/cave-repo-7-repository.xml
and restart and run

karaf@root>  cave:create-repository cave-repo-7
karaf@root>  cave:scan-repository cave-repo-7

the generated file is good again:

<repository name="cave-repo-7" lastmodified="20110909124602.785">
<resource id="org.apache.servicemix.bundles.commons-lang/2.4.0.5"
symbolicname="org.apache.servicemix.bundles.commons-lang"
presentationname="Apache ServiceMix :: Bundles :: commons-lang"
uri="org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar"
version="2.4.0.5">

Let me know if I should try anything else.

thanks,
Gareth


On Fri, Sep 9, 2011 at 3:43 AM, Jean-Baptiste Onofré [via Karaf]
<[email protected]>  wrote:
Hi Gareth,

I just make a test and it works fine.

It's what I did:

1/ on the Karaf Cave instance (2.2.2)
karaf@root>  features:addurl
mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0-SNAPSHOT/xml/features
karaf@root>  cave:create-repository test
karaf@root>  cave:upload-artifact test
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_5

2/ when I access, using my browse, to:
   http://localhost:8181/cave/test-repository.xml

I can see that the URI is "relative":
<resource id="org.apache.servicemix.bundles.commons-lang/2.4.0.5"
symbolicname="org.apache.servicemix.bundles.commons-lang"
presentationname="Apache ServiceMix :: Bundles :: commons-lang"
uri="org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar"
version="2.4.0.5">

3/ I started another Karaf instance and register the Cave HTTP URL for
the Test repository:
karaf@other>  features:install obr
karaf@other>  obr:addurl http://localhost:8181/cave/test-repository.xml
karaf@other>  obr:list
org.apache.servicemix.bundles.commons-lang - Apache ServiceMix ::
Bundles :: commons-lang (2.4.0.5)
karaf@other>  obr:info org.apache.servicemix.bundles.commons-lang
...
uri:
http://localhost:8181/cave/org.apache.servicemix.bundles.commons-lang-2.4.0.5.jar
...

The URI is relative to the HTTP.

And I was able to install the bundle:

karaf@other>  obr:deploy org.apache.servicemix.bundles.commons-lang
Target resource(s):
-------------------
     Apache ServiceMix :: Bundles :: commons-lang (2.4.0.5)

Deploying...done.

So it works for me.

Could you describe your use case ?

Regards
JB
On 09/08/2011 11:10 PM, Gareth wrote:
Hello Andreas,

That worked. I am now up and running with 2.2.3. Thank you for the
information!

While I am here I might as well ask another question on cave (I hope I
am not generating too much traffic). Even though I am accessing the
cave obr repository over http, it is giving me file urls for accessing
the obr bundles (this is a different karaf instance than the one
running cave). e.g.:

karaf@root>    obr:listurl
http://mymachine1:8182/cave/cave-repo-repository.xml
karaf@root>    obr:info com.google.gson
----
Gson
----
id: com.google.gson/1.7.0
.
.
uri: file:/home/osgi/apache-karaf-2.2.3-cave/cave/cave-repo/gson-1.7.1.jar

Is there something obvious I missed to cause this?

thanks again,
Gareth

On Thu, Sep 8, 2011 at 3:05 AM, Andreas Pieber [via Karaf]
<[hidden email]>    wrote:
Hey Gareth,

On Wed, Sep 7, 2011 at 22:03, Gareth<[hidden email]>    wrote:

What is a good environment for playing with cave? cxf 2.4.2 has some
problems installing in karaf 2.2.3 (first cxf has a hard dependency on
spring 3.0.5 which I can get around, but then on a restart I get a "two
dependency chain" error on javax.xml.bind.attachment which I cannot seem
to
fix).


karaf-2.2.3 is great; you've to manipulate the etc/jre.properties to get
cxf
to run. IIRC it was removing all javax.xml.bind and the activation
entries.

Kind regards,
Andreas



Do you see cave and cellar playing well with each other? It would be
nice
to
be able to easily create a repository via cave then to be able to deploy
the
repository bundles via cellar to all karaf nodes in a cluster.

thanks,
Gareth

--
View this message in context:


http://karaf.922171.n3.nabble.com/INFO-First-Karaf-Cave-preview-tp3248577p3317813.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.



________________________________
If you reply to this email, your message will be added to the discussion
below:

http://karaf.922171.n3.nabble.com/INFO-First-Karaf-Cave-preview-tp3248577p3318875.html
To unsubscribe from [INFO] First Karaf Cave preview, click here.


--
View this message in context:
http://karaf.922171.n3.nabble.com/INFO-First-Karaf-Cave-preview-tp3248577p3321162.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com


________________________________
If you reply to this email, your message will be added to the discussion
below:
http://karaf.922171.n3.nabble.com/INFO-First-Karaf-Cave-preview-tp3248577p3322189.html
To unsubscribe from [INFO] First Karaf Cave preview, click here.


--
View this message in context: 
http://karaf.922171.n3.nabble.com/INFO-First-Karaf-Cave-preview-tp3248577p3323429.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to