Jump to content
We've recently updated our Privacy Statement, available here ×

Error in executing report in jasperserver


usmansaleem

Recommended Posts

Hi,

I am attempting to do a test on one of my client's reports on JasperServer CE 3.7, I am getting attached exception. Any ideas which class is missing from classpath and how to resolve it? I am able to run the report locally without any issues.

Code:
java.lang.ClassNotFoundException: org.mozilla.javascript.EvaluatorException	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)	java.lang.Class.forName0(Native Method)	java.lang.Class.forName(Class.java:247)	net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:157)	net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115)	net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:511)	net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.compileReport(EngineServiceImpl.java:887)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.compileReport(EngineServiceImpl.java:1338)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.CacheableCompiledReports.getData(CacheableCompiledReports.java:58)	com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.saveData(HibernateRepositoryCache.java:177)	com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.getCachedItem(HibernateRepositoryCache.java:107)	com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.cache(HibernateRepositoryCache.java:67)	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)	java.lang.reflect.Method.invoke(Method.java:597)	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	com.jaspersoft.jasperserver.api.common.util.spring.ReattemptMethodInterceptor.invoke(ReattemptMethodInterceptor.java:51)	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)	$Proxy8.cache(Unknown Source)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.getCompiledReport(EngineServiceImpl.java:896)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.getJasperReport(EngineServiceImpl.java:658)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:369)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:871)	com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:57)	com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:319)	com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:383)	com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:373)	com.jaspersoft.jasperserver.war.action.ViewReportAction.runReport(ViewReportAction.java:255)	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)	java.lang.reflect.Method.invoke(Method.java:597)	org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98)	org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:123)	org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)	org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)	org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:79)	org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)	org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)	org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)	org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)	org.springframework.webflow.engine.State.enter(State.java:194)	org.springframework.webflow.engine.Transition.execute(Transition.java:227)	org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:391)	org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)	org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)	org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)	org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:386)	org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)	org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)	org.springframework.webflow.engine.State.enter(State.java:194)	org.springframework.webflow.engine.Flow.start(Flow.java:535)	org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:364)	org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:222)	org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)	sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)	java.lang.reflect.Method.invoke(Method.java:597)	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)	org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66)	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)	$Proxy17.launchExecution(Unknown Source)	org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)	org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174)	org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)	com.jaspersoft.jasperserver.war.common.UploadMultipartFilter.doFilter(UploadMultipartFilter.java:83)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)	com.jaspersoft.jasperserver.war.security.JSSwitchUserProcessingFilter.doFilterHttp(JSSwitchUserProcessingFilter.java:146)	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)	org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:139)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:97)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:175)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:175)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	com.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)	org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)	org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)	com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67)	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
Link to comment
Share on other sites

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

Hi vickirk,

 

It is suppose to be JDK 1.6 (on OpenSuse), however, it was a pre-configured JDK available with my client's VPS provider. I have a sneaking suspicion that if I install a fresh downloaded JDK from Sun/Oracle myself, this error would probably be gone. Thanks for the hint about missing rhino library though. I will update the post how it goes through.

 

Usman

Link to comment
Share on other sites

Got the solution.

 

It seems that Jasper Server Community Edition 3.7.0 (http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperServer%203.7.0/jasperserver-ce-3.7.0-bin.zip/download) does not have rhino javascript library bundled with it (I am not sure about the automated installer). The iReport bundles rhino library in ireport/modules/ext/rhino-1.7R1.jar which gave me hint that perhaps same jar should also find its way to jasperserver/WEB-INF/lib folder. I downloaded latest Rhino library from http://www.mozilla.org/rhino/download.html and placed it under lib folder and voila, things start working again.

 

The specific error in my report was that JasperServer was unable to find one of the tables in report query, which probably lead to evaluatorexception which was not available on classpath (it is not part of standard Java 6 SDK/JRE).

 

Hope this helps anyone else having same problems.

 

Regards,

 

Usman

Link to comment
Share on other sites

Sun/Oracle Java 6 JDK does have rhino javascript engine, however, JasperReports exclusively using latest rhino release which obviously is not part of JDK. Also I believe jasperreports are JDK 5 compatible, hence in that case they exclusively require rhino jar on classpath. I think that jasperserver should make rhino jar part of their distro or mention it as a dependency somewhere in the README. As I mentioned earlier, the iReport contains rhino's jar as an extension module.
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...