karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: [Karaf 3.0.4] - Window service - unable to load or find org.apache.karaf.wrapper.internal.Main
Date Mon, 10 Aug 2015 14:52:32 GMT
The problem is in the definition of the classpath in the wrapper.

In the etc/karaf-wrapper.conf, you can see the classpath.3 is missing.

So, try to define:

  wrapper.java.classpath.1=%KARAF_HOME%/lib/karaf-wrapper.jar
  wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
  wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jaas-boot.jar
  wrapper.java.classpath.4=%KARAF_HOME%/lib/karaf-wrapper-main.jar
  wrapper.java.classpath.5=%KARAF_HOME%/lib/karaf-org.osgi.core.jar

The wrapper main is in the karaf-wrapper-main.jar installed by 
wrapper:install command.

Regards
JB

On 08/10/2015 04:20 PM, spidetra wrote:
> Hi,
> I see the post about : Karaf3 - Impossible to start service, but it does not
> help me.
> I just try to install Karaf 3.0.4 as a service under Windows 7.
>
> karaf>wrapper:install -D "Apache Karaf service".
>
> As an Administrator i do :
> karaf-service.bat install
> net start "karaf"
>
> In the wrapper.log i see the error message:
> Erreur : impossible de trouver ou charger la classe principale
> org.apache.karaf.wrapper.internal.Main
>
> (In english : Error : impossible to find or load the main class
> org.apache.karaf.wrapper.internal.Main)
>
> In the directory : lib. The jar karaf-wrapper-main.jar exist.
> The etc\karaf-wrapper.conf seem correct:
> I just post the section with the classpath definition.
>
> #********************************************************************
> # Wrapper Properties
> #********************************************************************
> set.default.JAVA_HOME=C:\Program Files\Java\jdk1.8.0_11
> set.default.KARAF_HOME=C:\tools\apache-karaf-3.0.4
> set.default.KARAF_BASE=C:\tools\apache-karaf-3.0.4
> set.default.KARAF_DATA=C:\tools\apache-karaf-3.0.4\data
> set.default.KARAF_ETC=C:\tools\apache-karaf-3.0.4\bin\..\etc
>
> # Java Application
> wrapper.working.dir=%KARAF_BASE%
> wrapper.java.command=%JAVA_HOME%/bin/java
> wrapper.java.mainclass=org.apache.karaf.wrapper.internal.Main
> wrapper.java.classpath.1=%KARAF_HOME%/lib/karaf-wrapper.jar
> wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
> wrapper.java.classpath.4=%KARAF_HOME%/lib/karaf-jaas-boot.jar
> wrapper.java.classpath.5=%KARAF_HOME%/lib/karaf-wrapper-main.jar
> wrapper.java.classpath.6=%KARAF_HOME%/lib/karaf-org.osgi.core.jar
> wrapper.java.library.path.1=%KARAF_HOME%/lib/
>
> # Application Parameters.  Add parameters as needed starting from 1
> #wrapper.app.parameter.1=
>
> # JVM Parameters
> # note that n is the parameter number starting from 1.
> wrapper.java.additional.1=-Dkaraf.home="%KARAF_HOME%"
> wrapper.java.additional.2=-Dkaraf.base="%KARAF_BASE%"
> wrapper.java.additional.3=-Dkaraf.data="%KARAF_DATA%"
> wrapper.java.additional.4=-Dkaraf.etc="%KARAF_ETC%"
> wrapper.java.additional.5=-Dcom.sun.management.jmxremote
> wrapper.java.additional.6=-Dkaraf.startLocalConsole=false
> wrapper.java.additional.7=-Dkaraf.startRemoteShell=true
> wrapper.java.additional.8=-Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed"
> wrapper.java.additional.9=-Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext"
>
>
> Thanks for help
> --
> Philippe
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-4-Window-service-unable-to-load-or-find-org-apache-karaf-wrapper-internal-Main-tp4041819.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message