Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Can't call ejb 3.1 form app client project in jboss 6.0 final

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to call an EJB 3.1 from a client project. If I use DI I get
a java.lang.NullPointerException,



On the other hand I can use JNDI as follows,



In this case I get a NamingException

In both cases the try-catch block is needed because publishNews() throws Exception.

The environment is formed for JBoss 6.0 Final integrated into Eclipse Helios SR1.

Please, witch is the solution?

Thanks in advance,
Jose
 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Here is my client,



And this is the exception I am getting now,


09-mar-2011 19:24:12 client.Main getContext
INFO: using server0\client-jndi.properties for jndi
log4j:WARN No appenders could be found for logger (org.jnp.interfaces.TimedSocketFactory).
log4j:WARN Please initialize the log4j system properly.
java.lang.NullPointerExceptionl
at client.Main.test(Main.java:36)
at client.Main.main(Main.java:21)



Please, help!!!

Kind regards,
Jose
 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,

I forgot to post the server0/client-jndi.properties file.

Here it is,



Thanks,
Jose
 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am basing my code in the information that EJB3.1 in AS 6.0.0.M2
from JBoss Community.

Please, help.

Jose
    Bookmark Topic Watch Topic
  • New Topic