Re: Cannot start Karaf
Hi David, I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? Best, Dan. On 13 Oct 2014, at 09:15, David Leangen apa...@leangen.net wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David
Re: Cannot start Karaf
which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 regards, Achim 2014-10-13 10:15 GMT+02:00 David Leangen apa...@leangen.net: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Co-Author of Apache Karaf Cookbook http://bit.ly/1ps9rkS Software Architect / Project Manager / Scrum Master
Re: Cannot start Karaf
Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: $ karaf javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David
Re: Cannot start Karaf
It looks like the lib folder doesn't contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Do you have something in bin/setenv ? Regards JB On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Cannot start Karaf
By the way, can you try with Java7 (instead of Java6) ? Regards JB On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Cannot start Karaf
It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Cannot start Karaf
Really weird, Can you do a java -version and send the result. Can you also send the data/log/karaf.log to me ? Regards JB On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org mailto:jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Cannot start Karaf
Do you have another container with a JMXServer running? It's rather strange behavior you're describing. Could you do a cleanup of the cache folder, by removing the data folder? regards, Achim 2014-10-13 13:47 GMT+02:00 David Leangen apa...@leangen.net: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Co-Author of Apache Karaf Cookbook http://bit.ly/1ps9rkS Software Architect / Project Manager / Scrum Master
Re: Cannot start Karaf
Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org mailto:jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Cannot start Karaf
Hi! Do you have another container with a JMXServer running? Nope. (Unless there is something happening that I am not aware of. How could I verify?) It’s rather strange behavior you're describing. No doubt. Could you do a cleanup of the cache folder, by removing the data folder? Again, assuming the data directory to which you refer is in $KARAF_HOME (i.e. the directory where Karaf is installed), there is nothing there, except a tmp directory. Cheers, =David 2014-10-13 13:47 GMT+02:00 David Leangen apa...@leangen.net: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Co-Author of Apache Karaf Cookbook http://bit.ly/1ps9rkS Software Architect / Project Manager / Scrum Master
Re: Cannot start Karaf
hmm, did you tell us already which OS you're using? regards, Achim 2014-10-13 13:59 GMT+02:00 David Leangen apa...@leangen.net: Hi! Do you have another container with a JMXServer running? Nope. (Unless there is something happening that I am not aware of. How could I verify?) It’s rather strange behavior you're describing. No doubt. Could you do a cleanup of the cache folder, by removing the data folder? Again, assuming the data directory to which you refer is in $KARAF_HOME (i.e. the directory where Karaf is installed), there is nothing there, except a tmp directory. Cheers, =David 2014-10-13 13:47 GMT+02:00 David Leangen apa...@leangen.net: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E However, it does not seem to be relevant to me, and I did not find any other reference to this problem. Assuming that Karaf is intended to run out of the box, is there a quick recommended fix for this? Cheers, =David -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog
Re: Cannot start Karaf
Mac OS X On 10/13/2014 02:01 PM, Achim Nierbeck wrote: hmm, did you tell us already which OS you're using? regards, Achim 2014-10-13 13:59 GMT+02:00 David Leangen apa...@leangen.net mailto:apa...@leangen.net: Hi! Do you have another container with a JMXServer running? Nope. (Unless there is something happening that I am not aware of. How could I verify?) It’s rather strange behavior you're describing. No doubt. Could you do a cleanup of the cache folder, by removing the data folder? Again, assuming the data directory to which you refer is in $KARAF_HOME (i.e. the directory where Karaf is installed), there is nothing there, except a tmp directory. Cheers, =David 2014-10-13 13:47 GMT+02:00 David Leangen apa...@leangen.net mailto:apa...@leangen.net: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E
Re: Cannot start Karaf
in the bin/karaf script, can you confirm that you have something like: exec $JAVA $JAVA_OPTS -Djava.endorsed.dirs=${JAVA_ENDORSED_DIRS} -Djava.ext.dirs=${JAVA_EXT_DIRS} -Dkaraf.instances=${KARAF_HOME}/instances -Dkaraf.home=$KARAF_HOME -Dkaraf.base=$KARAF_BASE -Dkaraf.data=$KARAF_DATA -Dkaraf.etc=$KARAF_ETC -Djava.io.tmpdir=$KARAF_DATA/tmp -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder $KARAF_OPTS $OPTS -classpath $CLASSPATH $MAIN $@ Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Regards JB On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E
Re: Cannot start Karaf
Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a JMRuntimeException: Failed to load MBeanServerBuilder. I noticed this thread: http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/%3ccagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/karaf-user/201404.mbox/cagrrcrxmqe-v65jecwpakmatc6qap+hvyb_abmgxk8zpvko...@mail.gmail.com However, it does not seem to be relevant to me, and I did
Re: Cannot start Karaf
OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am new to Karaf. I am trying to set up v3.0.1 on my Mac, but am getting a
Re: Cannot start Karaf
Unfortunately, even with KARAF_HOME unset, the problem persists. :-( On Oct 13, 2014, at 9:35 PM, David Leangen apa...@leangen.net wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers,
Re: Cannot start Karaf
2014-10-13 14:14 GMT+02:00 David Leangen apa...@leangen.net: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. That seems wrong. Your karaf installation does seem quite weird. Usually, when unset, your KARAF_HOME should point to something like /usr/local/apache-karaf-3.0.1 With the system, etc, lib directories being $KARAF_HOME/system, $KARAF_HOME/etc, etc... Did you remove the apache-karaf-xxx folder somehow ? Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder Cheers, =David On 10/13/2014 10:15 AM, David Leangen wrote: Hi! I am
Re: Cannot start Karaf
KARAF_HOME is the location where you uncompressed Karaf. For instance, if you uncompressed Karaf in /opt/apache-karaf (and so, you have /opt/apache-karaf/bin, /opt/apache-karaf/lib, etc), KARAF_HOME is /opt/apache-karaf. However, by default, KARAF_HOME is defined relatively to the bin/karaf. By the way, do you use the default shell on Mac OS ? Regards JB On 10/13/2014 02:35 PM, David Leangen wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:424) at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:466) ... 9 more Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class
Re: Cannot start Karaf
Just another idea that crosses my mind. Did you place the extracted Karaf folder in some restricted folders? Where does it actually reside in? regards, Achim 2014-10-13 14:43 GMT+02:00 Jean-Baptiste Onofré j...@nanthrax.net: KARAF_HOME is the location where you uncompressed Karaf. For instance, if you uncompressed Karaf in /opt/apache-karaf (and so, you have /opt/apache-karaf/bin, /opt/apache-karaf/lib, etc), KARAF_HOME is /opt/apache-karaf. However, by default, KARAF_HOME is defined relatively to the bin/karaf. By the way, do you use the default shell on Mac OS ? Regards JB On 10/13/2014 02:35 PM, David Leangen wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder( MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder( MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer( MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer( MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer( MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer( ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer( ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap. startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at
Re: Cannot start Karaf
Hi, That seems wrong. Your karaf installation does seem quite weird. :-) I installed it in /usr/local/java. The folder there is apache-karat-3.0.2, exactly as tar-gunzipped. :-) Usually, when unset, your KARAF_HOME should point to something like /usr/local/apache-karaf-3.0.1 Well, close. With the system, etc, lib directories being $KARAF_HOME/system, $KARAF_HOME/etc, etc... Did you remove the apache-karaf-xxx folder somehow ? Nope. The folder is there, exactly as unzipped. KARAF_HOME is the location where you uncompressed Karaf. Do you mean (in my case): /usr/local/share? or /usr/local/share/apache-karaf-3.0.2? For instance, if you uncompressed Karaf in /opt/apache-karaf (and so, you have /opt/apache-karaf/bin, /opt/apache-karaf/lib, etc), KARAF_HOME is /opt/apache-karaf. However, by default, KARAF_HOME is defined relatively to the bin/karaf. In my case, bin/karaf is /usr/local/share/apache-karaf-3.0.2/bin/karaf. By the way, do you use the default shell on Mac OS ? If you mean the “Terminal” application, then yes. Cheers, =David On 10/13/2014 02:35 PM, David Leangen wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at
Re: Cannot start Karaf
Hi, Just another idea that crosses my mind. Did you place the extracted Karaf folder in some restricted folders? Where does it actually reside in? Not sure exactly what you mean by “restricted”, but it resides in /usr/local/java.] This is where I install all my apache apps. No problems so far, except for karaf. :-) Cheers, =David 2014-10-13 14:43 GMT+02:00 Jean-Baptiste Onofré j...@nanthrax.net: KARAF_HOME is the location where you uncompressed Karaf. For instance, if you uncompressed Karaf in /opt/apache-karaf (and so, you have /opt/apache-karaf/bin, /opt/apache-karaf/lib, etc), KARAF_HOME is /opt/apache-karaf. However, by default, KARAF_HOME is defined relatively to the bin/karaf. By the way, do you use the default shell on Mac OS ? Regards JB On 10/13/2014 02:35 PM, David Leangen wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at
Re: Cannot start Karaf
Karaf will need to be able to write to that directory by default. What user are you using to run karaf? Does he have permissions to write to /usr/local/java/apache-karaf-3.0.2? On Mon, Oct 13, 2014 at 8:51 AM, David Leangen apa...@leangen.net wrote: Hi, Just another idea that crosses my mind. Did you place the extracted Karaf folder in some restricted folders? Where does it actually reside in? Not sure exactly what you mean by “restricted”, but it resides in /usr/local/java.] This is where I install all my apache apps. No problems so far, except for karaf. :-) Cheers, =David 2014-10-13 14:43 GMT+02:00 Jean-Baptiste Onofré j...@nanthrax.net: KARAF_HOME is the location where you uncompressed Karaf. For instance, if you uncompressed Karaf in /opt/apache-karaf (and so, you have /opt/apache-karaf/bin, /opt/apache-karaf/lib, etc), KARAF_HOME is /opt/apache-karaf. However, by default, KARAF_HOME is defined relatively to the bin/karaf. By the way, do you use the default shell on Mac OS ? Regards JB On 10/13/2014 02:35 PM, David Leangen wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:214) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:175) at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:458) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.startAgent(Agent.java:239) Caused by:
Re: Cannot start Karaf
Indeed, it was a permissions problem. Thanks! :-) The error message was misleading, at least for somebody new to Karaf. Perhaps the launcher could check for permissions and fail on error. Just a thought. In any case, thanks to everybody for a super response! I’m not sure how active the community is, but there seem to be some very dedicated members. Cheers, =David On Oct 14, 2014, at 12:13 AM, James Carman ja...@carmanconsulting.com wrote: Karaf will need to be able to write to that directory by default. What user are you using to run karaf? Does he have permissions to write to /usr/local/java/apache-karaf-3.0.2? On Mon, Oct 13, 2014 at 8:51 AM, David Leangen apa...@leangen.net wrote: Hi, Just another idea that crosses my mind. Did you place the extracted Karaf folder in some restricted folders? Where does it actually reside in? Not sure exactly what you mean by “restricted”, but it resides in /usr/local/java.] This is where I install all my apache apps. No problems so far, except for karaf. :-) Cheers, =David 2014-10-13 14:43 GMT+02:00 Jean-Baptiste Onofré j...@nanthrax.net: KARAF_HOME is the location where you uncompressed Karaf. For instance, if you uncompressed Karaf in /opt/apache-karaf (and so, you have /opt/apache-karaf/bin, /opt/apache-karaf/lib, etc), KARAF_HOME is /opt/apache-karaf. However, by default, KARAF_HOME is defined relatively to the bin/karaf. By the way, do you use the default shell on Mac OS ? Regards JB On 10/13/2014 02:35 PM, David Leangen wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at
Re: Cannot start Karaf
Good. It's what Achim asked yesterday (by restricted directories). I will create a Jira to add a permission check in Karaf main. Regards JB On 10/13/2014 11:04 PM, David Leangen wrote: Indeed, it was a permissions problem. Thanks! :-) The error message was misleading, at least for somebody new to Karaf. Perhaps the launcher could check for permissions and fail on error. Just a thought. In any case, thanks to everybody for a super response! I’m not sure how active the community is, but there seem to be some very dedicated members. Cheers, =David On Oct 14, 2014, at 12:13 AM, James Carman ja...@carmanconsulting.com wrote: Karaf will need to be able to write to that directory by default. What user are you using to run karaf? Does he have permissions to write to /usr/local/java/apache-karaf-3.0.2? On Mon, Oct 13, 2014 at 8:51 AM, David Leangen apa...@leangen.net wrote: Hi, Just another idea that crosses my mind. Did you place the extracted Karaf folder in some restricted folders? Where does it actually reside in? Not sure exactly what you mean by “restricted”, but it resides in /usr/local/java.] This is where I install all my apache apps. No problems so far, except for karaf. :-) Cheers, =David 2014-10-13 14:43 GMT+02:00 Jean-Baptiste Onofré j...@nanthrax.net: KARAF_HOME is the location where you uncompressed Karaf. For instance, if you uncompressed Karaf in /opt/apache-karaf (and so, you have /opt/apache-karaf/bin, /opt/apache-karaf/lib, etc), KARAF_HOME is /opt/apache-karaf. However, by default, KARAF_HOME is defined relatively to the bin/karaf. By the way, do you use the default shell on Mac OS ? Regards JB On 10/13/2014 02:35 PM, David Leangen wrote: OK, I think we narrow the problem. I bet your KARAF_HOME is defined by empty or it's not correct (I guess that /usr/local/lib folder is not your actual KARAF_HOME). I would advise to unset KARAF_BASE, KARAF_HOME, etc to let the bin/karaf script to define it for you. Sure. What, very precisely, should be KARAF_HOME? =David On 10/13/2014 02:14 PM, David Leangen wrote: Hi, in the bin/karaf script, can you confirm that you have something like: exec “$JAVA” […] Yes. Do you define some env variables like KARAF_BASE/KARAF_HOME/KARAF_ETC, ? I tried both. Same results. A possible cause is that KARAF_HOME is not well setted or a CLASSPATH system variable interfere. In bin/karaf, we do: for file in $KARAF_HOME/lib/karaf*.jar do if [ -z $CLASSPATH ]; then CLASSPATH=$file else CLASSPATH=$CLASSPATH:$file fi done to load the karaf*.jar file from the Karaf lib folder. Yes, I can see this in the bin/karaf file. For the fun of it, I added the line “echo $file” in the for loop. In the output, all I see is “/usr/local/lib/karaf*.jar. Weird. Cheers, =David On 10/13/2014 01:56 PM, David Leangen wrote: Really weird, :-) Can you do a java -version and send the result. java version 1.7.0_67 Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) Can you also send the data/log/karaf.log to me ? There is no file (assuming that it is in $KARAF_HOME, i.e. the directory where Karaf is installed). Cheers, =David On 10/13/2014 01:47 PM, David Leangen wrote: It looks like the lib folder doesn’t contain the karaf-jmx-boot.jar file (providing the MBeanServerBuilder). Can you check that this jar is in the lib folder ? Yes, it is there. Do you have something in bin/setenv ? No, using defaults. By the way, can you try with Java7 (instead of Java6) ? I installed Java7. Same problem. :-( Cheers, =David On 10/13/2014 10:39 AM, David Leangen wrote: Wow! Impressive response. :-) Thank you! Can you make a try with 3.0.2 (currently on staging) ? Tried. Same problem. :-( which version of Java are you using? Please note with Karaf 3.0.1 it's still recommended to use Java7 Hmmm. I am still a luddite with 1.6 (more precisely 1.6.0_65-b14-462-11M4609). I’m running 3.0.1 on Mac out of the box. You’ll likely need to describe more about your circumstances, e.g. the JVM used, what commands you’ve run (to start Karaf and at it’s own command line), what bundles you’ve installed (if any), the complete stack trace, etc? I ran “karaf” with the default (i.e. “out-of-the-box”) installation, and before Karaf could start, it died with the following: *$ karaf* javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.apache.karaf.management.boot.KarafMBeanServerBuilder: java.lang.ClassNotFoundException: org.apache.karaf.management.boot.KarafMBeanServerBuilder at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:481) at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:512) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:299) at