1

尝试使用自定义身份验证器和登录模块对适配器进行身份验证时,我面临以下异常。

[ERROR   ] FWLST0003E: ========= Failed starting project /CustomAuth [project CustomAuth]
Error creating bean with name 'taskManager' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'worklightAuthenticationService' while setting bean property 'authenticationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklightAuthenticationService' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot create inner bean 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' of type [com.worklight.core.auth.impl.LoginConfigurationServiceBean] while setting bean property 'loginConfigurationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
[AUDIT   ] CWWKZ0001I: Application CustomAuth started in 0.948 seconds.
[ERROR   ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
    at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:300)
    at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:111)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
    at [internal classes]
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
    ... 5 more

你可以帮帮我吗?

4

3 回答 3

0

似乎您的项目战争由于某种原因不包含您的 java 类。我不知道为什么,需要更多信息,但我认为通过删除你的 bin 文件夹并重建所有工件,你将能够解决这个问题。

于 2014-06-16T11:19:58.683 回答
0

需要自己编写java类进行自定义认证。在编写自定义身份验证方法时,这些 java 类将充当身份验证器和挑战者。

请查找基于 HTTP 的自定义身份验证的文档

于 2016-03-08T11:48:54.357 回答
0

查看生成的二进制应用程序和 Worklight 服务器版本之间的 JDK 版本。您可以检查二进制文件是否在基于 Windows 或 Unix 的操作系统中生成,并重新部署您的应用程序,将服务器操作系统作为二进制应用程序的基础。

于 2016-03-03T21:55:39.187 回答