`
lhhlp2011
  • 浏览: 45603 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

display标签的使用t required libraries are missing: com/lowagie/text/Element

阅读更多

近期在我的项目中使用了display标签,原本以为特别容易,用起来就有错了:

在使用display标签的时候后台报错如下:

2011-03-22 19:03:47,224 org.displaytag.export.ExportViewFactory.<init>(ExportViewFactory.java:61) INFO [org.displaytag.export.ExportViewFactory] - <Initializing ExportViewFactory with type={csv,excel,xml,pdf,rtf}>

2011-03-22 19:03:47,268 org.displaytag.export.ExportViewFactory.registerExportView(ExportViewFactory.java:105) WARN [org.displaytag.export.ExportViewFactory] - <Unable to instantiate class for pdf export. org.displaytag.export.PdfView was found, but required libraries are missing: com/lowagie/text/Element>

2011-03-22 19:03:47,302 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) ERROR [StandardWrapper[/tyut:jsp]] - <Servlet.service() for servlet jsp threw exception>

java.lang.NullPointerException

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:164)

at org.displaytag.util.ReflectHelper.classForName(ReflectHelper.java:43)

at org.displaytag.export.ExportViewFactory.registerExportView(ExportViewFactory.java:95)

at org.displaytag.export.JspServlet.service(JspServlet.java:241)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

经过查看官方文档,知道:

     If you would like to make use of the display taglib in your own application, do the following:

  1. Drop the displaytag-version.jar file in your application WEB-INF/lib directory
  2. Make sure that following libraries are in your WEB-INF/lib directory (or made available via the classpath to your application server). Refer to the dependencies document for the correct version of these libraries. You can download a copy of everything from jakarta or you can grab them from the example webapp in the bin distribution. The following is the list of dependencies:
    • commons-logging
    • commons-lang
    • commons-collections
    • commons-beanutils
    • log4j
    • itext (optional, for pdf/rtf export)

    You may want to include also the displaytag-export-poi jar, which adds an excel binary export using jakarta POI. The poi jar is required by displaytag-export-poi

  3. Optional. Depending on your architecture, you may need to configure a filter to make export work. See the export filter page for the details about how to do it and when you could need it. 缺少itext.jar就会报上面的错。所以我加了itext-1.4.jar,重新启动项目,ok
分享到:
评论

相关推荐

    适用于PPC64的java1.8安装包

    https://www.ibm.com/support/pages/installation-infosphere-data-replication-iidr-rhel-8-fails-error-%E2%80%9Cjre-libraries-are-missing-or-not-compatible%E2%80%9D#:~:text=JRE%20libraries%20are%20missing...

    ethminer-0.16.0.dev3

    you have to install OpenGL libraries. E.g. on Ubuntu run: ```sh sudo apt-get install mesa-common-dev ``` #### Disable Hunter If you want to install dependencies yourself or use system package ...

    矢量化高级数学库.zip

    韓文矢量化高级数学库我在阅读http://www.codersnotes.com/notes/maths-lib-2016/之后开始使用这款软件,你也应该这样做。它与 x64 SSE4.1(ish) 兼容(自 ...如果您想添加或删除某些内容,以下资源列表可能会派上用场...

    /out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar

    android 系统应用二次开发的导入包,生成位置 /out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar 自己命名成了 framework_intermediates_class.jar 源文件叫 class.jar

    apache部署文件

    versions are: NW65SP3, NW60SP5 and NW51SP8. For NetWare 6.0 and 5.1 it is also required to apply at least the NWLIB6e Post Service Pack update. ATTENTION: this archive extracts to \APACHE24 !! The ...

    Python链接MySQL驱动包 mysqlclient-python-1.3.12.rar

    Python链接MySQL驱动包,安装之后可以使用Python语言链接MySQL进行数据库操作 # mysqlclient [![Build Status](https://secure.travis-ci.org/PyMySQL/mysqlclient-python.png)]...

    基于mAppwidget实现的手绘地图demo

    可使用不同的图片作为地图,支持缩放,pinch缩放,双击缩放,pop弹窗,语音导游,用户定位等功能。 ---官网-------- //下载demo http://mapp.android-libraries.com/download //学习地图 ...

    Ubuntu 64 位编译Android源码出错解决办法

    使用`g++-multilib`可以为GCC添加对不同架构的支持,确保所有架构的编译需求得到满足。 ```bash sudo apt-get install g++-multilib ``` 这将安装支持多种架构的C++编译器组件,有助于解决跨平台编译中的常见问题。 ...

    Android AAC 框架

    Android 最新jetpack 组件使用及其说明demo - [Room](https://developer.android.com/topic/libraries/architecture/room) - [Lifecycle-aware components]...

    FFmpeg win64

    This build was compiled with the following external libraries: bzip2 1.0.6 &lt;http://bzip.org/&gt; Fontconfig 2.11.94 &lt;http://freedesktop.org/wiki/Software/fontconfig&gt; Frei0r 20130909-git-10d8360 &lt;http:...

    pyInstaller 1.4

    Its main advantages over similar tools are that PyInstaller works with any version of Python since 1.5, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and...

    解决libarcsoft_face.dll:Cant‘t find dependent library报错

    解决libarcsoft_face.dll:Cant‘t find dependent library报错,相关文章:https://blog.csdn.net/chw0629/article/details/122557038

    Arduino-IRremote-master.zip_arduino_arduino irremote

    1. **安装库**:下载Arduino-IRremote-master.zip文件后,将其解压,然后将解压后的文件夹放入Arduino IDE的“libraries”目录下。重启IDE,你就可以在"Sketch &gt; Include Library"菜单中看到IRremote。 2. **配置...

    Android代码-OCR-Test

    Third-party Libraries Used Tess-Two for OCR Processing (https://github.com/rmtheis/tess-two) ImagePicker for image picking and camera (https://github.com/nguyenhoanglam/ImagePicker) Android Image ...

    ffmpeg-2.5.2-win64-shared.7z

    This build was compiled with the following external libraries: bzip2 1.0.6 &lt;http://bzip.org/&gt; Fontconfig 2.11.91 &lt;http://freedesktop.org/wiki/Software/fontconfig&gt; Frei0r 20130909-git-10d8360 &lt;http:...

    Web.Service.APIs.and.Libraries.083891182X

    Application Programming Interfaces (APIs) are software tools that help different programs work together, and Michel shows readers how to integrate these into existing library websites as well as use ...

    ffmpeg-2.5.2-win64-dev.7z

    This build was compiled with the following external libraries: bzip2 1.0.6 &lt;http://bzip.org/&gt; Fontconfig 2.11.91 &lt;http://freedesktop.org/wiki/Software/fontconfig&gt; Frei0r 20130909-git-10d8360 &lt;http:...

    Altium Designer 官方元件库

    Altium Designer 10 发布时构建,不会更改。网址:https://www.altium.com/documentation/other_installers#vault-technologies

    jsp中报c标签错误时导包

    在JavaServer Pages (JSP) 开发中,`c`标签通常指的是来自JSTL (JavaServer Pages Standard Tag Library) 的Core库中的标签。当你在JSP页面中使用`&lt;c:`开头的标签,如`&lt;c:forEach&gt;`、`&lt;c:if&gt;`等,并遇到错误提示时,...

    旋转编码器程序03 .rar

    本文将深入探讨使用C语言在单片机上实现旋转编码器程序的相关知识。 首先,单片机是微型计算机的一种,集成了CPU、内存、I/O接口等部件,适用于嵌入式系统开发。在单片机开发中,C语言是一种常用且高效的编程语言,...

Global site tag (gtag.js) - Google Analytics