2016-12-14 76 views
0

我有一個問題,一個Maven依賴ClassNotFoundException的:org.apache.poi.xwpf.converter.core.Options模塊deployment.ear

我用org.apache.poi.xwpf.converter.pdf Maven的依賴關係將.docx傳遞給.pdf。 庫是下載的行家,但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) 

我嘗試添加罐到JBoss或耳lib中,而不是作品。

任何想法。 坦克。

回答

0

您需要在MANIFEST.MF文件中添加模塊依賴關係,例如org.apache.poi.xwpf.converter.pd。

您可以檢查JBoss docs關於使用Maven生成條目

相關問題