Search code examples
apache-karaf

Apache Karaf ColorPalette error in windows


Apache Karaf 4.3.0 in windows 10. I try to install a feature and got the below error, could anyone help me to find what could cause this error. It comes out the shell as well. After that if I again start, I get the same error and stops.

...\apache-karaf-4.3.0\bin>karaf
karaf.bat: Ignoring predefined value for KARAF_HOME
karaf.bat: KARAF_LOG doesn't exist: "...\sw\apache-karaf-4.3.0\bin\..\data\log"
karaf.bat: Creating "...\sw\apache-karaf-4.3.0\bin\..\data\log"
karaf.bat: JAVA_HOME not set; results may vary


  Apache Karaf (4.3.0)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.

karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-blueprint-example-features/LATEST/xml
Adding feature url mvn:org.apache.karaf.examples/karaf-blueprint-example-features/LATEST/xml
karaf@root()> feature:install karaf-blueprint-example-provider
Error executing command: Method org/apache/karaf/shell/impl/console/JLineTerminal.getPalette()Lorg/jline/utils/ColorPalette; is abstract

Solution

  • According to https://issues.apache.org/jira/browse/KARAF-6996 you can try adding the Karaf 4.3.1-SNAPSHOT repositories to the blacklisted repositories.

    Just add etc/org.apache.karaf.features.xml containing:

    <?xml version="1.0" encoding="UTF-8"?>
    <featuresProcessing xmlns="http://karaf.apache.org/xmlns/features-processing/v1.0.0">
    
        <!--
            Licensed to the Apache Software Foundation (ASF) under one or more
            contributor license agreements.  See the NOTICE file distributed with
            this work for additional information regarding copyright ownership.
            The ASF licenses this file to You under the Apache License, Version 2.0
            (the "License"); you may not use this file except in compliance with
            the License.  You may obtain a copy of the License at
    
    
                http://www.apache.org/licenses/LICENSE-2.0
    
    
            Unless required by applicable law or agreed to in writing, software
            distributed under the License is distributed on an "AS IS" BASIS,
            WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
            See the License for the specific language governing permissions and
            limitations under the License.
        -->
    
        <blacklistedRepositories>
            <repository>mvn:org.apache.karaf.features/framework/4.3.1-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/standard/4.3.1-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/enterprise/4.3.1-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/enterprise-legacy/4.3.1-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/spring/4.3.1-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/spring-legacy/4.3.1-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/framework/4.3.0-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/standard/4.3.0-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/enterprise/4.3.0-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/enterprise-legacy/4.3.0-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/spring/4.3.0-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/spring-legacy/4.3.0-SNAPSHOT/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/framework/4.3.0.RC1/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/standard/4.3.0.RC1/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/enterprise/4.3.0.RC1/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/enterprise-legacy/4.3.0.RC1/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/spring/4.3.0.RC1/xml/features</repository>
            <repository>mvn:org.apache.karaf.features/spring-legacy/4.3.0.RC1/xml/features</repository>
        </blacklistedRepositories>
    
    </featuresProcessing> 
    

    This worked for me.