Skip to main content

Latest GF 3.1 and Jersey

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
arthury
Offline
Joined: 2010-09-16

All,
I have just upgraded my GF from 3.01 to 3.1 and none of my code that use
Jersey can compile.
NetBeans is now complaining that

import javax.ws.rs.*

are not found.

And, yes, I have removed the previous GF and added a new Server in NetBeans.

--
Arthur Y.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ludo
Offline
Joined: 2003-06-10

On 3/21/11 3:31 PM, Arthur Yeo wrote:
> All,
> I have just upgraded my GF from 3.01 to 3.1 and none of my code that
> use Jersey can compile.
> NetBeans is now complaining that
>
> import javax.ws.rs.*
>
> are not found.
>
>
> And, yes, I have removed the previous GF and added a new Server in
> NetBeans.
Maybe this "new" server is not used yet by this NetBeans
project...Check the properties of the project to see which GF runtime it
uses...so that it can find the correct jars.
Ludo
>
> --
> Arthur Y.

arthury
Offline
Joined: 2010-09-16

May be there should be some kind of warning or requirement placed on the GF
site stating that the latest NetBeans 6.9.1 does not support GF 3.1 so that
users will not waste their time this way.

On Mon, Mar 21, 2011 at 3:37 PM, Ludovic Champenois <
> wrote:

> On 3/21/11 3:31 PM, Arthur Yeo wrote:
>
>> All,
>> I have just upgraded my GF from 3.01 to 3.1 and none of my code that use
>> Jersey can compile.
>> NetBeans is now complaining that
>>
>> import javax.ws.rs.*
>>
>> are not found.
>>
>>
>> And, yes, I have removed the previous GF and added a new Server in
>> NetBeans.
>>
> Maybe this "new" server is not used yet by this NetBeans project...Check
> the properties of the project to see which GF runtime it uses...so that it
> can find the correct jars.
> Ludo
>
>>
>> --
>> Arthur Y.
>>
>
>

--
Arthur Y.

jdlee
Offline
Joined: 2006-01-25

This may or may not help, but I always used Maven-based projects and
specify that dependency in the POM in the provided scope, which,
incidentally, NetBeans makes really easy to do (right click
Dependencies, add dep, and so on). It sounds like you're using the
native NetBeans project type, so that may not help you now, but it might
in the future, I guess. That said, NetBeans 6.9.1 predates GlassFish
3.1, so I wouldn't expect it to support the newer server, at least not
without some manual tinkering. I've been using the NetBeans 7
nightlies, which do support (and ship with) GlassFish 3.1, and they've
been quite stable for me. In case that helps. :)

On 3/21/11 4:05 PM, Arthur Yeo wrote:
> May be there should be some kind of warning or requirement placed on
> the GF site stating that the latest NetBeans 6.9.1 does not support GF
> 3.1 so that users will not waste their time this way.
>
> On Mon, Mar 21, 2011 at 3:37 PM, Ludovic Champenois
> >
> wrote:
>
> On 3/21/11 3:31 PM, Arthur Yeo wrote:
>
> All,
> I have just upgraded my GF from 3.01 to 3.1 and none of my
> code that use Jersey can compile.
> NetBeans is now complaining that
>
> import javax.ws.rs.*
>
> are not found.
>
>
> And, yes, I have removed the previous GF and added a new
> Server in NetBeans.
>
> Maybe this "new" server is not used yet by this NetBeans
> project...Check the properties of the project to see which GF
> runtime it uses...so that it can find the correct jars.
> Ludo
>
>
> --
> Arthur Y.
>
>
>
>
>
> --
> Arthur Y.

--
Jason Lee
Senior Member of Technical Staff
GlassFish REST API / Administration Console

Oracle Corporation
Phone +1 405-216-3193
Blog http://blogs.steeplesoft.com

oversteer
Offline
Joined: 2011-03-28

The solution to this conundrum seems to be to add the libraries JAX-RS 1.1 & Jersey 1.1 (JAX-RS RI),
and the library restlib_gfv3ee6 is no longer required. I've just done a test and this seems to work ok.