zoukankan      html  css  js  c++  java
  • NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist

    错误:“NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.”
    org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.
    at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:191)
    at org.xhtmlrenderer.resource.XMLResource.load(XMLResource.java:75)
    at org.xhtmlrenderer.pdf.ITextRenderer.setDocumentFromString(ITextRenderer.java:158)
    at org.xhtmlrenderer.pdf.ITextRenderer.setDocumentFromString(ITextRenderer.java:153)
    at com.iris.egrant.utils.pdf.PDFUtil.exportPdfFile(PDFUtil.java:932)
    at com.iris.egrant.utils.pdf.PDFUtil.remoteExportPdfFile(PDFUtil.java:824)
    at com.iris.egrant.service.pdf.PdfServiceImpl.genPdf(PdfServiceImpl.java:627)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at com.sun.proxy.$Proxy86.genPdf(Unknown Source)
    at com.iris.egrant.webapp.struts2.pdf.PdfAction.genPdf(PdfAction.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:894)
    at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1539)
    at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
    at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)
    at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)
    at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1615)
    at ognl.ASTMethod.getValueBody(ASTMethod.java:91)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
    at ognl.SimpleNode.getValue(SimpleNode.java:258)

    解决办法:
    Looks like you have issue with wrong version of xerces. Search PATH_TO_TOMCAT/webapps/YOUR_APP/WEB-INF/lib for xml-apis, xerces, xercesImpl and xmlParserAPIs. If you have 2 of them - exclude one in build.gradle.
    effectively a new xercesImpl jar was the cause of the problem.
    实际处理办法:mv xercesImpl-2.8.1.jar xercesImpl-2.8.1.jar_bak 将lib中的xercesImpl-2.8.1.jar删除即可

  • 相关阅读:
    Github进不去解决方法
    微信小程序中使用iconfont的方法
    curl实现SFTP上传下载文件
    curl实现SFTP上传下载文件
    curl不支持sftp的解决方法
    sscanf遇到回车换行认为字符串结束,怎样让它忽略这些回车换行继续搜索整个字符串?
    史上最全阿里 Java 面试题总结及答案
    VS Code的Error: Running the contributed command: ‘_workbench.downloadResource‘ failed解决
    云锵投资 2021 年 07 月简报
    看完段永平的100条思考,我终于悟出他为何这么牛…(转载)
  • 原文地址:https://www.cnblogs.com/jianzhou/p/13501532.html
Copyright © 2011-2022 走看看