grails run-war 错误
我有 grails 应用程序,并且在执行 run-app 时 - 一切正常!但是之后: grails run-war ,我收到以下错误:
Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'd1LdapServer': Invocation of init method failed; nested exception is groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#. Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between: [class java.io.File, class java.lang.String] [class java.lang.String, class java.lang.String] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#. Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between: [class java.io.File, class java.lang.String] [class java.lang.String, class java.lang.String] at grails.ldap.server.TransientGrailsLdapServer.getWorkDir(TransientGrailsLdapServer.groovy:265) at grails.ldap.server.TransientGrailsLdapServer.startDirectoryService(TransientGrailsLdapServer.groovy:208) at grails.ldap.server.TransientGrailsLdapServer.start(TransientGrailsLdapServer.groovy:79) at grails.ldap.server.TransientGrailsLdapServer.afterPropertiesSet(TransientGrailsLdapServer.groovy:67)
感谢任何帮助。谢谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 tomcat 上部署时,“ldap-server”插件也有同样的问题。
对我来说,修复方法是通过 ApplicationHolder 提供 servletContext
:
使用:
TransientGrailsLdapServer.getWorkDir() 的完整源代码:
Had the same problem with the "ldap-server" plugin when deploying on a tomcat.
For me the fix was to provide the servletContext via the ApplicationHolder
instead:
use:
full source for the TransientGrailsLdapServer.getWorkDir():
行中的基本参数为 null 引起的
new File(base, "ldap-servers/$beanName")
该问题是由grails.ldap.server.TransientGrailsLdapServer.getWorkDir() 中的
,这表明配置问题,也许存在一些问题您的环境之间的差异导致基本参数为空?
The problem is caused by the base argument being null in the line
new File(base, "ldap-servers/$beanName")
in grails.ldap.server.TransientGrailsLdapServer.getWorkDir()
This points to a configuration issue, perhaps there is some difference between your environments that is causing the base argument to be null?