users@jersey.java.net

Re: null pointer in resources scan

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 30 Jan 2008 11:50:24 +0100

On Jan 30, 2008, at 11:35 AM, guilhem legal wrote:

> hi!
>
> I have still the same problem, and i'm beginning to desperate.
> your piece of code show where the null pointer exception come from :
>
> URI: file:/C:/Documents%20and%20Settings/legal/Mes%20documents/
> NetBeansProjects/geomatysWS/build/web/WEB-INF/classes/net/seagis/
> coverage/wms/
> file p: net/seagis/coverage/wms
> false
> null

Hmm... perhaps this is a file separator issue. What does the
following print out:

   System.out.println(new File(u.getPath()));
   System.out.println(u.getPath());

(I don't have a windows machine to test on).


> URI: jar:file:/C:/Documents%20and%20Settings/legal/Mes%
> 20documents/NetBeansProjects/geomatysWS/build/web/WEB-INF/lib/
> postgrid-1.0-SNAPSHOT.jar!/net/seagis/coverage/wms
> file p: net/seagis/coverage/wms
> false
> null
>
> i have update my NB restful WS plugin ( i had to reload the
> catalog, i was thinking it was automatic), in my project I see the
> webService resources wich are recognized by NB.
> but still the same deployment problem (and its not the only, i have
> sometime other class not found issue when deploying with NB).
>

I recommend the following:

- removing the plugin completely so that we can reduce the number of
moving parts;

- remove all Jersey specific init-params from the web.xml

and see if that works.

If that does not work the next solution is to create your own
resource config implementation that you point to in the web.xml which
contains all your resource classes.



> I wish i use glassfish but the directory deployement can't be
> turned off for tomcat.
>
> I m still searching for a solution in order to profile my webService.
>

I am a bit busy today, but if you are still having issues then we
could chat on the phone tomorrow, swap some code and i could help you
debug the issue better.

Paul.

> Guilhem Legal
>
> Paul Sandoz a écrit :
>>
>> On Jan 29, 2008, at 8:49 PM, Nam Nguyen wrote:
>>
>>>>> by the way i try some test, the WAR build by NetBeans is ggod
>>>>> and it work without the resource error. but its when i deploy
>>>>> with NB that the errors occur.
>>>>
>>>> Ah, i see. NetBeans deploys using the "build/web/WEB-INF/"
>>>> directory.
>>>>
>>> Are you referring to fast in-place deployment. You can turn the
>>> feature off by doing:
>>>
>>> Services tab > Servers > GlassFish V2 > Properties and uncheck
>>> 'Directory Deployment' as show in the screenshot:
>>>
>>
>> I did not know that!
>>
>> Guilhem is using Tomcat, is there an option for Tomcat as well?
>>
>> It might be a workaround but we still would not know what the
>> underlying issue is.
>>
>> Paul.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>