docx4j导出word文档出现系统卡死问题

前两天遇到docx4j导出word文档的时候,系统卡死,需要重启服务才能正常运行。

环境是:

windows

jdk1.7

eclipse+tomcat

后台打印日志如下:

七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context <clinit>
信息: java.vendor=Oracle Corporation
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context <clinit>
信息: java.version=1.7.0_79
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: 
jar:file:/F:/application/wyqh/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/tbp-web-app/WEB-INF/lib/jaxb-impl-2.1.12.jar!/META-INF/MANIFEST.MF
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Title : JAXB Reference Implementation 
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Version : 2.1.12
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Class-Path : jaxb-api.jar activation.jar jsr173_1.0_api.jar jaxb1-impl.jar
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Manifest-Version : 1.0
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Specification-Vendor : Sun Microsystems, Inc.
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Created-By : 1.5.0_12-b04 (Sun Microsystems Inc.)
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Ant-Version : Apache Ant 1.7.0
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Vendor : Sun Microsystems, Inc.
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Vendor-Id : com.sun
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Specification-Title : Java Architecture for XML Binding
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Specification-Version : 2.1
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Extension-Name : com.sun.xml.bind
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Build-Id : hudson-jaxb-ri-2.1-833
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Found JAXB reference implementation in jar:file:/F:/application/wyqh/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/tbp-web-app/WEB-INF/lib/jaxb-impl-2.1.12.jar!/META-INF/MANIFEST.MF
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Version : hudson-jaxb-ri-2.1-833
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: 
jar:file:/F:/application/wyqh/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/tbp-web-app/WEB-INF/lib/jaxb-xjc-2.2.1.1.jar!/META-INF/MANIFEST.MF
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Title : JAXB Reference Implementation 
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Version : 2.2.2
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Class-Path : jaxb-api.jar jaxb-impl.jar jsr173_1.0_api.jar activation.jar
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Manifest-Version : 1.0
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Specification-Vendor : Sun Microsystems, Inc.
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Created-By : 1.5.0_20-b02 (Sun Microsystems Inc.)
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Ant-Version : Apache Ant 1.7.1
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Vendor : Sun Microsystems, Inc.
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Implementation-Vendor-Id : com.sun
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Specification-Title : Java Architecture for XML Binding
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Specification-Version : 2.2.1
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Main-Class : com.sun.tools.xjc.XJCFacade
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Extension-Name : com.sun.tools.xjc
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.Context searchManifestsForJAXBImplementationInfo
信息: Build-Id : hudson-jaxb-ri-2.2-27
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.NamespacePrefixMapperUtils getPrefixMapper
警告: name: com.sun.xml.internal.bind.namespacePrefixMapper value: org.docx4j.jaxb.NamespacePrefixMapperSunInternal@619f4d36 .. trying RI.
七月 05, 2018 10:57:15 上午 org.docx4j.jaxb.NamespacePrefixMapperUtils tryUsingRI
信息: Using NamespacePrefixMapper, which is suitable for the JAXB RI

开始的时候 以为是JAXB有问题,在Stack Overflow上也没有找到想要的答案,后来想到可能是JVM内存不够,于是就加了参数


在eclipse中配置:



参数:-Xms512m -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=256M

问题解决。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值