OSGi Karaf Spring 引导 2.1.4-发布错误
OSGi Karaf Spring Boot 2.1.4-Release Error
我正在尝试使用 Spring Boot 2.1.4 和 Java 8、OSGi 版本 5.0.0 和 Apache Karaf 4.1.3 构建 OSGi Karaf 应用程序。
我创建了以下 project in GitHub 当我使用 Spring Boot 1.5.9.
时构建和运行良好
但是当我将 Spring 引导版本从 1.5.9-RELEASE 更改为 2.1.4-RELEASE 并尝试执行 mvn clean install
时,我从 maven-bundle-插件
[WARNING] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Export com.nemesis.osgi.springboot, has 4, private references [com.nemesis.osgi.springboot.controller, org.springframework.context.annotation, org.springframework.boot, org.springframework.boot.autoconfigure],
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Invalid class file META-INF/versions/9/module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Classes found in the wrong directory: {META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class=org.apache.logging.log4j.util.StackLocator, META-INF/versions/9/org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class=org.apache.logging.log4j.util.internal.DefaultObjectInputFilter, META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class=org.apache.logging.log4j.util.ProcessIdUtil}
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Invalid class file module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
非常感谢任何帮助。
我认为错误是因为新的 spring 引导包或依赖项是 maven 包插件版本 3.3.0 尚无法处理的多版本 jar。
将 maven bundle 插件版本更新到 4.1.0 解决了我的问题。
我正在尝试使用 Spring Boot 2.1.4 和 Java 8、OSGi 版本 5.0.0 和 Apache Karaf 4.1.3 构建 OSGi Karaf 应用程序。
我创建了以下 project in GitHub 当我使用 Spring Boot 1.5.9.
时构建和运行良好但是当我将 Spring 引导版本从 1.5.9-RELEASE 更改为 2.1.4-RELEASE 并尝试执行 mvn clean install
时,我从 maven-bundle-插件
[WARNING] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Export com.nemesis.osgi.springboot, has 4, private references [com.nemesis.osgi.springboot.controller, org.springframework.context.annotation, org.springframework.boot, org.springframework.boot.autoconfigure],
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Invalid class file META-INF/versions/9/module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Classes found in the wrong directory: {META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class=org.apache.logging.log4j.util.StackLocator, META-INF/versions/9/org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class=org.apache.logging.log4j.util.internal.DefaultObjectInputFilter, META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class=org.apache.logging.log4j.util.ProcessIdUtil}
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Invalid class file module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.nemesis:osgi-spring-boot-demo-bundle:bundle:0.0.1-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
非常感谢任何帮助。
我认为错误是因为新的 spring 引导包或依赖项是 maven 包插件版本 3.3.0 尚无法处理的多版本 jar。 将 maven bundle 插件版本更新到 4.1.0 解决了我的问题。