geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beyondjusitn <beyondjus...@gmail.com>
Subject Re: Exception in thread "main" java.lang.NullPointerException?
Date Tue, 04 Dec 2007 15:23:22 GMT

Sorry, but could you be more specific? You know, I'm rather naive, very new
to Java EE. Could you write something like 5-minutes tutorial?

Thanks a lot.

Jacek Laskowski wrote:
> 
> On Dec 4, 2007 2:47 PM, beyondjusitn <beyondjustin@gmail.com> wrote:
>>
>> I followed the 5-minute Tutorial on Enterprise Application Development
>> with
>> Eclipse and Geronimo. And in my web client the EJB works fine. However,
>> when
>> I tested it in my application client, as following:
>> public class Main{
>>         @EJB
>>         private static RemoteBusinessInterface remoteBusinessIntf;
>>         public static void main(String[] args) {
>>                 
>> System.out.println(remoteBusinessIntf.sayHello("justin"));
>>         }
>> I got this error:Exception in thread "main"
>> java.lang.NullPointerException.
> 
> I've realized I didn't answer your question, so here it goes again. It
> won't work unless you're using the concept of javaee5 application
> client where DI (dependency injection) works. You should deploy your
> application with an application client and run client.jar with the
> module id of the application you deploy. It should be clearer now ;-)
> 
> Jacek
> 
> -- 
> Jacek Laskowski
> http://www.JacekLaskowski.pl
> 
> 


-----
--
Best Wishes!
Justin Tsao
-- 
View this message in context: http://www.nabble.com/Exception-in-thread-%22main%22-java.lang.NullPointerException--tf4943169s134.html#a14152277
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message