aspose file tools*
The moose likes JBoss/WildFly and the fly likes Problem with EJB3 MDB on JBoss 4.2.2 GA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Problem with EJB3 MDB on JBoss 4.2.2 GA" Watch "Problem with EJB3 MDB on JBoss 4.2.2 GA" New topic
Author

Problem with EJB3 MDB on JBoss 4.2.2 GA

Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Hello,

I am getting the following exception


java.lang.NullPointerException
at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:49)
at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:87)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:112)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:107)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:65)
at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:111)
at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:49)
at org.jboss.ejb3.ThreadlocalPool.create(ThreadlocalPool.java:50)
at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:90)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
at $Proxy106.retrieve(Unknown Source)
at com.customerapp.web.CustomerList.getCustomers(CustomerList.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.apache.el.parser.AstValue.getValue(AstValue.java:97)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
... 50 more


in my web JSF 1.2 App

The app try to list Customers form a table with option of create, update and delete. When updating an MDB notify sending the
updated Customer entity object. And here is where I have got the exception.

This is my code,





And the backing bean that lists the customers,



How is the way to call the MDB on JBoss 4.2.2 GA?

Thanks in advance,
Jose
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

@Local
@Stateless
public class CustomerSessionBean implements CustomerSessionLocal


This piece is incorrect (although I am not sure whether that's the cause of the exception. You are marking the bean implementation as the Local interface. What you want is:




[My Blog] [JavaRanch Journal]
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Thank Jaikiran for the indication.

Yes I know JBoss 4.2.2 GA is a pretty old version but I am happy with it.
This was the J2EE container I used to learn Java. I choose it because I had in my
mind the possibility to go to JEE 5.

For JEE 5 what is the JBoss version you can recommend me?

Best Regards,
Jose
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

Jose Alvarez de Lara wrote:
For JEE 5 what is the JBoss version you can recommend me?


JBoss AS 5.1.0 is your best bet.
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Hi

I have installed JBoss 5.1.0. AS and configure MySQL as DefaultDS.

But on startup I can read from the console the following,


JBoss Messaging Warning: DataSource connection transaction isolation should be
READ_COMMITTED, but it is currently REPEATABLE_READ.
Using an isolation level less strict than READ_COMMITTED
may lead to data consistency problems.
Using an isolation level more strict than READ_COMMITTED
may lead to deadlock.


Where can I change this?

Regards,
Jose

PS:
Once I get my JBoss 5.0.1 I am going to try this example.
I will hope have no problems
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Hi,

This is your answer to my last question,

Transaction Isolation


Regards,
Jose
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with EJB3 MDB on JBoss 4.2.2 GA