This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Can't call ejb 3.1 form app client project in jboss 6.0 final Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Can Watch "Can New topic
Author

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

Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
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

Joined: May 10, 2008
Posts: 92
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

Joined: May 10, 2008
Posts: 92
Sorry,

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

Here it is,



Thanks,
Jose
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
Hi,

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

Please, help.

Jose
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Can't call ejb 3.1 form app client project in jboss 6.0 final
 
It's not a secret anymore!