6 Replies Latest reply on Oct 28, 2010 6:56 PM by Roger Lee

    RESTful Seam 2.2.0.GA - HTTP Status 404 - Could not find resource for relative

    Roger Lee Apprentice

      I am using JBoss 4.2.3.GA with Seam 2.2.0.GA under Windows 7.


      All the RESTful JARs have deployed and the providers start etc.


      09:07:36,828 INFO  [ResteasyBootstrap] bootstrapping JAX-RS application
      09:07:36,883 INFO  [ResteasyBootstrap] registering built-in RESTEasy providers
      09:07:36,904 INFO  [providers] Added built in provider DataSourceProvider
      09:07:36,911 INFO  [providers] Added built in provider DefaultTextPlain
      09:07:36,915 INFO  [providers] Added built in provider org.jboss.resteasy.plugins.providers.StringTextStar
      09:07:36,921 INFO  [providers] Added built in provider org.jboss.resteasy.plugins.providers.InputStreamProvider
      09:07:36,926 INFO  [providers] Added built in provider org.jboss.resteasy.plugins.providers.ByteArrayProvider
      09:07:36,931 INFO  [providers] Added built in provider org.jboss.resteasy.plugins.providers.FormUrlEncodedProvider
      09:07:36,937 INFO  [providers] Added built in provider org.jboss.resteasy.plugins.providers.FormUrlEncodedProvider
      09:07:36,941 INFO  [providers] Added built in provider org.jboss.resteasy.plugins.providers.StreamingOutputProvider
      09:07:36,958 INFO  [providers] Adding built in provider org.jboss.resteasy.plugins.providers.IIOImageProvider
      



      I have annotate my SF EJB so;


      @Stateful
      @Name("postcardBean")
      @Interceptors(SeamInterceptor.class)
      @JndiName("ejb/PostcardRemote")
      @Scope(ScopeType.SESSION)
      @Path("/postcardBean")
      public class PostcardBean implements PostcardRemote, NOTiFYPiNPOiNTConstants, NOTiFYPiNPOiNTSQL {
      



      and the method I'm trying to call;


      @GET
      @Path("/domain/{domain}")
      @Produces("text/plain")
      public final String getPostCardsByDomain(@PathParam("domain") String domain) {
               
          //Query query = entityManager.createQuery(GET_POSTCARDS_BY_DOMAIN);
          //query.setParameter(ONE, domain);
                
          //this.postcardsList = query.getResultList();
          //log.info(">>>>> getPostCardsByDomain postcardsList.size = " + postcardsList.size());
                    
          return "is this working?";
      }
      



      When I try and call the RESTful service using;


      http://localhost:8080/seam/resource/rest/postcardBean/domain/mydomain.com
      



      I get;


      HTTP Status 404 - Could not find resource for relative :
      /postcardBean/domain/mydomain.com of full path: 
      http://localhost:8080/seam/resource/rest/postcardBean/domain/mydomain.com
      



      I've Googled REST until the provebial cows come home and (like in a lot of cases) find conflicting info.


      Do I have to annotate my implementation class method?


      @Local
      public interface PostcardRemote {
      



      as;


      @GET
      @Path("domain/{domain}")
      @Produces("text/plain")
      String getPostCardsByDomain(@PathParam("domain") String domain);
      



      Is my URL correct?


      Many thanks.
        

        • 1. Re: RESTful Seam 2.2.0.GA - HTTP Status 404 - Could not find resource for relative
          Roger Lee Apprentice

          Has anyone got a RESTful webservice working in Seam?


          • 2. Re: RESTful Seam 2.2.0.GA - HTTP Status 404 - Could not find resource for relative
            Gabor Jakab Newbie

            I have some. What do you have as resteasy config in components.xml? s.g. like:


               <resteasy:application scan-providers="false" 
                                     scan-resources="true"
                                     use-builtin-providers="true" 
                                     resource-path-prefix="/restv1">
                                     
                    <resteasy:resource-class-names>
                        <value>com.yourcompany....YourResource</value>
                    </resteasy:resource-class-names>
                    
                </resteasy:application> ....


            Can be much longer including home and query declarations like:



            <resteasy:resource-home...



            You should take care not to restrict your resources behind e.g. by some authentication filter...


            In general the Its Not Working in not enough, you should find information about your problem, e.g. switch on Web,WS and RESTEasy loging, s.g. like:



            ...
            <!-- Enable JBossWS message tracing -->
               <category name="org.jboss.ws.core.MessageTrace">
                 <priority value="TRACE"/>
               </category>
               
                <!-- Enable JBossWS  -->
               <category name="org.jboss.ws">
                <priority value="DEBUG"/>
               </category>
            
               <category name="org.jboss.wsf">
                <priority value="DEBUG"/>
               </category>
               
               <category name="org.jboss.seam.resteasy">
                <priority value="DEBUG"/>
               </category>
            
               <category name="javax.ws.rs">
                <priority value="TRACE"/>
               </category>
               
               <category name="org.jboss.resteasy">
                <priority value="TRACE"/>
               </category>
            ...
            


            PS: Why do you include REST service in your SB? You could REST a Seam Component, Component.getInstance()-ing your SB in place where you need that... separation of concern...


            Hope that helps...


             





            • 3. Re: RESTful Seam 2.2.0.GA - HTTP Status 404 - Could not find resource for relative
              Roger Lee Apprentice

              It was more to get a response!


              I have all above. I just included in SF EJB as it was the EJB i was working on. However have taken you advice and moved it to a POJO.


              When JBoss starts I now get;


              2010-10-28 12:22:05,645 INFO  [org.jboss.seam.resteasy.ResteasyBootstrap] bootstrapping JAX-RS application
              2010-10-28 12:22:05,698 ERROR [org.jboss.seam.resteasy.ResteasyBootstrap] error loading JAX-RS type: 
              No ClassLoaders found for: com.notifypinpoint.pojo.RESTfulBean
              
              java.lang.ClassNotFoundException: No ClassLoaders found for: com.notifypinpoint.pojo.RESTfulBean
                   at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
                   at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
                   at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
              



              Then the RestEasy prodviders kick in OK.


              2010-10-28 12:22:05,949 DEBUG [org.jboss.seam.resteasy.ResteasyBootstrap] discovering all Seam components
              2010-10-28 12:22:05,950 INFO  [org.jboss.seam.resteasy.ResteasyBootstrap] registering built-in RESTEasy providers
              2010-10-28 12:22:05,957 DEBUG [org.jboss.resteasy.plugins.providers] Registering standard providers
              2010-10-28 12:22:05,970 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider DataSourceProvider
              2010-10-28 12:22:05,977 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider DefaultTextPlain
              2010-10-28 12:22:05,981 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider org.jboss.resteasy.plugins.providers.StringTextStar
              2010-10-28 12:22:05,985 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider org.jboss.resteasy.plugins.providers.InputStreamProvider
              2010-10-28 12:22:05,990 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider org.jboss.resteasy.plugins.providers.ByteArrayProvider
              2010-10-28 12:22:05,994 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider org.jboss.resteasy.plugins.providers.FormUrlEncodedProvider
              2010-10-28 12:22:05,999 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider org.jboss.resteasy.plugins.providers.FormUrlEncodedProvider
              2010-10-28 12:22:06,004 INFO  [org.jboss.resteasy.plugins.providers] Added built in provider org.jboss.resteasy.plugins.providers.StreamingOutputProvider
              2010-10-28 12:22:06,021 INFO  [org.jboss.resteasy.plugins.providers] Adding built in provider org.jboss.resteasy.plugins.providers.IIOImageProvider
              2010-10-28 12:22:06,036 ERROR [org.jboss.seam.resteasy.ResteasyBootstrap] Not implemented: Stateful EJB Seam component resource: Component(postcardBean)
              2010-10-28 12:22:06,039 DEBUG [org.jboss.seam.resteasy.ResteasyBootstrap] registering resource as Seam component: restfulBean
              2010-10-28 12:22:06,068 DEBUG [org.jboss.seam.contexts.Contexts] starting up: org.jboss.seam.transaction.facesTransactionEvents
              2010-10-28 12:22:06,068 DEBUG [org.jboss.seam.contexts.Contexts] starting up: org.jboss.seam.security.facesSecurityEvents
              2010-10-28 12:22:06,069 DEBUG [org.jboss.seam.contexts.Contexts] destroying: warRootDeploymentStrategy
              2010-10-28 12:22:06,069 DEBUG [org.jboss.seam.contexts.Contexts] destroying: deploymentStrategy
              2010-10-28 12:22:06,069 DEBUG [org.jboss.seam.contexts.Contexts] destroying: hotDeploymentStrategy
              2010-10-28 12:22:06,069 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.web.servletContexts
              2010-10-28 12:22:06,069 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.events
              2010-10-28 12:22:06,069 DEBUG [org.jboss.seam.contexts.ServletLifecycle] <<< End initialization
              2010-10-28 12:22:06,069 DEBUG [org.jboss.seam.init.Initialization] done initializing Seam
              2010-10-28 12:22:06,069 DEBUG [org.jboss.web.tomcat.filters.ReplyHeaderFilter] Adding header name: X-Powered-By='Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0'
              2010-10-28 12:22:06,078 DEBUG [org.ajax4jsf.webapp.BaseFilter] Init ajax4jsf filter with nane: ajax4jsf
              2010-10-28 12:22:06,078 DEBUG [org.ajax4jsf.webapp.BaseFilter] Init parameters :
              



              Everything was compiled using JDK 1.6 and JBoss is running 1.6

              • 4. Re: RESTful Seam 2.2.0.GA - HTTP Status 404 - Could not find resource for relative
                Roger Lee Apprentice

                IGNORE - Typo missed the 's' off pojo!


                com.notifypinpoint.pojos.RESTfulBean
                



                Thanks.

                • 5. Re: RESTful Seam 2.2.0.GA - HTTP Status 404 - Could not find resource for relative
                  Roger Lee Apprentice

                  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.

                  • 6. Re: RESTful Seam 2.2.0.GA - HTTP Status 404 - Could not find resource for relative
                    Roger Lee Apprentice

                    Roger Lee wrote on Oct 28, 2010 13:06:


                    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.


                    Sorted - Removed 'final' from method .....


                    Working now.