Hi,
did you check that there's no missing dependencies ? Basically
jackson-annotations requires jackson-core.
Anyway, the Main raises a NPE here:
protected void setStartLevel(int level) {
framework.adapt(FrameworkStartLevel.class).setStartLevel(level);
}
So, it seems that the framework is not yet full set, which is weird.
Let me try to reproduce that.
Regards
JB
On 05/11/2016 06:06 PM, Debraj Manna wrote:
Hi Jean,
As you suggested I tried making the start level to 80 in
/etc/startup.properties
# add here bundles you want to install while system startup, e.g.
# joda-time/joda-time/2.9/joda-time-2.9.jar=10
mvn\:com.fasterxml.jackson.core/jackson-annotations/2.7.4 = 80
But still same error:-
jabongs-MacBook-Pro-4:apache-servicemix-6.1-2.0 debraj$ bin/servicemix
Please wait while Apache ServiceMix is starting...
*Error installing bundle listed in startup.properties with url:
mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.4 and startlevel: 80*
Exception in thread "main" java.lang.NullPointerException
at org.apache.karaf.main.Main.destroy(Main.java:533)
at org.apache.karaf.main.Main.main(Main.java:173)
jabongs-MacBook-Pro-4:apache-servicemix-6.1-2.0 debraj$
On Wed, May 11, 2016 at 2:43 PM, Jean-Baptiste Onofré <[email protected]
<mailto:[email protected]>> wrote:
Hi,
the start-level is very level for this bundle, and I'm afraid some
other bundles will be missing.
The main difference is that when you do bundle:install, it uses the
default start-level which is 80 and not 10.
Did you try to define the default start-level 80 in
etc/startup.properties ?
Regards
JB
On 05/09/2016 03:15 PM, Debraj Manna wrote:
Hi,
I want to install a bundle (if it is not already installed) from
maven
on Karaf restart. So to achieve this I added it in the
/etc/startup.properties as below:-
# add here bundles you want to install while system startup, e.g.
# joda-time/joda-time/2.9/joda-time-2.9.jar=10
mvn\:com.fasterxml.jackson.core/jackson-annotations/2.7.4 = 10
But on trying to start karaf I am getting the below exception:-
jabongs-MacBook-Pro-4:apache-servicemix-6.1-2.0 debraj$
bin/servicemix
Please wait while Apache ServiceMix is starting...
Error installing bundle listed in startup.properties with url:
mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.4 and
startlevel: 10
Exception in thread "main" java.lang.NullPointerException
at org.apache.karaf.main.Main.destroy(Main.java:533)
at org.apache.karaf.main.Main.main(Main.java:173)
The same bundle installs fine when I try to install it via the below
command after Karaf has started:-
*karaf@root*>bundle:install
mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.4
Bundle ID: 237
Can some one help me in the following:-
1. Why is the bundle installation failing on Karaf start?
2. I am seeing the error only when Karaf is started for the
first time.
After that I am not seeing the above error nor the bundle is
installed. So is it that Karaf tries to install the bundle in
startup.propertiesonly when it is started for the very
first time?
--
Jean-Baptiste Onofré
[email protected] <mailto:[email protected]>
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com