我使用JSF2.0和hibernate开发了一个简单的演示Web应用程序。此Web应用程序使用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之间的区别是什么导致了我这些麻烦?
答案 0 :(得分:1)
解决! 这是一个愚蠢的错误。 在login-config.xml文件中,您需要添加此
<application-policy name="FileNetP8WSI">
<authentication>
<login-module code="com.filenet.api.util.WSILoginModule" flag="required"/>
</authentication>
</application-policy>
以便与Filenet进行通信。 我拼错了,这就是为什么它不起作用。
答案 1 :(得分:0)
您使用的是哪种传输协议? IIOP还是WSI?如果您正在使用WSI,那么您的应用程序理论上应该可行。您的CE托管在Jboss 6.0实例上,对吗?
我假设你正在使用IIOP传输协议。在这种情况下,您的客户端应用程序需要与服务器应用程序具有相同的J2EE库。我之前从未在Jboss上编写过FileNet客户端,但是使用WebLogic或WAS,您需要在客户端上使用与服务器上相同版本的.jar文件。例如,如果我正在编写一个与WebLogic系统上托管的CE进行通信的客户端,我需要在客户端上使用与服务器上托管的相同版本的weblogic.jar。
可以编写在不同版本的Jboss上运行的客户端作为CE,但是您需要使用WSI传输协议。好消息是您不需要进行任何代码更改 - 您只需要更改配置以使用WSI而不是IIOP。