[jboss-user] [EJB/JBoss] - NullPointerException from LogInterceptor
K.P.Seal
do-not-reply at jboss.com
Mon Dec 4 14:35:59 EST 2006
Hi all,
I've been having a very frustrating problem with an EJB lately. The closest information I've been able to find elsewhere suggests that the problem is caused by something using Log4J incorrectly (doh!). However, since the stack trace indicates that the logging is being undertaken by JBoss' EJB LogInterceptor I'm left a little bit confused.
It would appear that a null message is making it as far as the underlying writer but I can't quite figure out why.
The EJB I've got looks up another EJB's home via JNDI. It then invokes the create method using reflection. It then invokes a business method on the created remote by reflection. Within this business method invocation an exception is thrown (subclass of EJBException) - it would appear to be JBoss' handling of this exception that is causing the NPE.
I'd be grateful for any light that you could cast onto this problem.
I'm using JBoss 4.0.4 GA and JDK 1.5.0.
Caused by: java.lang.NullPointerException
| at java.io.Writer.write(Writer.java:126)
| at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:39)
| at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:299)
| at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
| at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
| at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
| at org.apache.log4j.Category.callAppenders(Category.java:187)
| at org.apache.log4j.Category.forcedLog(Category.java:372)
| at org.apache.log4j.Category.log(Category.java:864)
| at org.jboss.logging.Log4jLoggerPlugin.error(Log4jLoggerPlugin.java:219)
| at org.jboss.logging.Logger.error(Logger.java:234)
| at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:308)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
| at org.jboss.ejb.Container.invoke(Container.java:954)
| at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
| at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
| at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:206)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:192)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy95.handleEvent(Unknown Source)
| ... 72 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991082#3991082
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991082
More information about the jboss-user
mailing list