Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: BIRT report with scripted dataset

  1. #1
    Join Date
    Dec 2007
    Posts
    5

    Default BIRT report with scripted dataset

    I am encountering an exception ‘ScriptClassNotFoundError’ when running a BIRT report with a scripted dataset in Pentaho Server Version: Pentaho BI Platform 1.7.0.1062.

    I have updated Pentaho to use BIRT 2.2 following the instructions in another post. I am able to run BIRT reports with no problems.

    However, if I create a BIRT report with a scripted dataset, I am running into errors when running the report in Pentaho (I am able to run the report in MyEclipse with no problems).

    I have installed the .rptdesign and .xaction in my solutions directory. I have installed the jar file which contains my scripted dataset (class extends ScriptedDataSetEventAdapter) in ../jboss/server/default/deploy/pentaho.war/WEB-INF/lib (also tried installing in ../pentaho-solutions/system/BIRT/plugins as well as other places), but he my dataset class is not found when running the report.


    Where should I install the jar which contains my scripted dataset?

    Thanks in advance for your help.


    Complete error message:
    Code:
    Error.ScriptClassNotFoundError ( 1 time(s) )detail : org.eclipse.birt.report.engine.api.EngineException: Class com.bmtcarhaul.reports.datasource.LoadFactors not found
     at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.getInstance(ScriptExecutor.java:138)
     at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.initEventHandler(DataSetScriptExecutor.java:49)
     at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.initEventHandler(ScriptDataSetScriptExecutor.java:47)
     at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.<init>(DataSetScriptExecutor.java:39)
     at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.<init>(ScriptDataSetScriptExecutor.java:42)
     at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.newScriptDataSet(ModelDteApiAdapter.java:553)
     at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.createDataSetDesign(ModelDteApiAdapter.java:208)
     at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.doDefineDataSet(ModelDteApiAdapter.java:276)
     at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.defineDataSet(ModelDteApiAdapter.java:235)
     at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:106)
     at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:94)
     at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59)
     at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:51)
     at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59)
     at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:138)
     at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:68)
     at org.pentaho.plugin.eclipsebirt.BIRTReportComponent.generateReport(BIRTReportComponent.java:471)
     at org.pentaho.plugin.eclipsebirt.BIRTReportComponent.executeAction(BIRTReportComponent.java:286)
     at org.pentaho.plugin.ComponentBase.execute(ComponentBase.java:459)
     at org.pentaho.core.runtime.RuntimeContext.executeComponent(RuntimeContext.java:1142)
     at org.pentaho.core.runtime.RuntimeContext.executeAction(RuntimeContext.java:1114)
     at org.pentaho.core.runtime.RuntimeContext.performActions(RuntimeContext.java:1026)
     at org.pentaho.core.runtime.RuntimeContext.executeLoop(RuntimeContext.java:981)
     at org.pentaho.core.runtime.RuntimeContext.executeSequence(RuntimeContext.java:884)
     at org.pentaho.core.runtime.RuntimeContext.executeSequence(RuntimeContext.java:780)
     at org.pentaho.core.solution.SolutionEngine.executeInternal(SolutionEngine.java:333)
     at org.pentaho.core.solution.SolutionEngine.execute(SolutionEngine.java:241)
     at org.pentaho.core.solution.SolutionEngine.execute(SolutionEngine.java:169)
     at org.pentaho.core.services.BaseRequestHandler.handleActionRequest(BaseRequestHandler.java:150)
     at org.pentaho.ui.servlet.ViewAction.handleActionRequest(ViewAction.java:139)
     at org.pentaho.ui.servlet.ViewAction.doGet(ViewAction.java:261)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
     at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
     at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.ui.switchuser.SwitchUserProcessingFilter.doFilter(SwitchUserProcessingFilter.java:341)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at com.pentaho.security.SecurityStartupFilter.doFilter(SecurityStartupFilter.java:76)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at com.pentaho.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:164)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at com.pentaho.security.HttpSessionReuseDetectionFilter.doFilter(HttpSessionReuseDetectionFilter.java:130)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
     at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
     at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.pentaho.core.system.SystemStatusFilter.doFilter(SystemStatusFilter.java:53)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.pentaho.ui.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassNotFoundException: com.bmtcarhaul.reports.datasource.LoadFactors
     at java.lang.ClassLoader.findClass(ClassLoader.java:358)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
     at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
     at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
     at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     at org.eclipse.birt.report.engine.executor.ExecutionContext$ApplicationClassLoader.loadClass(ExecutionContext.java:1527)
     at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.getInstance(ScriptExecutor.java:129)
     ... 89 more

  2. #2
    Join Date
    Dec 2007
    Posts
    5

    Default BIRT report working with scripted datasource

    In case anyone is interested, I got this working.

    I created a directory, scriptlib, in .../pentaho-solutions/system/BIRT

    I then created a method in BirtSystemListener.java to get a list of all jar files in the scriptlib directory concatenated as a string using the file system separator.

    Then in the createBIRTEngine() method in BirtSystemListener I set the EngineConstants.WEBAPP_CLASSPATH_KEY property in the EngineConfig object to be the list of the jars in the scriptlib directory.

  3. #3
    Join Date
    Jul 2008
    Posts
    1

    Unhappy i meet the same problem

    i couldn't find the location to put my hander class.
    Last edited by jullrun; 07-26-2008 at 04:52 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.