Did you use Tuscany as part of the WAR for your web application when you hit 
the NPE? I assume you need to make sure the wink jars are available withTuscany 
jars.

Thanks,
Raymond

On Jun 28, 2012, at 2:07 PM, Kallen McInerney wrote:

> Had some difficulty getting Tuscany 2.0 Beta 3 running on Glassfish 3.1.2 
> using Wink for the REST bindings.  I was hitting an issue it seemed others 
> were getting with Apache Wink throwing the exception below.
>  
> java.lang.NullPointerException
> at org.apache.wink.common.internal.http.Accept.valueOf(Accept.java:139)
> at 
> org.apache.wink.server.internal.contexts.HttpHeadersImpl.getAcceptHeader(HttpHeadersImpl.java:151)
> at 
> org.apache.wink.server.internal.contexts.HttpHeadersImpl.getAcceptableMediaTypes(HttpHeadersImpl.java:105)
> 
> I’m new to Glassfish but just wanted to leave my workaround here since it 
> seems no one had an answer for it.  You need to place Wink and its 
> dependencies (i.e. slf4j) in your glassfish “libs” directory (i.e. 
> \glassfish3\glassfish\lib).  If you don’t the constructor of 
> org.apache.wink.common.internal.runtime.RuntimeDelegateImpl never gets hit 
> and along with it the header delegates never init.
>  
> Someone no doubt has a better solution but thought I’d pass it on.
>  
>  
> Kallen McInerney
> Principal Engineer
> Email: [email protected]
> Phone: (831) 531-4811 
> Skype: kallen.mcinerney
>  
> SHOP•COMTM
> A Market America Company
>  
> Shop Smart, Save Big™
> www.shop.com
> Join us on Facebook.
> Follow us on Twitter.
> Read The Shopping Vine.
>  
>  

Reply via email to