users@glassfish.java.net

Apache Wink 1.1.3 and Glassfish 3.1

From: <forums_at_java.net>
Date: Tue, 7 Jun 2011 00:51:38 -0500 (CDT)

Hi folks,

I have trouble getting Apache Wink based REST services to work in Glassfish.
The reason behind using Wink is that we are planning to use Apache Tuscany
SCA (2.0-Beta2) and Tuscany REST binding uses Wink. The problem is that I'm
unable to make even a simple Wink HelloWorld application (that comes with
Wink-1.1.3-incubating package) to work in Glassfish Open Source Edition 3.1.
The HelloWorld app works ok in Tomcat 6.

Below is part of the GF logs. It looks like HTTP Accept header parsing fails.
Any ideas are most welcome.

BR, Harri

INFO: 16:51:40,656        DEBUG Requests:108 - Request URI is
http://localhost:8090/org.apache.wink.example_HelloWorld_war_1.1.3-incubating/rest/world
INFO: 16:51:40,657        DEBUG Requests:118 - HTTP Headers are
{accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8],accept-charset=[ISO-8859-1,utf-8;q=0.7,*;q=0.7],accept-encoding=[gzip,
deflate],accept-language=[en-us,en;q=0.5],connection=[keep-alive],cookie=[region1_configure_menu=none;
region4_monitor_menu=; region5_tools_menu=; region1_manage_menu=;
JSESSIONID=44abdaa4314250c7b00f75ca51fb;
treeForm_tree-hi=treeForm:tree:applications],host=[localhost:8090],keep-alive=[115],user-agent=[Mozilla/5.0
(Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1]}
INFO: 16:51:40,661        DEBUG ResourceInvocation:148 - Resource
invocation:
INFO: 16:51:40,662        DEBUG Requests:146 - The request entity was
not read from the HttpServletRequest.getInputStream().
INFO: 16:51:40,665        DEBUG RequestProcessor:317 - The following
error occurred during the invocation of the handlers chain:
NullPointerException with message 'null' while processing GET request sent to
http://localhost:8090/org.apache.wink.example_HelloWorld_war_1.1.3-incubating/rest/world
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)
 


--
[Message sent by forum member 'harri.hytonen']
View Post: http://forums.java.net/node/809984