我使用 JSF2.0 和 hibernate 开发了一个简单的演示 Web 应用程序。这个 webapp 使用 IBM FileNet 4.5.1 来存储和检索上传的文件。如果我在 JBoss 6.0 上部署这个 webapp,一切正常。但是一位客户要求我将它部署在 JBoss 4.2.3 上进行评估……但它不起作用。当我尝试访问 IBM Filenet 时,我收到一个错误...这是堆栈跟踪:
17:32:47,353 INFO [STDOUT] 17:32:47,353 DEBUG JaasConfiguration:60 - Default JAAS Configuration:
HttpCredentials {
com.idoox.security.jaas.HttpLoginModule required;
}
FileNetP8Engine {
com.filenet.api.authentication.jboss.login.FnClientLoginModule required;
}
FCLMStackingHelper {
org.jboss.security.ClientLoginModule required;
}
NameMapping {
com.idoox.security.jaas.NameLoginModuleNoAuth required;
}
Credentials {
com.idoox.security.jaas.GSSLoginModule required;
}
KrbCredentials {
com.sun.security.auth.module.Krb5LoginModule required;
}
NamePasswordAN {
com.idoox.security.jaas.NamePasswordLoginModule required;
}
CertsMapping {
com.idoox.security.jaas.CertsLoginModule required;
}
CachedKrbCredentials {
com.sun.security.auth.module.Krb5LoginModule required;
}
NamePasswordNoAN {
com.idoox.security.jaas.NamePasswordLoginModuleNoAuth required;
}
FileNetP8WSI {
com.filenet.api.util.WSILoginModule required;
}
FileNetP8 {
com.filenet.api.authentication.jboss.login.FnClientLoginModule required;
}
ReceivedCredentials {
com.idoox.security.jaas.GSSLoginModuleNoAuth required;
}
FileNetP8Server {
com.filenet.api.authentication.jboss.login.FnClientLoginModule required;
}
HttpRequest {
com.idoox.security.jaas.SmLoginModule required;
}
FileNetP8KerberosService {
com.filenet.api.authentication.jboss.login.FnClientLoginModule required;
}
NameDigestAN {
com.idoox.security.jaas.NameDigestLoginModule required;
}
17:32:47,355 INFO [STDOUT] 17:32:47,355 DEBUG JaasConfiguration:206 - Configured JAAS entry found (Default not used) for: 'FileNetP8WSI' org.jboss.security.auth.spi.UsersRolesLoginModule required;
17:32:47,367 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
at org.jboss.security.auth.spi.Util.loadProperties(Util.java:315)
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:112)
at com.filenet.api.util.UserContext.createSubject(UserContext.java:240)
at alekso.filenet.ce.CEConnection.establishConnection(CEConnection.java:59)
at alekso.filenet.ce.WSIConnector.GetDocument(WSIConnector.java:89)
at Alekso.BasDemo.DAL.FileNetProxy.retrieveFile(FileNetProxy.java:43)
at Alekso.BasDemo.Servlet.DownloadServlet.doDownload(DownloadServlet.java:67)
at Alekso.BasDemo.Servlet.DownloadServlet.doGet(DownloadServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
17:32:47,417 INFO [STDOUT] 17:32:47,416 DEBUG EngineRuntimeException:207 - com.filenet.api.exception.EngineRuntimeException: E_NOT_AUTHENTICATED: The user is not authenticated.
at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:127)
at com.filenet.api.util.UserContext.createSubject(UserContext.java:240)
at alekso.filenet.ce.CEConnection.establishConnection(CEConnection.java:59)
at alekso.filenet.ce.WSIConnector.GetDocument(WSIConnector.java:89)
at Alekso.BasDemo.DAL.FileNetProxy.retrieveFile(FileNetProxy.java:43)
at Alekso.BasDemo.Servlet.DownloadServlet.doDownload(DownloadServlet.java:67)
at Alekso.BasDemo.Servlet.DownloadServlet.doGet(DownloadServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.security.auth.login.LoginException: Missing users.properties file.
at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:112)
... 26 more
17:32:47,421 INFO [STDOUT] 17:32:47,419 ERROR WSIConnector:100 - Errore nel documento con id {BDFCA4F2-B8C7-44EA-9481-4628C26A9DD5}
com.filenet.api.exception.EngineRuntimeException: E_NOT_AUTHENTICATED: The user is not authenticated.
at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:127)
at com.filenet.api.util.UserContext.createSubject(UserContext.java:240)
at alekso.filenet.ce.CEConnection.establishConnection(CEConnection.java:59)
at alekso.filenet.ce.WSIConnector.GetDocument(WSIConnector.java:89)
at Alekso.BasDemo.DAL.FileNetProxy.retrieveFile(FileNetProxy.java:43)
at Alekso.BasDemo.Servlet.DownloadServlet.doDownload(DownloadServlet.java:67)
at Alekso.BasDemo.Servlet.DownloadServlet.doGet(DownloadServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.security.auth.login.LoginException: Missing users.properties file.
at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:112)
... 26 more
17:32:47,421 INFO [STDOUT] 17:32:47,421 ERROR DownloadServlet:89 - Impossibile recuperare il file allegato
com.filenet.api.exception.EngineRuntimeException: E_NOT_AUTHENTICATED: The user is not authenticated.
at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:127)
at com.filenet.api.util.UserContext.createSubject(UserContext.java:240)
at alekso.filenet.ce.CEConnection.establishConnection(CEConnection.java:59)
at alekso.filenet.ce.WSIConnector.GetDocument(WSIConnector.java:89)
at Alekso.BasDemo.DAL.FileNetProxy.retrieveFile(FileNetProxy.java:43)
at Alekso.BasDemo.Servlet.DownloadServlet.doDownload(DownloadServlet.java:67)
at Alekso.BasDemo.Servlet.DownloadServlet.doGet(DownloadServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.security.auth.login.LoginException: Missing users.properties file.
at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:112)
... 26 more
有人可以提出解决方案吗?堆栈跟踪讨论了 users.properties 文件,但我在 JBoss 6.0 中也没有。如果我真的需要创建一个来让 JBoss 4.2.3 工作,我应该在里面放什么?我在我的代码中配置了与 FileNet 的连接,从其他地方读取参数...... jboss 4.2.3 和 jboss 6.0 之间有什么区别导致我遇到这些麻烦?