- Code: Select all
2018-08-30T12:33:07.383+0300 ERROR [Thttp-nio-8080-exec-29] [] [org.docx4j.XmlUtils$LoggingErrorListener:1537] Cannot find class 'org.docx4j.utils.XSLTUtils'.
javax.xml.transform.TransformerException: Cannot find class 'org.docx4j.utils.XSLTUtils'.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.passErrorsToListener(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at org.docx4j.XmlUtils.getTransformerTemplate(XmlUtils.java:1202)
at org.docx4j.jaxb.JaxbValidationEventHandler.getMcPreprocessor(JaxbValidationEventHandler.java:63)
at org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware.unmarshal(JaxbXmlPartXPathAware.java:507)
at org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware.unmarshal(JaxbXmlPartXPathAware.java:346)
at org.docx4j.openpackaging.parts.JaxbXmlPart.getContents(JaxbXmlPart.java:176)
at org.docx4j.openpackaging.parts.JaxbXmlPart.getJaxbElement(JaxbXmlPart.java:198)
at com.services.utils.TemplateFields.injectXml(TemplateFields.java:432)
at com.services.utils.CreateWordByFilter.create_melave_letter(CreateWordByFilter.java:1060)
at com.services.utils.CreateWordByFilter.melave_letter(CreateWordByFilter.java:886)
at com.services.MevakerOperations.createMelaveLetter(MevakerOperations.java:549)
at com.services.MevakerOperations.createMelaveAndReports(MevakerOperations.java:557)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.documentum.bps.outbound.bof.runtime.BOFClient.invokeMethod(BOFClient.java:112)
at com.documentum.bps.outbound.bof.runtime.BofModuleService.executeServiceOperation(BofModuleService.java:149)
at com.documentum.bps.outbound.AbstractService.executeServiceInternal(AbstractService.java:122)
at com.documentum.bps.outbound.AbstractService.execute(AbstractService.java:79)
at com.documentum.bpm.engine.utils.InvokeOutboundService.executeService(InvokeOutboundService.java:109)
at com.documentum.bpm.engine.utils.InvokeOutboundService.invokeService(InvokeOutboundService.java:69)
at com.documentum.bpm.engine.model.activity.OutboundActivityTaskHandler.executeWorkitem(OutboundActivityTaskHandler.java:47)
at com.documentum.bpm.engine.runtime.AutomaticWorkitemHandler.executeService(AutomaticWorkitemHandler.java:257)
at com.documentum.bpm.engine.runtime.AutomaticWorkitemHandler.execute(AutomaticWorkitemHandler.java:120)
at com.documentum.bpm.engine.runtime.ProcessEngineImpl.recursiveAutomaticWorkitemExecution(ProcessEngineImpl.java:265)
at com.documentum.bpm.engine.runtime.ProcessEngineImpl.executeSync(ProcessEngineImpl.java:225)
at com.documentum.bpm.engine.runtime.ProcessEngineImpl.runWorkflowByExecutingAutoActs(ProcessEngineImpl.java:185)
at com.documentum.bpm.engine.StatelessEngine.executeInternal(StatelessEngine.java:188)
at com.documentum.bpm.engine.StatelessEngine.execute(StatelessEngine.java:158)
at com.emc.xcp.rest.core.process.commons.StatelessWorkflowEngineWrapper.execute(StatelessWorkflowEngineWrapper.java:45)
at com.emc.xcp.rest.core.process.dao.impl.ProcessDaoImpl.startStatelessProcess(ProcessDaoImpl.java:190)
at com.emc.xcp.rest.core.process.dao.impl.ProcessDaoImpl.startProcess(ProcessDaoImpl.java:110)
at com.emc.xcp.rest.core.process.service.impl.ProcessServiceImpl.startProcess(ProcessServiceImpl.java:22)
at com.emc.xcp.rest.core.process.controller.ProcessController.startProcess(ProcessController.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at com.emc.xcp.rest.security.filter.BasicAuthFilter.doFilter(BasicAuthFilter.java:52)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:155)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at com.emc.xcp.rest.security.filter.CSRFTokenFilter.doFilter(CSRFTokenFilter.java:22)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.emc.xcp.rest.security.filter.RepositoryInfoFilter.doFilter(RepositoryInfoFilter.java:33)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.emc.xcp.ui.LocaleFilter.doFilter(LocaleFilter.java:26)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at com.emc.xcp.ui.web.filter.CustomCharEncodingFilter.doFilterInternal(CustomCharEncodingFilter.java:43)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at com.emc.xcp.ui.CompressingFilterProxy.doFilter(CompressingFilterProxy.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
2018-08-30T12:33:07.383+0300 ERROR [Thttp-nio-8080-exec-29] [] [org.docx4j.XmlUtils$LoggingErrorListener:1537] Cannot find external method 'org.docx4j.utils.XSLTUtils.logWarn' (must be public).
javax.xml.transform.TransformerException: Cannot find external method 'org.docx4j.utils.XSLTUtils.logWarn' (must be public).
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.passErrorsToListener(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at org.docx4j.XmlUtils.getTransformerTemplate(XmlUtils.java:1202)
at org.docx4j.jaxb.JaxbValidationEventHandler.getMcPreprocessor(JaxbValidationEventHandler.java:63)
at org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware.unmarshal(JaxbXmlPartXPathAware.java:507)
at org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware.unmarshal(JaxbXmlPartXPathAware.java:346)
at org.docx4j.openpackaging.parts.JaxbXmlPart.getContents(JaxbXmlPart.java:176)
at org.docx4j.openpackaging.parts.JaxbXmlPart.getJaxbElement(JaxbXmlPart.java:198)
at com.services.utils.TemplateFields.injectXml(TemplateFields.java:432)
at com.services.utils.CreateWordByFilter.create_melave_letter(CreateWordByFilter.java:1060)
at com.services.utils.CreateWordByFilter.melave_letter(CreateWordByFilter.java:886)
at com.services.MevakerOperations.createMelaveLetter(MevakerOperations.java:549)
at com.services.MevakerOperations.createMelaveAndReports(MevakerOperations.java:557)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
the error reffer to:
at com.services.utils.TemplateFields.injectXml(TemplateFields.java:432)
- Code: Select all
public void injectXml(WordprocessingMLPackage wordMLPackage,Map<String, String> attrValues) throws Exception {
RelationshipsPart rp = wordMLPackage.getMainDocumentPart().getRelationshipsPart();
HeaderPart header = null;
FooterPart footer = null;
for (Relationship r : rp.getRelationships().getRelationship()) {
if (r.getType().equals(Namespaces.HEADER)) {
header = (HeaderPart) rp.getPart(r);
@SuppressWarnings("deprecation")
String headerXml = XmlUtils.marshaltoString(header.getJaxbElement(), true);
Object obj = XmlUtils.unmarshalString(injectTemplateValues(headerXml, attrValues));
header.setJaxbElement((org.docx4j.wml.Hdr) obj);
} else if (r.getType().equals(Namespaces.FOOTER)) {
footer = (FooterPart) rp.getPart(r);
@SuppressWarnings("deprecation")
String footerXml = XmlUtils.marshaltoString(footer.getJaxbElement(), true);
Object obj = XmlUtils.unmarshalString(injectTemplateValues(footerXml, attrValues));
footer.setJaxbElement((org.docx4j.wml.Ftr) obj);
}
}
MainDocumentPart part = wordMLPackage.getMainDocumentPart();
@SuppressWarnings("deprecation")
String mainXml = XmlUtils.marshaltoString(part.getJaxbElement(), true);
String inject = injectTemplateValues(mainXml,attrValues);
System.out.println(inject);
Object obj = XmlUtils.unmarshalString(inject);
part.setJaxbElement((org.docx4j.wml.Document) obj);
//System.out.println(":):): " + part.getContent().toString());
DocPropsCustomPart customPart = wordMLPackage.getDocPropsCustomPart();
updateCustomPart(customPart, attrValues);
}
what can i do?
tnx a lot