• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic