4

我正在开发我的第一个使用 karaf 和 kafka 的应用程序,我只是创建了一个使用者,当我在 karaf 中运行我的应用程序时,它显示以下错误。

org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : An exception occurred processing Appender PaxOsgi Ignored FQCN: org.apache.logging.log4j.spi.AbstractLogger
java.lang.NullPointerException
        at org.apache.logging.log4j.util.StackLocator9.calcLocation(StackLocator9.java:80)
        at org.apache.logging.log4j.util.StackLocatorUtil.calcLocation(StackLocatorUtil.java:94)
        at org.apache.logging.log4j.core.impl.Log4jLogEvent.getSource(Log4jLogEvent.java:693)
        ...

这是我的 pom.xml。

<dependencies>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>6.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>2.3.1</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>3.3.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>
                            ${project.groupId}.${project.artifactId}
                        </Bundle-SymbolicName>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Bundle-Activator>
                            pfe7.pattern.PatternActivator
                        </Bundle-Activator>
                        <Private-Package>
                            pfe7.pattern
                        </Private-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
4

0 回答 0