[Security] - Re: Caller unauthorized on using a ejb3 statetlesssessionbea
by praenti
Hi,
What I have to if I want to use the WebAuthentication further? Do I have to change the complete login to Web based authentication? I've seen I need then j_security_check, but I always get then that this resource is not available from tomcat.
For now I tried to use the WebAuthetication but the user is not authenticated then. I only get this error:
| vwg.audi.cancard.MyApplicationException: User is not authenticated or the isUserInRole check failed at vwg.audi.cancard.ui.action.Login.execute(Login.java:177) 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:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) at
| ...
|
The code I used in my Struts2 action:
| if(username == null || password == null)
| throw new RuntimeException("username or password is null");
| WebAuthentication pwl = new WebAuthentication();
| pwl.login(username, password);
|
| //Only when there is web login, does the principal be visible
| log.info("User Principal="+ServletActionContext.getRequest().getUserPrincipal());
| //Some basic checks to see if the user who just did a programmatic login has a role of "AuthorizedUser"
| log.info("isUserInRole(Authorized User)="+ServletActionContext.getRequest().isUserInRole("AuthorizedUser"));
| if(ServletActionContext.getRequest().getUserPrincipal() == null || !ServletActionContext.getRequest().isUserInRole("AuthorizedUser"))
| throw new MyApplicationException("User is not authenticated or the isUserInRole check failed");
|
| //Log the user out
| pwl.logout();
|
| if(ServletActionContext.getRequest().getUserPrincipal() != null || ServletActionContext.getRequest().isUserInRole("AuthorizedUser"))
| throw new MyApplicationException("User is still authenticated or pass: isUserInRole(Authorized User)");
|
In my log I see these two lines:
| 10:21:16,515 INFO [Login] User Principal=null
| 10:21:16,531 INFO [Login] isUserInRole(Authorized User)=false
|
But now the output of my JAAS login module is missing. I think that this is not running anymore. Something is missing...
Regards,
Michael
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260010#4260010
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260010
16 years, 8 months
[JBoss Portal Users] - Facing issue whn tring to upgrade to Porlet-Bridge 2.0 jar
by kulasekara
Hi,
I've tried to sort the datatable column using sortBy attribute.But in the integrated multiple portlet environment it's causing some Ajax Script issue.
Some where in the forum discussion it's mentioned that this Ajax request will go into the application as HTTPServeltRequest instead of PortletRequest. So it returns a false value for the request.
and also I am advised to upgrade the Portlet-Bridge.jar to version 2.0 from 1.0. Upgrading this jar will solve the Ajax request issue.
I don't have much idea like upgrading the jars will resolve the sorting issue...and also request issue can anyone plz guide me in this issue.
And also I have tried to upgrade the Portlet-Bridge.jars 2.0.
It's causing some deployment issues.
I ve some quires need to be addressed..
1)Do i need to use portlet.tld 2.0 which uses JSR 286 Specification logic.
2)I think this Portlet.tld 2.0 version is available in portal-portlet-lib.jar.
3)Do I need to upgrade this portal-portlet-lib.jar also?
4)Is this JbossPortal 2.6 Aplication server support this upgradation or
5)Do i need to upgrade the Jboss Portal AS.
Kindly provide me some pointer or help me to resolve this quires and the issue...Appreciate your help...
Thanks
Pandiyan S
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260000#4260000
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260000
16 years, 8 months
[jBPM Users] - Re: java.lang.OutOfMemoryError: PermGen space how can i fix
by optixpro
=== Environment ==============================
- jBPM Version: JBPM3.3.1
=== Problem description =========================
when i open gwt-console
| 11:55:35,030 WARN [Parameters] Parameters: Invalid chunk ignored.
| 11:55:40,404 INFO [ReportFacade] BIRT home: /Users/OptixPro/Desktop/jboss-4.2.3.GA/server/default/data/birt/ReportEngine
| 11:55:40,404 INFO [ReportFacade] Output dir: /Users/OptixPro/Desktop/jboss-4.2.3.GA/server/default/data/birt/output/
| 11:55:40,405 INFO [ReportFacade] Report dir: /Users/OptixPro/Desktop/jboss-4.2.3.GA/server/default/data/birt/
| 11:55:44,099 INFO [BirtService] Service created: org.eclipse.birt.report.engine.api.impl.ReportEngine@264ab70a
| 11:55:45,623 WARN [Parameters] Parameters: Invalid chunk ignored.
| 11:55:54,487 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exception
| 11:55:56,589 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
| java.lang.OutOfMemoryError: PermGen space
| at java.lang.Throwable.getStackTraceElement(Native Method)
| at java.lang.Throwable.getOurStackTrace(Throwable.java:591)
| at java.lang.Throwable.printStackTraceAsCause(Throwable.java:529)
| at java.lang.Throwable.printStackTrace(Throwable.java:516)
| at org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:59)
| at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:342)
| at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:304)
| at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
| at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
| at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
| at org.apache.log4j.Category.callAppenders(Category.java:203)
| at org.apache.log4j.Category.forcedLog(Category.java:388)
| at org.apache.log4j.Category.log(Category.java:853)
| at org.jboss.logging.Log4jLoggerPlugin.error(Log4jLoggerPlugin.java:206)
| at org.jboss.logging.Logger.error(Logger.java:234)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| 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:637)
| 11:56:00,097 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exception
| org.jboss.resteasy.spi.UnhandledException: java.lang.OutOfMemoryError: PermGen space
| at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:307)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:218)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:194)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:352)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:182)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:90)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:66)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| 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:637)
| Caused by: java.lang.OutOfMemoryError: PermGen space
| 11:56:14,353 ERROR [STDERR] Exception in thread "State Saver"
|
may be gwt-console is not stable in jbpm3.x ?
thankyou for help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259993#4259993
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259993
16 years, 8 months