views:

176

answers:

2

Hi.

I'm trying to develop a jee+gxt application. I have an rpc call which calls a session bean's method. If I compile the project and run it in the browser, it works fine, but when I use hosted mode I get an exception like this: (edited for readability)

Exception while dispatching incoming RPC call

...

Caused by: java.lang.NullPointerException: null at org.Pecc.server.services.AppServiceImpl. getUserEmailByName(AppServiceImpl.java:53)

Line 53 is:

return appSessionBeanBean.getUserEmailByName(name);

It's like the session bean can't be reached. Note that I have GWT4NB plugin and use it's "GWT hosted mode (w/o a JEE server)" command, but I have glassfish running and the ejb module deployed in it. Shouldn't it be enough to work? If I remember right, I was able to use my ejb module in hosted mode at some point.

Any thoughts?

Thanks, Pecc

A: 

I hate to ask this, but are you able to debug and confirm the appSessionBeanBean is indeed not null? And if not, with log statements...

Stephane Grenier
it is indeed null, that's the problem. :)but it works completely in compiled mode.
Pecc
Did you debug/log the code to see where it's set in compiled mode?
Stephane Grenier
well, it is set to:appSessionBeanBean = ($Proxy40) sessionbeanek.AppSessionBeanLocal_14095549
Pecc
A: 

Hi. I found a workaround by redirecting the hosted mode browser to the module deployed in glassfish. I simply write localhost:8080/EasyTicket-web into the address bar instead of localhost:8888 (jetty's port.). Of course, glassfish has to be started for that to work.

Pecc
why don't you just do "Project/Debug"?
kaboom