Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where do I run osgi:install command #1

Open
raygao opened this issue Feb 15, 2013 · 14 comments
Open

where do I run osgi:install command #1

raygao opened this issue Feb 15, 2013 · 14 comments

Comments

@raygao
Copy link

raygao commented Feb 15, 2013

I bought your book. But, I am lost. You said, run :

karaf@root> install -s mvn:com.packt.osgi.starter/1.0.0/producer
Bundle IDs:

Error executing command: Error installing bundles:
Unable to install bundle mvn:com.packt.osgi.starter/1.0.0/producer

What is the problem? The book is very poorly written, I can't follow it!!!! Should I ask for a refund?

@cclamb
Copy link

cclamb commented Feb 17, 2013

If you're getting the same results I am, it's because the mvn install step is failing. Not sure why that is yet.

@cclamb
Copy link

cclamb commented Feb 17, 2013

Okay, so I cleared out my previous maven install and was able to build; I was then able to discern the correct group ID from the maven installation.

What worked for me was:

karaf@root> install mvn:starter/producer/1.0
Bundle ID: 70
karaf@root> install mvn:starter/consumer/1.0
Bundle ID: 71
karaf@root> list
START LEVEL 100 , List Threshold: 50
ID State Blueprint Level Name
[ 70] [Installed ] [ ] [ 80] producer (1.0.0)
[ 71] [Installed ] [ ] [ 80] consumer (1.0.0)

From here, you can start the bundles and continue the exercise.

@raygao
Copy link
Author

raygao commented Feb 19, 2013

Thanks, that works. But, it's better to load the jar file with the webconsole.
features:install webconsole

@cclamb
Copy link

cclamb commented Feb 19, 2013

Really? Why do you think so? Personally I like the cli.

On Tuesday, February 19, 2013, Raymond Gao wrote:

Thanks, that works. But, it's better to load the jar file with the
webconsole.
features:install webconsole


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-13777666.

@raygao
Copy link
Author

raygao commented Feb 19, 2013

The problem is 'there is no indication, from which directory, I should run those commands from'. I tried to start consumer from both $root/consumer and $root/producer directory. And, both time, it failed. The web console on the other hand works every time.

@seijoed
Copy link
Owner

seijoed commented Feb 19, 2013

Raymond, they should both be built from the root directory.

Sorry about that.
What failure do you get?

On Feb 19, 2013, at 8:40 AM, Raymond Gao [email protected] wrote:

The problem is 'there is no indication, from which directory, I should run those commands from'. I tried to start consumer from both $root/consumer and $root/producer directory. And, both time, it failed. The web console on the other hand works every time.


Reply to this email directly or view it on GitHub.

@seijoed
Copy link
Owner

seijoed commented Feb 19, 2013

There is no difference in using the web-console or the CLI.
The cli is commonly more used.

On Feb 19, 2013, at 8:21 AM, Raymond Gao [email protected] wrote:

Thanks, that works. But, it's better to load the jar file with the webconsole.
features:install webconsole


Reply to this email directly or view it on GitHub.

@raygao
Copy link
Author

raygao commented Feb 19, 2013

I did the following:

karaf@root> install mvn:starter/producer/1.0
Bundle ID: 186
karaf@root> install mvn:starter/consumer/1.0
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle mvn:starter/consumer/1.0

The directory was: /home/rgao/workspace/osgi-starter

It was the root of the cloned github tarball.

@seijoed
Copy link
Owner

seijoed commented Feb 19, 2013

Did you build and install the bundles?

mvn clean install
This will put the bundles into your Maven repository.

On Feb 19, 2013, at 9:17 AM, Raymond Gao [email protected] wrote:

I did the following:

karaf@root> install mvn:starter/producer/1.0
Bundle ID: 186
karaf@root> install mvn:starter/consumer/1.0
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle mvn:starter/consumer/1.0

The directory was: /home/rgao/workspace/osgi-starter

It was the root of the cloned github tarball.


Reply to this email directly or view it on GitHub.

@cclamb
Copy link

cclamb commented Feb 19, 2013

FWIW, I ran karaf from the $karaf-install-root/bin dir, and it found the
maven-generated jars just fine. So I ran the 'mvn install', after moving
some old m2 config stuff out, and then ran karaf from
$karaf-install-root/bin.

BTW, after I got everthing working command line, I imported the maven
projects into eclipse and ran them successfully there too. The problem I
originally had was the URIs used to access the new bundles, and the new
URIs fixed that.

On Tue, Feb 19, 2013 at 9:18 AM, Johan Edstrom [email protected]:

Did you build and install the bundles?

mvn clean install
This will put the bundles into your Maven repository.

On Feb 19, 2013, at 9:17 AM, Raymond Gao [email protected]
wrote:

I did the following:

karaf@root> install mvn:starter/producer/1.0
Bundle ID: 186
karaf@root> install mvn:starter/consumer/1.0
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle mvn:starter/consumer/1.0

The directory was: /home/rgao/workspace/osgi-starter

It was the root of the cloned github tarball.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-13781133.

@seijoed
Copy link
Owner

seijoed commented Feb 19, 2013

What maven version do you have?
Technically maven should pick the latest build in your repo.

On Feb 19, 2013, at 9:27 AM, Chris Lamb [email protected] wrote:

FWIW, I ran karaf from the $karaf-install-root/bin dir, and it found the
maven-generated jars just fine. So I ran the 'mvn install', after moving
some old m2 config stuff out, and then ran karaf from
$karaf-install-root/bin.

BTW, after I got everthing working command line, I imported the maven
projects into eclipse and ran them successfully there too. The problem I
originally had was the URIs used to access the new bundles, and the new
URIs fixed that.

On Tue, Feb 19, 2013 at 9:18 AM, Johan Edstrom [email protected]:

Did you build and install the bundles?

mvn clean install
This will put the bundles into your Maven repository.

On Feb 19, 2013, at 9:17 AM, Raymond Gao [email protected]
wrote:

I did the following:

karaf@root> install mvn:starter/producer/1.0
Bundle ID: 186
karaf@root> install mvn:starter/consumer/1.0
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle mvn:starter/consumer/1.0

The directory was: /home/rgao/workspace/osgi-starter

It was the root of the cloned github tarball.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-13781133.


Reply to this email directly or view it on GitHub.

@raygao
Copy link
Author

raygao commented Feb 19, 2013

running Maven 3.0.4

@trainkg
Copy link

trainkg commented Oct 18, 2013

I have same question, when I do osgi:install in shell ,it's failed, but i do it success in web console.

@Schachte
Copy link

This is probably a bit outdated. The iTests are causing the initial mvn clean install to fail. Some versioning error within one of the iTests. I was able to successfully build after removing the tests, so it's clear this should probably be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants