我遇到了maven依赖的问题
我使用org.apache.poi.xwpf.converter.pdf maven依赖项将.docx传递给.pdf。 该库由maven下载,但JBoss引发了下一个异常:
java.lang.ClassNotFoundException: org.apache.poi.xwpf.converter.core.Options from [Module "deployment.EARAdmContractRest.ear:main" from Service Module Loader]
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
net.solser.admc.service.purchasingflow.PurchasingRequisitionService.sendFileToDownload(PurchasingRequisitionService.java:1174)
net.solser.admc.service.purchasingflow.PurchasingRequisitionService.sendFileToDownloadAndDeleteFile(PurchasingRequisitionService.java:1185)
net.solser.admc.service.purchasingflow.PurchasingRequisitionService.downloadDraftContract(PurchasingRequisitionService.java:347)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
net.solser.admc.filter.RequestSecurityFilter.doFilter(RequestSecurityFilter.java:48)
net.solser.filter.compress.GzipFilter.doFilter(GzipFilter.java:35)
我尝试将jars添加到Jboss或Ear lib,但不起作用。
任何想法。 罐。
答案 0 :(得分:0)
您需要在MANIFEST.MF文件中添加模块依赖项,即org.apache.poi.xwpf.converter.pd。
您可以使用Maven检查JBoss docs生成条目