java.lang.RuntimeException: The document is not open.

Stack Overflow | komron | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    the page 1 was request but the document has only 0 pages

    Stack Overflow | 4 years ago | My God
    java.lang.RuntimeException: The page 1 was requested but the document has only 0 pages.
  2. 0

    Itext pdf - Broken Pipe Error

    Stack Overflow | 5 months ago | csarathe
    java.lang.RuntimeException: The page 1 was requested but the document has only 0 pages.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Itext : create only the table of content page

    Stack Overflow | 3 months ago | Arun
    java.lang.RuntimeException: The page 10 was requested but the document has only 1 pages.

    2 unregistered visitors

    Root Cause Analysis

    1. java.lang.RuntimeException

      The document is not open.

      at com.itextpdf.text.pdf.PdfWriter.getDirectContent()
    2. iText, a Free Java-PDF library
      Document.close
      1. com.itextpdf.text.pdf.PdfWriter.getDirectContent(PdfWriter.java:725)
      2. com.itextpdf.text.pdf.PdfDocument.isPageEmpty(PdfDocument.java:2495)
      3. com.itextpdf.text.pdf.PdfDocument.endPage(PdfDocument.java:972)
      4. com.itextpdf.text.pdf.PdfDocument.close(PdfDocument.java:882)
      5. com.itextpdf.text.Document.close(Document.java:416)
      5 frames
    3. pharmacy.Services
      DocGen.printDrugsInPDF
      1. pharmacy.Services.DocGen.printDrugsInPDF(DocGen.java:180)
      1 frame
    4. pharmacy.Actions
      PDFHello.drugsPDF
      1. pharmacy.Actions.PDFHello.drugsPDF(PDFHello.java:45)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    6. OGNL - Object Graph Navigation Library
      ObjectMethodAccessor.callMethod
      1. ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:870)
      2. ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1293)
      3. ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
      3 frames
    7. XWork: Core
      XWorkMethodAccessor.callMethod
      1. com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)
      2. com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)
      2 frames
    8. OGNL - Object Graph Navigation Library
      Ognl.getValue
      1. ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1369)
      2. ognl.ASTMethod.getValueBody(ASTMethod.java:90)
      3. ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
      4. ognl.SimpleNode.getValue(SimpleNode.java:258)
      5. ognl.Ognl.getValue(Ognl.java:494)
      6. ognl.Ognl.getValue(Ognl.java:458)
      6 frames
    9. XWork: Core
      OgnlUtil.getValue
      1. com.opensymphony.xwork2.ognl.OgnlUtil$2.execute(OgnlUtil.java:309)
      2. com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:340)
      3. com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:307)
      3 frames
    10. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:423)
      2. com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:287)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:250)
      3 frames
    11. Struts2
      DeprecationInterceptor.intercept
      1. org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
      1 frame
    12. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      1 frame
    13. Struts2
      DebuggingInterceptor.intercept
      1. org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
      1 frame
    14. XWork
      ValidationInterceptor.doIntercept
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      2. com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
      3. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      4. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      5. com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
      5 frames
    15. Struts2
      AnnotationValidationInterceptor.doIntercept
      1. org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)
      1 frame
    16. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      2. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      3. com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
      4. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      5. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
      6. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      7. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      8. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
      9. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      10. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      11. com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
      12. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      12 frames
    17. Struts2
      MultiselectInterceptor.intercept
      1. org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
      1 frame
    18. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      1 frame
    19. Struts2
      DateTextFieldInterceptor.intercept
      1. org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)
      1 frame
    20. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      1 frame
    21. Struts2
      CheckboxInterceptor.intercept
      1. org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
      1 frame
    22. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      1 frame
    23. Struts2
      FileUploadInterceptor.intercept
      1. org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)
      1 frame
    24. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      2. com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      4. com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
      5. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      6. com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
      7. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      8. com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
      9. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      10. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      11. com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
      12. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      12 frames
    25. Struts2
      ServletConfigInterceptor.intercept
      1. org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
      1 frame
    26. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      2. com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      4. com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
      5. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      5 frames
    27. pharmacy.Interceptors
      SUAuthInterceptor.intercept
      1. pharmacy.Interceptors.SUAuthInterceptor.intercept(SUAuthInterceptor.java:54)
      1 frame
    28. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
      1 frame
    29. Struts2
      StrutsPrepareAndExecuteFilter.doFilter
      1. org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
      2. org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)
      3. org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
      4. org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
      4 frames
    30. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:105)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      8. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      10 frames
    31. Grizzly HTTP
      AprEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1078)
      2. org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      3. org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:760)
      4. org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2323)
      4 frames
    32. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    33. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    34. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame