[EJB/JBoss] - NullPointerException from LogInterceptor
by K.P.Seal
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
18 years, 1 month
[JBoss Seam] - is not mapped ?
by Andreh
I'm getting this Exception in the JBoss Seam debug page... and I don't have any idea of what could it be...
and I'm using jboss-seam-1.1.0.CR1
anonymous wrote :
| Exception during INVOKE_APPLICATION(5): java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: userentity is not mapped [select u.login from userentity u where u.login=:login]
my userentity ->
| import static org.jboss.seam.ScopeType.SESSION;
|
| import java.io.Serializable;
|
| import javax.persistence.Entity;
| import javax.persistence.Id;
| import javax.persistence.Table;
|
| import org.hibernate.validator.Length;
| import org.hibernate.validator.NotNull;
|
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
|
|
| @Entity
| @Name("userentity")
| @Scope(SESSION)
| @Table(name="users")
| public class UsuarioEntity implements Serializable {
|
| private static final long serialVersionUID = 0L;
| private String login;
| private String pass;
| private String email;
|
| public UsuarioEntity(){}
|
| @Id @Length(min=6,max=15)
| public String getLogin() {
| return login;
| }
| public void setLogin(String login) {
| this.login = login;
| }
| @NotNull @Length(min=6,max=15)
| public String getPass() {
| return pass;
| }
| public void setPass(String pass) {
| this.pass = pass;
| }
| @NotNull @Length(max=30)
| public String getEmail() {
| return email;
| }
| public void setEmail(String email) {
| this.email = email;
| }
| }
|
am I doing something wrong? =S
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991080#3991080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991080
18 years, 1 month
[JBossCache] - problems with jalapeno/cayenne JBC optimistic cache with inv
by nielsenk
After debugging and reading through the code, it seemed to me that jalapeno/cayenne JBC will always send an eviction on any put to the cache. The problem I am facing goes as follows:
I am using hibernate for persistence in a clustered environment. hibernate is running in side of a servlet container (SunONE to be specific). I planned on using JBC optimistically with asynchronous invalidations but when I run under this configuration I get the following problem:
A loads X.v1 from the database.
A sends invalidation(eviction) on put to local JBC (since B is empty no worries).
A has warm cache
B loads X.v1 from the database.
B sends invalidation(eviction) on put to local JBC.
B has warm cache
A evicts X.v1 from cache and now has a cold cache even though the data has not changed.
Is this a known issue/feature? I cant imagine we are the only organization that wishes to run under this configuration.
Looking at the code it seems that the InvalidationInterceptor only operates in this way (sending evictions).
I can send configs and such if need be.
Thanks in advance,
Keith.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991074#3991074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991074
18 years, 1 month