qq19414123
Yang Liu
2017-10-12 08:06

jruby和pdfbox一起使用,前端发送请求后显示pdfbox中一个方法不存在

5
  • pdfbox
  • 前端
  • ruby

具体错误如下:
Caused by: java.lang.NoSuchMethodError: org.apache.pdfbox.pdmodel.PDDocument.getPages()Lorg/apache/pdfbox/pdmodel/PDPageTree;
at org.apache.pdfbox.text.PDFTextStripper.writeText(org/apache/pdfbox/text/PDFTextStripper.java:266)
at org.apache.pdfbox.text.PDFTextStripper.getText(org/apache/pdfbox/text/PDFTextStripper.java:227)
at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:497)
at RUBY.perform(D:/workspace/PDF/pdf_extractor/tabula/lib/tabula_job_executor/jobs/generate_speculate_loc.rb:53)
at org.jruby.RubyFixnum.times(org/jruby/RubyFixnum.java:280)
at RUBY.perform(D:/workspace/PDF/pdf_extractor/tabula/lib/tabula_job_executor/jobs/generate_speculate_loc.rb:49)
at RUBY.call(D:/workspace/PDF/pdf_extractor/tabula/lib/tabula_job_executor/executor.rb:104)
at GenerateSpeculateLocJob_1159411179.call(GenerateSpeculateLocJob_1159411179.gen:13)
at GenerateSpeculateLocJob_1159411179.call(GenerateSpeculateLocJob_1159411179.gen:13)
at java.util.concurrent.FutureTask.run(java/util/concurrent/FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1142)
... 2 more

但是直接在后台测试是可以成功的

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答