Richard Kolb wrote:
> Hi Hong
>
> 2009/12/17 Hong Zhang <Hong.Zhang_at_sun.com <mailto:Hong.Zhang_at_sun.com>>
>
>
> I was able to reproduce the problem with the application you
> attached.
>
>
> great that is easy to reproduce,
>
>
> I will look into it further and update the issue tracker with my
> findings (I probably cannot get to it today, but I should be able
> to look at it tomorrow). It will be helpful if you can also share
> the sources for this application.
>
>
> Not a problem, it is a Netbeans generated maven project.
> I will get it off my other laptop as soon as I can.
Thanks.
>
>
> From the stack trace, it seems it was not able to find a
> suitable archivist to process the metadata for this application
> and that caused the NPE. I need to find out why it could not find
> a suitable archivist, but I agree with you this NPE is pretty bad
> and we need to provide a better error message regardless of
> whether the application was packaged properly or not.
>
>
> That would be great.
>
> Why this issue worries me is that Netbeans 6.8 seems to hit this
> problem regularly when creating a Maven EJB project.
>
> 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.
Thanks,
- Hong
>
>
>
> Thanks for reporting the problem and attaching the test case.
>
>
> Not a problem, will try get the sources now. Hope there is a work
> around of sorts.
> As I said , if I remove the provider from the persistence.xml it works
> and if I re-add after a successful deploy it works. (even if I
> undeploy and then redeploy)
> regards
> Richard.
>
>