如何在简单的Spring Web MVC应用程序中解决错误bsh导入

时间:2019-05-25 00:57:33

标签: jetty osgi spring-web

带有OSGi的码头上的简单Spring应用程序。

https://github.com/pkolanda/simple-spring-web-app

我的应用程序代码在上面的git repo中可用。当我在带有OSGi服务器的码头中部署此代码时,出现以下错误。

eclipse.buildId=unknown
java.version=1.8.0_212
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -console -consoleLog

!ENTRY simple-spring-web-app 4 0 2019-05-25 00:49:03.695
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: simple-spring-web-app [32]
  Unresolved requirement: Import-Package: bsh

    at org.eclipse.osgi.container.Module.start(Module.java:451)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1763)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1725)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1656)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)

!ENTRY org.eclipse.osgi 4 0 2019-05-25 00:49:03.700
!MESSAGE Bundle initial@reference:file:plugins/simple-spring-web-app-1.0-SNAPSHOT.jar was not resolved.

我尝试解决此错误,但无法完全解决。我试图添加bsh; resolution:=可选,*  在pom文件中。但是它一直在询问其他依赖项。

运行代码: mvn clean安装并在target / simple0web-app-0.1文件夹下运行run.sh shell脚本。

任何帮助都会真正有帮助。

0 个答案:

没有答案