quality@glassfish.java.net

Re: Nasty null pointer exception on deploy

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

2009/12/17 Judy Tang <Judy.J.Tang_at_sun.com>

> Reading through this email thread is a pleasure, how technical you both are
> and so friendly, the combination
> of the two makes our quality community unique :-)
>
>
thanks Judy.
I think Hong may be right though. I don't have at least one EJB in my EJB
project which may be the root cause. Will check tomorrow.

regards
Richard.



> Thanks Richard and Hong!
>
> Judy
>
>
> Hong Zhang wrote:
>
>> 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.
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>
>