Adding a JAR file dependency

Hi Team ,

Currently we are using external fonts jars to be used inside our jasper reports

While following Adding External Jar file Dependency

attached below screen shots
1- External Lib

external-lib

2- gradle build file

gradle-repo

global-dep

3- project structure

project-structure

but it is not working , can u please advice for that .

Hi,

Could you give us an example project to reproduce error?

Hi @makagonova

This is our production environment , I will try to do sample project to simulate the same case ans share it with you

Thanks

Hi @makagonova

below is our log , hope if we can got support for that one

01:17:50.999 ERROR c.h.cuba.core.sys.ServiceInterceptor - Exception:

com.company.vp.exception.BusinessValidationException: File not found: d9c134bf-18ee-a908-e436-b61e56560313

at com.company.vp.service.ReportServiceBean.getJasperReport(ReportServiceBean.java:92) ~[classes/:na]

at com.company.vp.service.ReportServiceBean.getReportsResults(ReportServiceBean.java:551) ~[classes/:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]

at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[shared/:na]

at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) ~[shared/:na]

at com.haulmont.cuba.core.sys.TransactionalInterceptor.aroundInvoke(TransactionalInterceptor.java:58) ~[classes/:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]

at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) ~[shared/:na]

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) ~[shared/:na]

at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[shared/:na]

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366) ~[shared/:na]

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:99) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[shared/:na]

at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) ~[shared/:na]

at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:90) ~[classes/:na]

at jdk.internal.reflect.GeneratedMethodAccessor190.invoke(Unknown Source) ~[na:na]

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]

at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) ~[shared/:na]

at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) ~[shared/:na]

at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[shared/:na]

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[shared/:na]

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[shared/:na]

at com.sun.proxy.$Proxy244.getReportsResults(Unknown Source) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]

at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94) ~[classes/:na]

at

com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:159) ~[na:na]

at com.sun.proxy.$Proxy358.getReportsResults(Unknown Source) ~[na:na]

at com.company.vp.web.payroll.RunReports.onRunReportsBtnClick(RunReports.java:297) ~[na:na]

at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[classes/:na]

at com.haulmont.cuba.web.gui.components.WebAbstractComponent.publish(WebAbstractComponent.java:100) ~[na:na]

at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:70) ~[na:na]

at com.haulmont.cuba.web.widgets.CubaButton.fireClick(CubaButton.java:76) ~[na:na]

at com.vaadin.ui.Button$1.click(Button.java:57) ~[shared/:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]

at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[shared/:na]

at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[shared/:na]

at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) ~[shared/:na]

at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) ~[shared/:na]

at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) ~[shared/:na]

at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) ~[shared/:na]

at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[shared/:na]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578) ~[shared/:na]

at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) ~[shared/:na]

at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) ~[na:na]

at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) ~[na:na]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:876) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) ~[vpay.jar:na]

at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) ~[shared/:na]

at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) ~[shared/:na]

at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) ~[na:na]

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) ~[vpay.jar:na]

at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:214) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[vpay.jar:na]

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[vpay.jar:na]

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) ~[vpay.jar:na]

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1678) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:152) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[vpay.jar:na]

at org.eclipse.jetty.server.Server.handle(Server.java:505) ~[vpay.jar:na]

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) ~[vpay.jar:na]

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) ~[vpay.jar:na]

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) ~[vpay.jar:na]

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[vpay.jar:na]

at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:781) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917) ~[vpay.jar:na]

at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

01:17:51.021 ERROR com.haulmont.cuba.web.log.AppLog - Exception in com.haulmont.cuba.web.widgets.CubaButton:

com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc

at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:157) ~[shared/:na]

at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[shared/:na]

at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) ~[shared/:na]

at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) ~[shared/:na]

at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) ~[shared/:na]

at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) ~[shared/:na]

at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[shared/:na]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578) ~[shared/:na]

at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) ~[shared/:na]

at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) ~[classes/:na]

at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) ~[classes/:na]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:876) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) ~[vpay.jar:na]

at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) ~[shared/:na]

at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) ~[shared/:na]

at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) ~[classes/:na]

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) ~[vpay.jar:na]

at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:214) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[vpay.jar:na]

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[vpay.jar:na]

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[vpay.jar:na]

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) ~[vpay.jar:na]

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1678) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:152) ~[vpay.jar:na]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[vpay.jar:na]

at org.eclipse.jetty.server.Server.handle(Server.java:505) ~[vpay.jar:na]

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) ~[vpay.jar:na]

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) ~[vpay.jar:na]

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) ~[vpay.jar:na]

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[vpay.jar:na]

at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:781) ~[vpay.jar:na]

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917) ~[vpay.jar:na]

at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

Caused by: java.lang.reflect.InvocationTargetException: null

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]

at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[shared/:na]

... 49 common frames omitted

Caused by: com.company.vp.exception.BusinessValidationException: File not found: d9c134bf-18ee-a908-e436-b61e56560313

at com.company.vp.service.ReportServiceBean.getJasperReport(ReportServiceBean.java:92) ~[na:na]

at com.company.vp.service.ReportServiceBean.getReportsResults(ReportServiceBean.java:551) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]

at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[shared/:na]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[shared/:na]

at

Hi,
This exception is thrown in the code of your project, so I am not sure what you expected from CUBA community.

Hi @Alex ,

The last exception was not related to the main issue , I was describing at first ,
If you noticed that i was describing issue related to jars packaging inside cuba,
And was my main issue , may be i put something wrongly without notice.
And i did already fixed that issue

Thanks for your support.