[JBoss JIRA] (JBSEAM-5109) Problem when deploying application with already initialized EJB Timer
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5109?page=com.atlassian.jira.plugi... ]
Marek Novotny updated JBSEAM-5109:
----------------------------------
Priority: Minor (was: Major)
> Problem when deploying application with already initialized EJB Timer
> ---------------------------------------------------------------------
>
> Key: JBSEAM-5109
> URL: https://issues.jboss.org/browse/JBSEAM-5109
> Project: Seam 2
> Issue Type: Bug
> Affects Versions: 2.3.1.CR1
> Reporter: Tomas Remes
> Assignee: Marek Novotny
> Priority: Minor
> Fix For: 2.3.2.CR1
>
>
> There occurs following exception, when deploying previously undeployed application, which has initialized some interval EJB Timer. Problem is that the initialization of Timer happens before the Seam initialization.
> {noformat}
> 08:13:03,533 ERROR [org.jboss.as.ejb3] (EJB default - 4) JBAS014122: Error during retrying timeout for timer: [id=9b570b93-583e-461e-82d7-cc509a22c337 timedObjectId=seam-ejbtimer.ejbtimer-ejb.PaymentProcessor auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@4a88b729 initialExpiration=Thu May 30 08:12:00 CEST 2013 intervalDuration(in milli sec)=5000 nextExpiration=Thu May 30 08:13:05 CEST 2013 timerState=RETRY_TIMEOUT: javax.ejb.EJBException: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.tx.TimerCMTTxInterceptor.handleExceptionInOurTx(TimerCMTTxInterceptor.java:53) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:250) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:315) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:101) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:111) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.timerservice.task.TimerTask.callTimeout(TimerTask.java:157) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.timerservice.task.TimerTask.retryTimeout(TimerTask.java:184) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.timerservice.task.TimerTask.run(TimerTask.java:140) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_17]
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_17]
> at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_17]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
> at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
> Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
> at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:67) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:64) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.pool.AbstractPool.create(AbstractPool.java:60) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:123) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> ... 26 more
> Caused by: javax.ejb.EJBException: java.lang.NullPointerException
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:250) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:339) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> ... 34 more
> Caused by: java.lang.NullPointerException
> at org.jboss.seam.intercept.RootInterceptor.init(RootInterceptor.java:50)
> at org.jboss.seam.intercept.SessionBeanInterceptor.postConstruct(SessionBeanInterceptor.java:109)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
> at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
> at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:118) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:115) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
> ... 43 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 3 months
[JBoss JIRA] (JBSEAM-5124) HTTP Basic Authentication causes a hidden IllegalStateException
by Georgi Gyurchev (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5124?page=com.atlassian.jira.plugi... ]
Georgi Gyurchev edited comment on JBSEAM-5124 at 8/23/13 5:45 AM:
------------------------------------------------------------------
Added workaround classes
was (Author: gesh92):
Workaround classes
> HTTP Basic Authentication causes a hidden IllegalStateException
> ---------------------------------------------------------------
>
> Key: JBSEAM-5124
> URL: https://issues.jboss.org/browse/JBSEAM-5124
> Project: Seam 2
> Issue Type: Bug
> Components: Security
> Affects Versions: 2.3.1.CR1, 2.3.1.Final
> Environment: JBOSS AS 7.0.2
> JSF 2.1
> Richfaces 4.3.2
> Reporter: Georgi Gyurchev
> Attachments: AuthenticationFilter.java, ContextualHttpServletRequest.java
>
>
> The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
> The user is likely to not see this but it shows in the console and can mess with other functionality.
> ------------------------------------------------------
> I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
> chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
> ------------------------------------------------------
> The workaround is to make your own filter. I will attach my fix here. To use a custom filter you must specify it in web.xml:
> <filter>
> <filter-name>Basic Authentication Filter</filter-name>
> <filter-class>com.something.AuthenticationFilter</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Basic Authentication Filter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (JBSEAM-5124) HTTP Basic Authentication causes a hidden IllegalStateException
by Georgi Gyurchev (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5124?page=com.atlassian.jira.plugi... ]
Georgi Gyurchev updated JBSEAM-5124:
------------------------------------
Description:
The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
The user is likely to not see this but it shows in the console and can mess with other functionality.
------------------------------------------------------
I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
------------------------------------------------------
The workaround is to make your own filter. I will attach my fix here. To use a custom filter you must specify it in web.xml:
<filter>
<filter-name>Basic Authentication Filter</filter-name>
<filter-class>com.something.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Basic Authentication Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
was:
The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
The user is likely to not see this but it shows in the console and can mess with other functionality.
------------------------------------------------------
I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
------------------------------------------------------
The workaround is to make your own filter. I will attach my fix here. To use a custom filter you must specify it in web.xml:
<filter>
<filter-name>Basic Authentication Filter</filter-name>
<filter-class>eu.cleversoft.infonds3.support.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Basic Authentication Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
> HTTP Basic Authentication causes a hidden IllegalStateException
> ---------------------------------------------------------------
>
> Key: JBSEAM-5124
> URL: https://issues.jboss.org/browse/JBSEAM-5124
> Project: Seam 2
> Issue Type: Bug
> Components: Security
> Affects Versions: 2.3.1.CR1, 2.3.1.Final
> Environment: JBOSS AS 7.0.2
> JSF 2.1
> Richfaces 4.3.2
> Reporter: Georgi Gyurchev
> Attachments: AuthenticationFilter.java, ContextualHttpServletRequest.java
>
>
> The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
> The user is likely to not see this but it shows in the console and can mess with other functionality.
> ------------------------------------------------------
> I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
> chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
> ------------------------------------------------------
> The workaround is to make your own filter. I will attach my fix here. To use a custom filter you must specify it in web.xml:
> <filter>
> <filter-name>Basic Authentication Filter</filter-name>
> <filter-class>com.something.AuthenticationFilter</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Basic Authentication Filter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (JBSEAM-5124) HTTP Basic Authentication causes a hidden IllegalStateException
by Georgi Gyurchev (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5124?page=com.atlassian.jira.plugi... ]
Georgi Gyurchev updated JBSEAM-5124:
------------------------------------
Attachment: AuthenticationFilter.java
ContextualHttpServletRequest.java
Workaround classes
> HTTP Basic Authentication causes a hidden IllegalStateException
> ---------------------------------------------------------------
>
> Key: JBSEAM-5124
> URL: https://issues.jboss.org/browse/JBSEAM-5124
> Project: Seam 2
> Issue Type: Bug
> Components: Security
> Affects Versions: 2.3.1.CR1, 2.3.1.Final
> Environment: JBOSS AS 7.0.2
> JSF 2.1
> Richfaces 4.3.2
> Reporter: Georgi Gyurchev
> Attachments: AuthenticationFilter.java, ContextualHttpServletRequest.java
>
>
> The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
> The user is likely to not see this but it shows in the console and can mess with other functionality.
> ------------------------------------------------------
> I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
> chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
> ------------------------------------------------------
> The workaround is to make your own filter. I will attach my fix here. To use a custom filter you must specify it in web.xml:
> <filter>
> <filter-name>Basic Authentication Filter</filter-name>
> <filter-class>eu.cleversoft.infonds3.support.AuthenticationFilter</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Basic Authentication Filter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (JBSEAM-5124) HTTP Basic Authentication causes a hidden IllegalStateException
by Georgi Gyurchev (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5124?page=com.atlassian.jira.plugi... ]
Georgi Gyurchev updated JBSEAM-5124:
------------------------------------
Description:
The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
The user is likely to not see this but it shows in the console and can mess with other functionality.
------------------------------------------------------
I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
------------------------------------------------------
The workaround is to make your own filter. I will attach my fix here. To use a custom filter you must specify it in web.xml:
<filter>
<filter-name>Basic Authentication Filter</filter-name>
<filter-class>eu.cleversoft.infonds3.support.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Basic Authentication Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
was:
The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
The user is likely to not see this but it shows in the console and can mess with other functionality.
------------------------------------------------------
I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
------------------------------------------------------
The workaround is to make your own filter. I will post details in the forum topic because I don't see any options for attachments here.
> HTTP Basic Authentication causes a hidden IllegalStateException
> ---------------------------------------------------------------
>
> Key: JBSEAM-5124
> URL: https://issues.jboss.org/browse/JBSEAM-5124
> Project: Seam 2
> Issue Type: Bug
> Components: Security
> Affects Versions: 2.3.1.CR1, 2.3.1.Final
> Environment: JBOSS AS 7.0.2
> JSF 2.1
> Richfaces 4.3.2
> Reporter: Georgi Gyurchev
>
> The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
> The user is likely to not see this but it shows in the console and can mess with other functionality.
> ------------------------------------------------------
> I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
> chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
> ------------------------------------------------------
> The workaround is to make your own filter. I will attach my fix here. To use a custom filter you must specify it in web.xml:
> <filter>
> <filter-name>Basic Authentication Filter</filter-name>
> <filter-class>eu.cleversoft.infonds3.support.AuthenticationFilter</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Basic Authentication Filter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (JBSEAM-5124) HTTP Basic Authentication causes a hidden IllegalStateException
by Georgi Gyurchev (JIRA)
Georgi Gyurchev created JBSEAM-5124:
---------------------------------------
Summary: HTTP Basic Authentication causes a hidden IllegalStateException
Key: JBSEAM-5124
URL: https://issues.jboss.org/browse/JBSEAM-5124
Project: Seam 2
Issue Type: Bug
Components: Security
Affects Versions: 2.3.1.Final, 2.3.1.CR1
Environment: JBOSS AS 7.0.2
JSF 2.1
Richfaces 4.3.2
Reporter: Georgi Gyurchev
The built-in Authentication filter causes "javax.servlet.ServletException: java.lang.IllegalStateException: No active event context" on every page that goes through the filter. At least for basic authentication.
The user is likely to not see this but it shows in the console and can mess with other functionality.
------------------------------------------------------
I have gone through the Seam classes AuthenticationFilter and ContextualHttpServletRequest and figured out where the problem lies:
chain.doFilter() is called between the start and the end of the request and when ContextualHttpServletRequest tries to end the request, the context is not active anymore, I'm not sure exactly why but it seems logical. I'm also not sure why it worked it Seam 2.2.
------------------------------------------------------
The workaround is to make your own filter. I will post details in the forum topic because I don't see any options for attachments here.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months