title: The resource configuration is not modifiable in this context entities Resfutl Service
body: <p>I'm fairly new to Java and working on my first JPA project while trying to wrap my head around all of the objects that Netbeans created.  I created a "User" JPA entity from a database table using the wizard.  Then I went to the AbstractFacade.java where the super class exists to add a new method that will find a specific user by their email address.</p>
  
  <pre><code>public T findFromEmail(String mailbox) {
      javax.persistence.Query q = getEntityManager().createNamedQuery("Users.findByEmail").setParameter("email", mailbox);
      return (T)q.getSingleResult();
  }
  </code></pre>
  
  <p>Next I went to UsersFacaceRest.java and added the following method.  I'm not sure why I needed the @override  in this example as I didn't seem to be overriding any underlying object, but Netbeans gave me an error if I didn't.</p>
  
  <pre><code>@GET
  @Path("{mailbox}")
  @Produces({"application/xml", "application/json"})
  @Override
  public Users findFromEmail(@PathParam("mailbox") String mailbox) {
      return super.findFromEmail(mailbox);
  }
  </code></pre>
  
  <p>Now I receive the following error:</p>
  
  <pre><code>    WebModule[/LMSWebService]StandardWrapper.Throwable java.lang.IllegalStateException: The resource configuration is not modifiable in this context. 
  at org.glassfish.jersey.server.ResourceConfig$ImmutableState.register(ResourceConfig.java:257) 
  at org.glassfish.jersey.server.ResourceConfig$ImmutableState.register(ResourceConfig.java:205) 
  at org.glassfish.jersey.server.ResourceConfig.register(ResourceConfig.java:435) 
  at org.glassfish.jersey.servlet.WebComponent.&lt;init&gt;(WebComponent.java:261) 
  at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167) 
  at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349) 
  at javax.servlet.GenericServlet.init(GenericServlet.java:244) 
  at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583) 
  at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1225) 
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:237) 
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) 
  at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) 
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) 
  at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) 
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) 
  at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357) 
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260) 
  at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) 
  at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) 
  at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) 
  at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) 
  at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) 
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) 
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) 
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) 
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) 
  at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) 
  at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) 
  at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) 
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) 
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) 
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) 
  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) 
  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) 
  at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>Is there something else I need to do to add a method to the restful service or is my syntax incorrect?  Any help would be greatly appreciated.</p>
  
  <p>Thank you in advance.</p>