ejb@glassfish.java.net

Re: question on entity relation. - unidirectional

From: Ian Evans <Ian.Evans_at_Sun.COM>
Date: Mon, 17 Mar 2008 13:00:50 -0700

Eve Pokua wrote:
> I forgot to copy in the error:
>
> Caught an exception in createData():
> java.lang.NullPointerException
> at order.client.OrderClient.createData(OrderClient.java:62)
> at order.client.OrderClient.main(OrderClient.java:52)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
> at
> com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:417)
> at
> com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
> at com.sun.enterprise.appclient.Main.main(Main.java:200)
> Caught an exception in printData():
> java.lang.NullPointerException
> at order.client.OrderClient.printData(OrderClient.java:165)
> at order.client.OrderClient.main(OrderClient.java:53)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.sun.enterprise.util.Utility.invokeApplicationMain(Utili
>
>
>
> ------------------------------------------------------------------------
> From: gorgeous65_at_msn.com
> To: persistence_at_glassfish.dev.java.net
> CC: ejb_at_glassfish.dev.java.net
> Date: Sat, 15 Mar 2008 15:17:36 +0000
> Subject: RE: question on entity relation. - unidirectional
>
> Hello everyone,
>
> I have tried testing the order project which comes with JEE5
> tutorial and
> it seems to be giving exactly the same error. Is this something to do
> with netbeans6? I am using this to deploy my project.

Check your GlassFish logs (which should be visible in NetBeans on
deployment) to trace the error. I've deployed order many times using
NetBeans 6 with no problems.

Did you create the database tables for order as described here?
http://java.sun.com/javaee/5/docs/tutorial/doc/bnbrt.html#bnbsm

I suspect that is the problem here.

-ian
-- 
Ian Evans
ian dot evans at sun dot com
Java EE technical documentation