3 Replies Latest reply on Feb 6, 2007 4:04 AM by Shane Bryzak

    Remoting: premature end of file

    ryan dewell Novice

      Anyone come across this exception while working with remoting? This trace is from 1.1.0, but this also occurs in 1.1.5.

      [15:58:08,877,ExecutionHandler] Error during remote request
      org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file. at org.dom4j.io.SAXReader.read(SAXReader.java:482) at org.dom4j.io.SAXReader.read(SAXReader.java:343) at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:68) at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:77)
      


      Not really sure where to begin digging this one out.

      Pretty simple:

      @Local
      public interface ReportManagement {
       @WebRemote
       public String deleteReport(String reportId);
      }
      


      into a stateless component

      @Stateless(name="ManagerReportManagement")
      @Name("ManagerReportManagement")
      @Interceptors(SeamInterceptor.class)
      public class ReportManagementImpl implements ReportManagement, Serializable{
       private static final long serialVersionUID = 246957185452163877L;
      
       @In(value="bright", create=true)
       private transient EntityManager em;
      
       public String deleteReport(String reportId) {
       try {
       Report r = em.find(Report.class, reportId);
      
       if (r == null){
       return "Report not found.";
       } else {
       em.remove(r);
       return "success:" + reportId;
       }
       } catch (Exception e){
       e.printStackTrace();
       return e.getMessage();
       }
       }
      
      
      }
      


      <script type="text/javascript" src="seam/remoting/interface.js?ManagerReportManagement"/>
      
      etc....
      
      Seam.Component.getInstance("ManagerReportManagement").deleteReport(reportId, deleteReportCallback);
      


      Any ideas?