geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <>
Subject Re: Exception in thread "main" java.lang.NullPointerException?
Date Tue, 04 Dec 2007 14:37:33 GMT
On Dec 4, 2007 2:47 PM, beyondjusitn <> 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 Laskowski

View raw message