[Security & JAAS/JBoss] - Re: Clustered SSO with SPNEGO/KERBEROS
by j_ri
Hello Thibault,
thanks for your answer.
Unfortunately your idea doesn't help me, because the problem is not the web-layer, but the ejb layer.
My web-application makes a call to a stateless session bean (on node1 of the cluster) and 15 minutes later it makes another call to the bean (but this time the call goes to node2 in the cluster).
The web-appliaction is clever enough to recognize that's the same user-session and still has the principal. But the call to the second ejb gets intercepted by JBoss and the username and credentials (which got distributed in the cluster) are validated again...but unfortunately the credentials are too old now (a standard kerberos service ticket has to be validated within 5 minutes after it has been requested).
The Solution would be that the "jboss.security:service=JaasSecurityManager" MBean, configured in the jboss-service.xml in the conf-dir of a JBoss Server doesn't replay username and credential from the cache, but just keeps the information that the current user is already authenticated.
best regards
Jochen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008148#4008148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008148
19 years, 2 months
[J2EE Design Patterns] - Re: Exception handling in Bulk calls
by kapil.singhal
Hello,
The following code snippet is getting Displet color detail in a single call based on Object Id. The second method getDipletColorDetails() is calling the above method getDispletColorDetail() in a for() loop for the no. of iterations. Now if there are 100 iterations and an exception is being raised after 50 iterations due to some error, what about the result of 50 iterations as I have already called the single(first) method 50 times. I want to store and return the result of the executed calls to the client before the exception is being raised.
| @WebMethod
| public DispletColorDetail getDispletColorDetail (int aSessionId, ObjectId aDispletId)
| {
| mLogger.debug("SessionId: ", aSessionId, "; getDispletColorDetail - DispletId: ", aDispletId);
|
| SessionObject session = validateSession(aSessionId, "getDispletColorDetail");
| validateNotNull(aDispletId, "getDispletColorDetail",
| "Please provide a valid Object id of a Displet, required for getting the DispletColorDetail.");
|
| Displet displet = demarshallDisplet(aDispletId);
|
| DispletColorDetail result = null;
| try
| {
| result = marshallColorDetail(displet);
| }
| catch (Exception e)
| {
| throwInternalError("getDispletColorDetail", e,
| "Unexpected error occurred while getting Displet Color Detail. Please contact Barco Customer Support.", "SessionId", aSessionId,
| "ObjectId", aDispletId);
| }
|
| mLogger.debug("Session: ", session, "; getDispletColorDetail returned, result: ", result);
| return result;
| }
|
|
| @WebMethod
| public DispletColorDetail[] getDispletColorDetails (int aSessionId, ObjectId[] aDispletIdList)
| {
| mLogger.debug("SessionId: ", aSessionId, "; getDispletColorDetails - DispletIdList: ", aDispletIdList);
|
| SessionObject session = validateSession(aSessionId, "getDispletColorDetails");
| validateNotNull(aDispletIdList, "getDispletColorDetails",
| "Please provide a valid ObjectId list of Displets, required for getting the corresponding DispletColorDetails.");
|
| DispletColorDetail[] result = new DispletColorDetail[aDispletIdList.length];
| for (int i = 0; i < aDispletIdList.length; i++)
| {
| result = getDispletColorDetail(aSessionId, aDispletIdList);
| }
|
| mLogger.debug("Session: ", session, "; getDispletColorDetails returned, result: ", result);
| return result;
| }
|
I hope I am able to clear the problem.
Please suggest.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008147#4008147
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008147
19 years, 2 months
[Javassist user questions] - Error in Using Log4j in Struts Application
by ashish.mishra16
Hi All,
I m using JBoss-4.0.4.GA. I m using Log4j for logging. When i deploy my application named MsgForum.war,I get the following error:
3:20:59,828 INFO [TomcatDeployer] deploy, ctxPath=/MsgForum, warUrl=.../deploy/MsgForum.war/
3:21:03,875 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apace.log4j.spi.ErrorHandler" variable.
3:21:03,875 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
3:21:03,875 ERROR [STDERR] log4j:ERROR [WebappClassLoader
delegate: false repositories:
/WEB-INF/classes/
---------> Parent Classloader:
java.net.FactoryURLClassLoader@1c83354
whereas object of type
3:21:03,875 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.No
AnnotationURLClassLoader@291aff].
3:21:03,984 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows.
3:21:03,984 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
I get the above said problems. I had placed the log4j.jar of JBoss lib directory to my application's lib directory. Please tell me what could be the problems
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008146#4008146
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008146
19 years, 2 months
[Installation, Configuration & Deployment] - java.lang.NoClassDefFoundError
by hussain_rangwala
hey peter
thanks for your reply it really helped my server is up and running fine...however i get an error when i click on the "submit" button of my web page...can you help me on this ..i am using jboss portal 2.4.0.GA and i have jdk 1.5 installed on my windows XP.....Thanks in advance for your reply
| 2007-01-30 11:59:41,025 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SETLAppName].[action]] Servlet.service() for servlet action threw exception
| java.lang.NoClassDefFoundError: com/infosys/j2ee/core/ServiceException
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
| at java.lang.Class.getConstructor0(Class.java:2640)
| at java.lang.Class.newInstance0(Class.java:321)
| at java.lang.Class.newInstance(Class.java:303)
| at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:145)
| at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:282)
| at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:220)
| at org.apache.portals.bridges.struts.PortletTilesRequestProcessor.process(PortletTilesRequestProcessor.java:50)
| at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
| at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
Kindly reply as soon as possible
Thanks and Regards
Hussain
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008142#4008142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008142
19 years, 2 months