title: error in testing restful
body: <p>what is the error at this project i am using netbeans 7.0.1</p>
  
  <pre><code>Error occurred during deployment: Exception while deploying the app [WebApplication] : org.xml.sax.SAXParseException; lineNumber: 30; columnNumber: 30; Deployment descriptor file WEB-INF/web.xml in archive [web].  cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence-context-ref'. One of '{"http://java.sun.com/xml/ns/j2ee":description, "http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":distributable, "http://java.sun.com/xml/ns/j2ee":context-param, "http://java.sun.com/xml/ns/j2ee":filter, "http://java.sun.com/xml/ns/j2ee":filter-mapping, "http://java.sun.com/xml/ns/j2ee":listener, "http://java.sun.com/xml/ns/j2ee":servlet, "http://java.sun.com/xml/ns/j2ee":servlet-mapping, "http://java.sun.com/xml/ns/j2ee":session-config, "http://java.sun.com/xml/ns/j2ee":mime-mapping, "http://java.sun.com/xml/ns/j2ee":welcome-file-list, "http://java.sun.com/xml/ns/j2ee":error-page, "http://java.sun.com/xml/ns/j2ee":jsp-config, "http://java.sun.com/xml/ns/j2ee":security-constraint, "http://java.sun.com/xml/ns/j2ee":login-config, "http://java.sun.com/xml/ns/j2ee":security-role, "http://java.sun.com/xml/ns/j2ee":env-entry, "http://java.sun.com/xml/ns/j2ee":ejb-ref, "http://java.sun.com/xml/ns/j2ee":ejb-local-ref, "http://java.sun.com/xml/ns/j2ee":service-ref, "http://java.sun.com/xml/ns/j2ee":resource-ref, "http://java.sun.com/xml/ns/j2ee":resource-env-ref, "http://java.sun.com/xml/ns/j2ee":message-destination-ref, "http://java.sun.com/xml/ns/j2ee":message-destination, "http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}' is expected.. Please see server.log for more details.
      C:\Users\win-7\Desktop\WebApplication\nbproject\build-impl.xml:727: 
      The module has not been deployed.
          at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
          at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
          at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.Target.execute(Target.java:390)
          at org.apache.tools.ant.Target.performTasks(Target.java:411)
          at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
          at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
          at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
          at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
          at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
          at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
          at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
      BUILD FAILED (total time: 2 seconds)
  </code></pre>
  
  <p>web.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; 
  &lt;web-app
   xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
       &lt;servlet&gt;
           &lt;description&gt;Generated servlet for Java ME Client to Web Application &lt;/description&gt;
           &lt;display-name&gt;Javon service for  MyPackage.WebToMobileServlet&lt;/display-name&gt;
           &lt;servlet-name&gt;WebToMobileServlet&lt;/servlet-name&gt;
           &lt;servlet-class&gt;MyPackage.WebToMobileServlet&lt;/servlet-class&gt;
       &lt;/servlet&gt;
       &lt;servlet&gt;
           &lt;servlet-name&gt;ServletAdaptor&lt;/servlet-name&gt;
           &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
           &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
       &lt;/servlet&gt;
       &lt;servlet-mapping&gt;
           &lt;servlet-name&gt;WebToMobileServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/servlet/MyPackage.WebToMobileServlet&lt;/url-pattern&gt;
       &lt;/servlet-mapping&gt;
       &lt;servlet-mapping&gt;
           &lt;servlet-name&gt;ServletAdaptor&lt;/servlet-name&gt;
           &lt;url-pattern&gt;/resources/*&lt;/url-pattern&gt;
       &lt;/servlet-mapping&gt;
       &lt;session-config&gt;
           &lt;session-timeout&gt;
               30
           &lt;/session-timeout&gt;
       &lt;/session-config&gt;
       &lt;welcome-file-list&gt;
           &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
       &lt;/welcome-file-list&gt; 
       &lt;persistence-context-ref&gt; 
          &lt;persistence-context-ref-name&gt;persistence/WebApplicationPU&lt;/persistence-context-ref-name&gt;
          &lt;persistence-unit-name&gt;WebApplicationPU&lt;/persistence-unit-name&gt;
       &lt;/persistence-context-ref&gt; 
       &lt;resource-ref&gt;
           &lt;res-ref-name&gt;UserTransaction&lt;/res-ref-name&gt;
           &lt;res-type&gt;javax.transaction.UserTransaction&lt;/res-type&gt;
           &lt;res-auth&gt;Container&lt;/res-auth&gt; 
       &lt;/resource-ref&gt; 
  &lt;/web-app&gt;
  </code></pre>