[ 
https://issues.apache.org/jira/browse/KARAF-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411452#comment-13411452
 ] 

Scott Thorsons commented on KARAF-384:
--------------------------------------

When I get a problem with Tomcat, I found couple of different pages on this 
topic. Quite complicated stuff to me. Though, I surprisingly found some 
solution that fit my needs and luck of experience at 
http://www.windows-cannot-find.com/337/windows-cannot-find-djava-endorsed-dirs-error-fix/.
    
                
> Cannot find some jar in ext directory
> -------------------------------------
>
>                 Key: KARAF-384
>                 URL: https://issues.apache.org/jira/browse/KARAF-384
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.1.2
>         Environment: Cygwin on window
>            Reporter: Stephane Chomat
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 2.1.4, 2.2.0, 3.0.0
>
>         Attachments: karaf
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> the script karaf has a bug.
> You must convert JAVA_HOME with cygwin path. And may be change the path 
> separator to ";" instead ":".
> Java runtime (jce and jsse) cannot find some security providers in some jars 
> located in the directory ext.
> And it raised aclass not found exception.
> The problem is the properties 'java.endorsed.dirs' and 'java.ext.dirs' are 
> poorly converted in cygwin environnement.
> I propose these changes :
> 1. convert JAVA_HOME path
> 2. and change the path separtor to ";" if you are on cygwin and else ":"
> JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
> SEP=";"
> + SEP=":"
> if $cygwin; then
>     KARAF_HOME=`cygpath --path --windows "$KARAF_HOME"`
>     KARAF_BASE=`cygpath --path --windows "$KARAF_BASE"`
>     KARAF_DATA=`cygpath --path --windows "$KARAF_DATA"`
>     CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
> +     JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
> +     SEP=";"
> fi
> cd $KARAF_BASE
> + exec $JAVA $JAVA_OPTS 
> -Djava.endorsed.dirs="${JAVA_HOME}/jre/lib/endorsed$SEP${JAVA_HOME}/lib/endorsed$SEP${KARAF_HOME}/lib/endorsed"
>  
> -Djava.ext.dirs="${JAVA_HOME}/jre/lib/ext$SEP${JAVA_HOME}/lib/ext$SEP${KARAF_HOME}/lib/ext"
>  -Dkaraf.instances="${KARAF_HOME}/instances" -Dkaraf.home="$KARAF_HOME" 
> -Dkaraf.base="$KARAF_BASE" -Dkaraf.data="$KARAF_DATA" 
> -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties 
> $OPTS -classpath "$CLASSPATH" $MAIN "$@"
> - exec $JAVA $JAVA_OPTS 
> -Djava.endorsed.dirs="${JAVA_HOME}/jre/lib/endorsed:${JAVA_HOME}/lib/endorsed:${KARAF_HOME}/lib/endorsed"
>  
> -Djava.ext.dirs="${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext:${KARAF_HOME}/lib/ext"
>  -Dkaraf.instances="${KARAF_HOME}/instances" -Dkaraf.home="$KARAF_HOME" 
> -Dkaraf.base="$KARAF_BASE" -Dkaraf.data="$KARAF_DATA" 
> -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties 
> $OPTS -classpath "$CLASSPATH" $MAIN "$@"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to