Hi while i'm trying to deploy grails 2.5.1
application on glassfish 4
the below error occurs and while i can't this error while running the application
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationFailureListener': Cannot resolve reference to bean 'loginAttemptsService' while setting bean property 'loginAttemptsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginAttemptsService': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
here what it's complain about :
class AuthenticationFailureListener implements ApplicationListener<AuthenticationFailureBadCredentialsEvent > {
def loginAttemptsService
@Override
public void onApplicationEvent(AuthenticationFailureBadCredentialsEvent e) {
loginAttemptsService.failLogin(e.authentication.name)
}
}
if found that when i commented the below in the resources.groovy
, i was able to deploy successfully.
beans = {
authenticationFailureListener(AuthenticationFailureListener) { loginAttemptsService = ref('loginAttemptsService') }
authenticationSuccessEventListener(AuthenticationSuccessEventListener) { loginAttemptsService = ref('loginAttemptsService') }
}
i can't see anything wrong , any recommendations
当我将groovy-all-xxx.jar
添加到glassfish/domains/MYDOMAIN/lib/ext
时,错误消失了
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.