簡體   English   中英

運行Seedstack應用程序時發生異常

[英]Exception while running Seedstack Application

我使用了Hibernate和JPA的種子堆棧依賴項來創建在數據庫上執行Crud操作的DAO服務。 我試圖通過SeedMain類的Eclipse中的Java應用程序啟動器啟動此Seedstack應用程序模塊。

In pom.xml  - dependecy for undertow is given.
    <dependency>
        <groupId>org.seedstack.seed</groupId>
        <artifactId>seed-web-undertow</artifactId>
    </dependency>

When executing the SeedMain class, I am getting the below error snakeyaml error:-
Exception in thread "main" java.lang.NoSuchMethodError: org.yaml.snakeyaml.DumperOptions.setSplitLines(Z)V
   at com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.buildDumperOptions(YAMLGenerator.java:259)
   at com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.<init>(YAMLGenerator.java:232)
   at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createGenerator(YAMLFactory.java:447)
   at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createGenerator(YAMLFactory.java:397)
   at org.seedstack.seed.core.internal.diagnostic.DefaultDiagnosticReporter.writeDiagnosticReport(DefaultDiagnosticReporter.java:75)
   at org.seedstack.seed.core.internal.diagnostic.DefaultDiagnosticReporter.writeDiagnosticReport(DefaultDiagnosticReporter.java:67)
   at org.seedstack.seed.core.internal.diagnostic.DiagnosticManagerImpl.dumpDiagnosticReport(DiagnosticManagerImpl.java:70)
   at org.seedstack.seed.core.SeedMain.handleException(SeedMain.java:68)
   at org.seedstack.seed.core.SeedMain.main(SeedMain.java:61)

根據我的理解,錯誤是由於snakeyaml的某些版本不一致引起的 ,但是對於Seedstack來說,因為依賴項的版本是由seedstack-bom依賴項解決的,所以我應該在哪里進行更改以解決錯誤。

提前致謝!

通過閱讀stacktrace,似乎您在啟動時遇到了一些錯誤,該錯誤由handleException()方法處理。 然后,此方法嘗試編寫YAML診斷報告,但由於您提到的snakeyaml版本問題而最終失敗。

您應該做兩件事:

  • 通過查看依賴關系樹來修復snakeyaml依賴關系問題。 此類問題通常是由某些使Maven選擇較舊版本的庫引起的。 SeedStack至少需要使用jackson-dataformat-yaml 2.9.4版本,而該版本至少需要使用snakeyaml 1.18。
  • 通過查看完整的堆棧跟蹤來修復另一個錯誤。 當無法編寫診斷報告時,原始異常仍會打印在控制台上(在stderr上)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM