• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem with EJB3 MDB on JBoss 4.2.2 GA

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

@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:


 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

This is your answer to my last question,

Transaction Isolation


Regards,
Jose
 
His brain is the size of a cherry pit! About the size of this ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic