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: kall...@shop.com<mailto:kall...@shop.com>

Phone: (831) 531-4811

Skype: kallen.mcinerney


SHOP*COMTM
A Market America Company

Shop Smart, Save Big(tm)
<http://www.shop.com/>www.shop.com<http://www.shop.com/>
Join us on Facebook<http://www.facebook.com/Shop.com>.
Follow us on Twitter<http://twitter.com/shopcom>.
Read The Shopping Vine<http://theshoppingvine.com/>.


Reply via email to