[jboss-user] [EJB 3.0] - NullPointerException in HelloWorld

qbacomarch do-not-reply at jboss.com
Tue Jul 11 06:15:58 EDT 2006

I'am using NetBeans5.5 Beta, and latest JBoss 4.0.4GA Patch1.
My problem is, when trying to run simple HelloWorld application I have NPE message.
What do I do wrong or what should I do more?

here is
enterprise bean class:

package hello;
import javax.ejb.Stateless;
public class HelloBean implements hello.HelloRemote {    
    public HelloBean() {}    
    public String komunikat() {
        return "HelloWorld";

remote interface:

package hello;
import javax.ejb.Remote;
public interface HelloRemote {
    public String komunikat();

application client:

package hellojb;
import javax.annotation.EJB;
import hello.HelloRemote;
public class Main {    
    private static HelloRemote bin;   
    public Main() {
    public static void main(String[] args) {
        System.out.println("HERE: " + bin.komunikat()); //<----this line makes exception

Applicaton Deployed
Operation start started
Exception in thread "main" java.lang.NullPointerException
        at hellojb.Main.main(Main.java:35)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956932#3956932

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956932

More information about the jboss-user mailing list