You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jim O'Rourke <Ji...@zoominternet.net> on 2010/11/08 19:39:20 UTC

OpenEJB 3.2-SNAPSHOT TomcatThreadContextListener exception filling log

The openejb.log file under Tomcat is filling with stack traces similar to the following:

2010-11-04 11:48:00,328 - ERROR - Exception in method getThreadName
java.lang.reflect.InvocationTargetException
 at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.openejb.tomcat.catalina.TomcatThreadContextListener.getThreadName(TomcatThreadContextListener.java:117)
 at org.apache.openejb.tomcat.catalina.TomcatThreadContextListener.contextEntered(TomcatThreadContextListener.java:77)
 at org.apache.openejb.core.ThreadContext.enter(ThreadContext.java:56)
 at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:154)
 at org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:249)
 at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:232)
 at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:89)
 at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:274)
 at $Proxy79.findById(Unknown Source)
 at portfolio.jsf.utils.PortfolioEntityConverter.getAsObject(PortfolioEntityConverter.java:68)
 at com.icesoft.faces.renderkit.dom_html_basic.DomBasicInputRenderer.getConvertedValue(DomBasicInputRenderer.java:97)
 at com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:131)
 at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
[snip]
Caused by: javax.naming.NamingException: No naming context bound to this thread
 at org.apache.naming.ContextBindings.getThreadName(ContextBindings.java:214)
 ... 58 more


Tailing the log, it seemed that every call to an EJB method generated a similar entry - 10 minutes playing in one app and my seven 1mb backups were full(JSF loves calling it's getters!). Stepping through the code, every instance of this exception I stopped at was tied to the listener being called with an oldContext of null.

The attached patch silently ignores a thrown InvocationTargetException when oldContext==null, and continues to log anything else.  I suspect you could just drop the log statement entirely, but, I'm sure I don't know enough about it to suspecting anything.

I've been running it almost a week now, and have yet to notice anything else logged.  I only use Singleton and Stateless EJBs, primarily for JPA entity CRUD, with EJBs deployed as either webapp classes or as a webapp jar.

BTW, Love having the TimerService.createCalendarTimer...

Keep up the good work!

Jim