quality@glassfish.java.net

Re: Nasty null pointer exception on deploy

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Thu, 17 Dec 2009 19:14:00 +0200

2009/12/17 Hong Zhang <Hong.Zhang_at_sun.com>

>
>
>> You can try it out yourself in NetBeans 6.8.
>>
>> 1) create a Maven EJB project
>> 2) create entity classes from database using the wizard. I used a Oracle
>> 11g database.
>> 3) in the wizard create a new persistence unit using the Eclipse Link 2.0
>> default
>> 4) deploy the application
>> 5) application does not deploy and you need to check the logs to find this
>> NPE
>>
> So there are no real EJBs in this EJB project? Then this should not be
> created as an EJB project? Persistence unit should be packaged as library
> jar.
> In any case, we should have a better error message.
>

This is correct, there are no EJB's in this EJB project yet.
The idea is to create session beans that use the JPA Entities using the
NetBeans - generate Session beans from Entities classes wizard.

Hmmm... Perhaps you are correct. I will try add at least one session bean to
the project tomorrow.
(I know not having at least one Session bean in a Maven EJB project will
cause a rubbish EJB - JAR, but I think it fails on the descriptor format)
I'll attach my maven project as is, to the issue so someone can at least
take a look for now.


regards
Richard.