• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jose Alvarez de Lara
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic