It work's
after moving my RESTful method from my SF EJB to a Seam POJO I get the XML in the browser.
However I don't seem to be able to pass the paramater 'domain';
@GET
@Path("/restfulByDomain/{domain}")
@Produces("application/xml")
public final String getRESTfulByDomain(@PathParam("domain") String domain) {
....
}
If I try and print it in the method I get a 'null pointer exception' shown in the log;
2010-10-28 18:02:53,986 DEBUG [org.jboss.seam.util.Resources] Loaded resource from context classloader: jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp140830203512096050NOTiFYPiNPOiNT.ear-contents/NOTiFYPiNPOiNT-exp.war/WEB-INF/lib/jboss-seam-debug.jar!/META-INF/debug.xhtml
2010-10-28 18:02:53,986 DEBUG [org.jboss.seam.faces.FacesManager] redirecting to: /seam/resource/debug.xhtml?cid=2
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.FacesLifecycle] After render response, destroying contexts
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.Contexts] flushing server-side conversation context
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.Contexts] flushing session context
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.Contexts] destroying event context
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.conversationPropagation
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.transaction.transaction
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.events
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.contexts.FacesLifecycle] <<< End JSF request for /seam/resource
2010-10-28 18:02:53,988 DEBUG [org.jboss.seam.web.ExceptionFilter] done running exception handlers
2010-10-28 18:02:53,989 DEBUG [org.ajax4jsf.webapp.BaseFilter] Finished request processing total time 1762ms for uri: /seam/resource/restv1/restfulBean/restfulByDomain/123.com
2010-10-28 18:03:05,740 DEBUG [org.ajax4jsf.webapp.BaseFilter] Filter start request processing at 28/10/10 18:03 for uri: /seam/resource/restv1/restfulBean/restfulByDomain/123.com
2010-10-28 18:03:05,740 DEBUG [org.ajax4jsf.webapp.BaseFilter] Filter request output to XML
2010-10-28 18:03:05,740 DEBUG [org.ajax4jsf.webapp.BaseXMLFilter] XML filter service start processing request
2010-10-28 18:03:05,740 DEBUG [org.jboss.seam.resteasy.ResteasyResourceAdapter] processing REST request
2010-10-28 18:03:05,748 DEBUG [org.jboss.seam.servlet.ContextualHttpServletRequest] beginning request
2010-10-28 18:03:05,756 DEBUG [org.jboss.seam.contexts.ServletLifecycle] >>> Begin web request
2010-10-28 18:03:05,766 DEBUG [org.jboss.seam.core.Manager] No stored conversation
2010-10-28 18:03:05,780 DEBUG [org.jboss.seam.resteasy.ResteasyResourceAdapter] removing SeamResourceServlet url-pattern and dispatcher prefix from request path
2010-10-28 18:03:05,785 DEBUG [org.jboss.seam.resteasy.ResteasyResourceAdapter] UriInfo, absolute URI : http://localhost:8080/seam/resource/restv1/restfulBean/restfulByDomain/123.com
2010-10-28 18:03:05,785 DEBUG [org.jboss.seam.resteasy.ResteasyResourceAdapter] UriInfo, base URI : http://localhost:8080/
2010-10-28 18:03:05,785 DEBUG [org.jboss.seam.resteasy.ResteasyResourceAdapter] UriInfo, relative path/@Path: /restfulBean/restfulByDomain/123.com
2010-10-28 18:03:05,785 DEBUG [org.jboss.seam.resteasy.ResteasyResourceAdapter] UriInfo, query string : null
2010-10-28 18:03:05,785 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher] PathInfo: /restfulBean/restfulByDomain/123.com
2010-10-28 18:03:05,787 DEBUG [org.jboss.seam.resteasy.SeamResteasyResourceFactory] creating RESTEasy resource instance by looking up Seam component: restfulBean
2010-10-28 18:03:05,791 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts
2010-10-28 18:03:05,813 DEBUG [org.jboss.seam.contexts.Contexts] destroying business process context
2010-10-28 18:03:05,813 DEBUG [org.jboss.seam.contexts.Contexts] destroying conversation context
2010-10-28 18:03:05,813 DEBUG [org.jboss.seam.contexts.Contexts] flushing server-side conversation context
2010-10-28 18:03:05,813 DEBUG [org.jboss.seam.contexts.Contexts] flushing session context
2010-10-28 18:03:05,813 DEBUG [org.jboss.seam.contexts.Contexts] destroying event context
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.conversationPropagation
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.exade.vcp.Filter.done
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.ajax4jsf.webapp.BaseFilter:MyFacesFilterChecked
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.transaction.transaction
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.web.servletContexts
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.events
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.resteasy.spi.HttpRequest
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.exade.vcp.Filter.ResponseWrapper
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.resteasy.spi.HttpResponse
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.servlet.ContextualHttpServletRequest] ended request due to exception
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.servlet.ContextualHttpServletRequest] ended request
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.resteasy.ResteasyResourceAdapter] completed processing of REST request
2010-10-28 18:03:05,814 DEBUG [org.jboss.seam.web.ExceptionFilter] handling uncaught exception
javax.servlet.ServletException: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:74)
Caused by;
Caused by: java.lang.NullPointerException
at com.notifypinpoint.pojos.RESTfulBean.getRESTfulByDomain(RESTfulBean.java:47)
Which is my logging statement;
try {
log.info(">>>>> getRESTfulByDomain domain = " + domain);
} catch (Exception e) {
log.error(">>>>> domain null");
}
I need to use the paramter in my SQL.
I have tried annotating the domain variable with an @in, to no avail.
@In
String domain;
Any suggestions? Thanks.