【问题标题】:Grails 2.4.3 ERROR GrailsContextLoaderListener java.lang.NoClassDefFoundError: org/apache/xml/security/InitGrails 2.4.3 错误 GrailsContextLoaderListener java.lang.NoClassDefFoundError: org/apache/xml/security/Init
【发布时间】:2017-06-09 10:52:12
【问题描述】:

当我执行 grails run-app 时出现以下错误,我试图在本地运行我的 grails 应用程序但无法这样做

以下是 Stacktrace 的错误

堆栈跟踪

Configuring Spring Security Core ...
... finished configuring Spring Security Core
2017-01-24T07:52:41.255+05:00 uptime="19368", level="ERROR", class="org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener", thread="localhost-startStop-1:", message="Error initializing the application: org/apache/xml/security/Init"
java.lang.NoClassDefFoundError: org/apache/xml/security/Init
    at org.opensaml.DefaultBootstrap.initializeXMLSecurity(DefaultBootstrap.java:174)
    at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:90)
    at org.opensaml.PaosBootstrap.bootstrap(PaosBootstrap.java:27)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.xml.security.Init
    at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more

如果您愿意,我可以提供更多详细信息,有人可以帮忙说明为什么会这样吗?

【问题讨论】:

  • 检查是否有 xmlsec 库
  • 非常感谢 @SandeepPoonia 我在 BuildConfig.groovy 文件的依赖项中添加了 compile 'org.apache.santuario:xmlsec:2.0.8',它解决了我的问题 :)

标签: grails spring-security classnotfoundexception saml-2.0 grails-plugin


【解决方案1】:

我缺少 xmlsec 库,我通过添加解决了这个问题

compile 'org.apache.santuario:xmlsec:2.0.8'

在 BuildConfig.groovy 文件中的依赖项中,它解决了我的问题 :)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-11-10
    • 2022-10-26
    • 1970-01-01
    • 1970-01-01
    • 2014-12-06
    • 2019-04-06
    • 1970-01-01
    • 2015-10-14
    相关资源
    最近更新 更多