Grails 2.4.3错误GrailsContextLoaderListener java.lang.NoClassDefFoundError:org / apache / xml / security / Init

时间:2017-01-24 15:09:33

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

执行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

如果您愿意,我可以提供更多详细信息,任何人都可以帮助解决这个问题的原因吗?

1 个答案:

答案 0 :(得分:0)

我缺少xmlsec lib,我通过添加

解决了这个问题
compile 'org.apache.santuario:xmlsec:2.0.8'

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