You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ivan (JIRA)" <ji...@apache.org> on 2011/01/18 05:02:43 UTC
[jira] Created: (GERONIMO-5759) New Thread is used for context
initialization in Tomcat 7.0.6
New Thread is used for context initialization in Tomcat 7.0.6
-------------------------------------------------------------
Key: GERONIMO-5759
URL: https://issues.apache.org/jira/browse/GERONIMO-5759
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Components: Tomcat
Affects Versions: 3.0
Reporter: Ivan
Assignee: Ivan
2011/1/18 Kevan Miller <ke...@gmail.com>
On Jan 17, 2011, at 5:30 AM, xuhaihong@apache.org wrote:
> Author: xuhaihong
> Date: Mon Jan 17 10:30:34 2011
> New Revision: 1059851
>
> URL: http://svn.apache.org/viewvc?rev=1059851&view=rev
> Log:
> use tomcat 7.0.6.0-SNAPSHOT
Tomcat 7.0.6 is going to require some work to integrate properly. At the moment, we're going to see errors like the following:
2011-01-17 17:35:34,915 ERROR [[/jsp21]] Exception sending context initialized event to listener instance of class org.apache.geronimo.openwebbeans.WebBeansConfigurationListener
java.lang.IllegalStateException: On a thread without an initialized context
at org.apache.geronimo.openwebbeans.GeronimoSingletonService.getContext(GeronimoSingletonService.java:62)
at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:56)
at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:31)
at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:52)
at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:114)
at org.apache.geronimo.openwebbeans.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:78)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Tomcat's new ClassLoader MemoryLeak avoidance code is using a temporary thread to configure/initialize the event listeners for the Context. So, things like JNDI and OpenWebBeans aren't going to work.
There isn't a switch that can control this Tomcat behavior. Nor do I see anyway to hook into the Tomcat processing to hook into this processing. Our best hope would be to add some additional integration code in our externals code and work on pushing this into Tomcat.
--kevan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (GERONIMO-5759) New Thread is used for context
initialization in Tomcat 7.0.6
Posted by "Ivan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan updated GERONIMO-5759:
---------------------------
Attachment: GERONIMO-5759.patch
Attach a patch to use a thread local to keep the contexts, and configure on the new thread, might need some changes on Tomcat codes.
> New Thread is used for context initialization in Tomcat 7.0.6
> -------------------------------------------------------------
>
> Key: GERONIMO-5759
> URL: https://issues.apache.org/jira/browse/GERONIMO-5759
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Tomcat
> Affects Versions: 3.0
> Reporter: Ivan
> Assignee: Ivan
> Attachments: GERONIMO-5759.patch
>
>
> 2011/1/18 Kevan Miller <ke...@gmail.com>
> On Jan 17, 2011, at 5:30 AM, xuhaihong@apache.org wrote:
> > Author: xuhaihong
> > Date: Mon Jan 17 10:30:34 2011
> > New Revision: 1059851
> >
> > URL: http://svn.apache.org/viewvc?rev=1059851&view=rev
> > Log:
> > use tomcat 7.0.6.0-SNAPSHOT
> Tomcat 7.0.6 is going to require some work to integrate properly. At the moment, we're going to see errors like the following:
> 2011-01-17 17:35:34,915 ERROR [[/jsp21]] Exception sending context initialized event to listener instance of class org.apache.geronimo.openwebbeans.WebBeansConfigurationListener
> java.lang.IllegalStateException: On a thread without an initialized context
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.getContext(GeronimoSingletonService.java:62)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:56)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:31)
> at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:52)
> at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:114)
> at org.apache.geronimo.openwebbeans.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:78)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
> Tomcat's new ClassLoader MemoryLeak avoidance code is using a temporary thread to configure/initialize the event listeners for the Context. So, things like JNDI and OpenWebBeans aren't going to work.
> There isn't a switch that can control this Tomcat behavior. Nor do I see anyway to hook into the Tomcat processing to hook into this processing. Our best hope would be to add some additional integration code in our externals code and work on pushing this into Tomcat.
> --kevan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5759) New Thread is used for context
initialization in Tomcat 7.0.6
Posted by "Ivan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984532#action_12984532 ]
Ivan commented on GERONIMO-5759:
--------------------------------
Thanks for the comments. Commit the changes to trunk at rev.1061595. From my eyes, an empty stack should not be an issue, will double check it whether I need to refresh my knowledge.
> New Thread is used for context initialization in Tomcat 7.0.6
> -------------------------------------------------------------
>
> Key: GERONIMO-5759
> URL: https://issues.apache.org/jira/browse/GERONIMO-5759
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Tomcat
> Affects Versions: 3.0
> Reporter: Ivan
> Assignee: Ivan
> Attachments: GERONIMO-5759.patch
>
>
> 2011/1/18 Kevan Miller <ke...@gmail.com>
> On Jan 17, 2011, at 5:30 AM, xuhaihong@apache.org wrote:
> > Author: xuhaihong
> > Date: Mon Jan 17 10:30:34 2011
> > New Revision: 1059851
> >
> > URL: http://svn.apache.org/viewvc?rev=1059851&view=rev
> > Log:
> > use tomcat 7.0.6.0-SNAPSHOT
> Tomcat 7.0.6 is going to require some work to integrate properly. At the moment, we're going to see errors like the following:
> 2011-01-17 17:35:34,915 ERROR [[/jsp21]] Exception sending context initialized event to listener instance of class org.apache.geronimo.openwebbeans.WebBeansConfigurationListener
> java.lang.IllegalStateException: On a thread without an initialized context
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.getContext(GeronimoSingletonService.java:62)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:56)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:31)
> at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:52)
> at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:114)
> at org.apache.geronimo.openwebbeans.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:78)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
> Tomcat's new ClassLoader MemoryLeak avoidance code is using a temporary thread to configure/initialize the event listeners for the Context. So, things like JNDI and OpenWebBeans aren't going to work.
> There isn't a switch that can control this Tomcat behavior. Nor do I see anyway to hook into the Tomcat processing to hook into this processing. Our best hope would be to add some additional integration code in our externals code and work on pushing this into Tomcat.
> --kevan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5759) New Thread is used for context
initialization in Tomcat 7.0.6
Posted by "Ivan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982998#action_12982998 ]
Ivan commented on GERONIMO-5759:
--------------------------------
Before I begun to change our integration codes, I temporarily remove the related codes, that will make our build work. And will try to check whether we could check some integration codes to adapt to the Tomcat's new changes.
> New Thread is used for context initialization in Tomcat 7.0.6
> -------------------------------------------------------------
>
> Key: GERONIMO-5759
> URL: https://issues.apache.org/jira/browse/GERONIMO-5759
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Tomcat
> Affects Versions: 3.0
> Reporter: Ivan
> Assignee: Ivan
>
> 2011/1/18 Kevan Miller <ke...@gmail.com>
> On Jan 17, 2011, at 5:30 AM, xuhaihong@apache.org wrote:
> > Author: xuhaihong
> > Date: Mon Jan 17 10:30:34 2011
> > New Revision: 1059851
> >
> > URL: http://svn.apache.org/viewvc?rev=1059851&view=rev
> > Log:
> > use tomcat 7.0.6.0-SNAPSHOT
> Tomcat 7.0.6 is going to require some work to integrate properly. At the moment, we're going to see errors like the following:
> 2011-01-17 17:35:34,915 ERROR [[/jsp21]] Exception sending context initialized event to listener instance of class org.apache.geronimo.openwebbeans.WebBeansConfigurationListener
> java.lang.IllegalStateException: On a thread without an initialized context
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.getContext(GeronimoSingletonService.java:62)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:56)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:31)
> at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:52)
> at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:114)
> at org.apache.geronimo.openwebbeans.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:78)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
> Tomcat's new ClassLoader MemoryLeak avoidance code is using a temporary thread to configure/initialize the event listeners for the Context. So, things like JNDI and OpenWebBeans aren't going to work.
> There isn't a switch that can control this Tomcat behavior. Nor do I see anyway to hook into the Tomcat processing to hook into this processing. Our best hope would be to add some additional integration code in our externals code and work on pushing this into Tomcat.
> --kevan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (GERONIMO-5759) New Thread is used for context
initialization in Tomcat 7.0.6
Posted by "Ivan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan resolved GERONIMO-5759.
----------------------------
Resolution: Fixed
Fix Version/s: 3.0
3.0-M2
Should be OK now.
> New Thread is used for context initialization in Tomcat 7.0.6
> -------------------------------------------------------------
>
> Key: GERONIMO-5759
> URL: https://issues.apache.org/jira/browse/GERONIMO-5759
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Tomcat
> Affects Versions: 3.0
> Reporter: Ivan
> Assignee: Ivan
> Fix For: 3.0-M2, 3.0
>
> Attachments: GERONIMO-5759.patch
>
>
> 2011/1/18 Kevan Miller <ke...@gmail.com>
> On Jan 17, 2011, at 5:30 AM, xuhaihong@apache.org wrote:
> > Author: xuhaihong
> > Date: Mon Jan 17 10:30:34 2011
> > New Revision: 1059851
> >
> > URL: http://svn.apache.org/viewvc?rev=1059851&view=rev
> > Log:
> > use tomcat 7.0.6.0-SNAPSHOT
> Tomcat 7.0.6 is going to require some work to integrate properly. At the moment, we're going to see errors like the following:
> 2011-01-17 17:35:34,915 ERROR [[/jsp21]] Exception sending context initialized event to listener instance of class org.apache.geronimo.openwebbeans.WebBeansConfigurationListener
> java.lang.IllegalStateException: On a thread without an initialized context
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.getContext(GeronimoSingletonService.java:62)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:56)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:31)
> at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:52)
> at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:114)
> at org.apache.geronimo.openwebbeans.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:78)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
> Tomcat's new ClassLoader MemoryLeak avoidance code is using a temporary thread to configure/initialize the event listeners for the Context. So, things like JNDI and OpenWebBeans aren't going to work.
> There isn't a switch that can control this Tomcat behavior. Nor do I see anyway to hook into the Tomcat processing to hook into this processing. Our best hope would be to add some additional integration code in our externals code and work on pushing this into Tomcat.
> --kevan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-5759) New Thread is used for context
initialization in Tomcat 7.0.6
Posted by "David Jencks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984454#action_12984454 ]
David Jencks commented on GERONIMO-5759:
----------------------------------------
This looks good to me. Is there any danger of a memory leak from empty stacks in the threadlocal from discarded threads?
> New Thread is used for context initialization in Tomcat 7.0.6
> -------------------------------------------------------------
>
> Key: GERONIMO-5759
> URL: https://issues.apache.org/jira/browse/GERONIMO-5759
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Tomcat
> Affects Versions: 3.0
> Reporter: Ivan
> Assignee: Ivan
> Attachments: GERONIMO-5759.patch
>
>
> 2011/1/18 Kevan Miller <ke...@gmail.com>
> On Jan 17, 2011, at 5:30 AM, xuhaihong@apache.org wrote:
> > Author: xuhaihong
> > Date: Mon Jan 17 10:30:34 2011
> > New Revision: 1059851
> >
> > URL: http://svn.apache.org/viewvc?rev=1059851&view=rev
> > Log:
> > use tomcat 7.0.6.0-SNAPSHOT
> Tomcat 7.0.6 is going to require some work to integrate properly. At the moment, we're going to see errors like the following:
> 2011-01-17 17:35:34,915 ERROR [[/jsp21]] Exception sending context initialized event to listener instance of class org.apache.geronimo.openwebbeans.WebBeansConfigurationListener
> java.lang.IllegalStateException: On a thread without an initialized context
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.getContext(GeronimoSingletonService.java:62)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:56)
> at org.apache.geronimo.openwebbeans.GeronimoSingletonService.get(GeronimoSingletonService.java:31)
> at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:52)
> at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:114)
> at org.apache.geronimo.openwebbeans.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:78)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
> at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
> Tomcat's new ClassLoader MemoryLeak avoidance code is using a temporary thread to configure/initialize the event listeners for the Context. So, things like JNDI and OpenWebBeans aren't going to work.
> There isn't a switch that can control this Tomcat behavior. Nor do I see anyway to hook into the Tomcat processing to hook into this processing. Our best hope would be to add some additional integration code in our externals code and work on pushing this into Tomcat.
> --kevan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.