wentwog Posted April 7, 2011 Share Posted April 7, 2011 On my report I have an input control. Using it, the user should select one value from the list. The list are to be read from IBM Tivoli LDAP.So I can't use JDBC Data Source and SQL query here. I think, I need to use the Bean Data Source, in which use Tivoly API to load the list.But, it seems, input controls don't support bean data sources, although the reports do.I' ve built a report that succesfully uses bean data source. Than, I try to use this bean data source for an input control and get the following error:net.sf.jasperreports.engine.JRRuntimeException: Parameter "REPORT_CONNECTION" does not exist. at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:569) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getParameterValue(JRAbstractQueryExecuter.java:433) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getParameterValue(JRAbstractQueryExecuter.java:445) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.<init>(JRJdbcQueryExecuter.java:90) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.<init>(JRTimezoneJdbcQueryExecuter.java:125) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuterFactory.createQueryExecuter(JRTimezoneJdbcQueryExecuterFactory.java:50) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRQueryExecuterAdapter.executeQuery(JRQueryExecuterAdapter.java:111) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeQuery(EngineServiceImpl.java:1055) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.executeQuery(ReportParametersAction.java:773) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:488) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:420) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:144) at com.jaspersoft.jasperserver.war.action.ViewReportAction.checkForParams(ViewReportAction.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98)and more . . . Can you help me out with the issue, please ?Post Edited by wentwog at 04/07/2011 07:14 Link to comment Share on other sites More sharing options...
wentwog Posted April 29, 2011 Author Share Posted April 29, 2011 Anyway, I have solved the problem.If somebody ever will encounter a similar problem, I supply my solution here.Yes, indeed, input controls do not support a BeanDataSource directly. But they do use queries. So you can create your custom queryExecutor, that uses your custom data source i.e. BeanDataSource. To do this you need:1) create custom QueryExecuterFactory by implementing net.sf.jasperreports.engine.query.JRQueryExecuterFactory. This factory would create objects of your custom QueryExecuter.2) create custom QueryExecuter by implementing net.sf.jasperreports.engine.query.JRQueryExecuter. This QueryExecuter would create objects of your custom DataSource.3) create custom DataSource by implementing net.sf.jasperreports.engine.JRDataSource. This data source is the point where you load data you need.4) register your QueryExecuterFactory in JasperServer: add line: net.sf.jasperreports.query.executer.factory.YOUR_QUERY_LANGUAGE=your.package.CustomQueryExecuterFactory to WEB-INF\classes\jasperreports.properties 5) register your query languge add property <value>YOUR_QUERY_LANGUAGE</value> under <property name="queryLanguages"> within file WEB-INF\flows\queryBeans.xml 6) register human-friendly label for YOUR_QUERY_LANGUAGE: add query.language.YOUR_QUERY_LANGUAGE.label=YOUR_QUERY_LANGUAGE_LABEL to WEB-INF\bundles\jasperserver_messages.properties and to any localized property files you have (if you need localization for the label, in most cases you don't) You can get the query string and report parameters (if you need of course) in method of the custom QueryExecuterFactory: your.package.CustomQueryExecuterFactory.createQueryExecuter(JRDataset dataset, Map parameters) Your get query from JRDataset, parameters from Map. Link to comment Share on other sites More sharing options...
loganathann Posted May 11, 2011 Share Posted May 11, 2011 I need example codes for creating and implementing data source...Please kindly help me.. Link to comment Share on other sites More sharing options...
wentwog Posted May 11, 2011 Author Share Posted May 11, 2011 loganathannWrote: I need example codes for creating and implementing data source...Please kindly help me.. See the attached "SampleJRDataSource.java".It's the example from which I have drawn information about dataSources.The full example can be found here http://enholm.net/index.php/blog/jasper-reports-custom-data-source-example/the full example is about using custom dataSource for report, not for input control, which is a little wider.If you need the dataSource just for input control, you only need the file I've attached. Hope it helps, good luck ! Link to comment Share on other sites More sharing options...
loganathann Posted May 12, 2011 Share Posted May 12, 2011 Thanks for your reply...But I am using MySQL DB as a Datasource..My applicationContext-hibernateDs.xml file contains datasource..I want to use this as a datasource foe HQL input control... I have attached the all the files...for HQL input control using Hibernate Data SourceCode:<bean id="sessionFactoryForHMS" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <!-- datasourse configuration for this session factory --> <property name="dataSource"> <ref bean="dataSourceForHMS" /> </property> <!-- Hibernate configuration location for this session factory --> <property name="configLocation" value="classpath:/hibernate/hibernate.cfg.xml" /> <!-- hbm mapping files location for this session factory--> <property name="mappingDirectoryLocations"> <value>file:/opt/rad/Radaptive-1.0/WEB-INF/classes/mappings</value> </property> </bean> <!-- ========================= RESOURCE DEFINITIONS ========================= --> <!-- Configurer that replaces ${...} placeholders with values from a properties file --> <!-- (in this case, JDBC-related settings for the dataSource definition below) --> <bean id="jdbcPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders" value="true"/> <property name="locations"><value>classpath:jdbc.properties</value></property> </bean> <!-- DataSource configuration for MySql Server --> <bean id="dataSourceForHMS" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <value>${jdbc.driverClassName}</value> </property> <property name="url"> <value>${jdbc.url}</value> </property> <property name="username"> <value>${jdbc.username}</value> </property> <property name="password"> <value>${jdbc.password}</value> </property> <property name="maxActive" value="100"/> <property name="timeBetweenEvictionRunsMillis" value="10000"/> <property name="numTestsPerEvictionRun" value="10"/> <property name="minEvictableIdleTimeMillis" value="30000"/> <!-- 40 secs --> <property name="maxWait" value="40000"/> <property name="poolPreparedStatements" value="false"/> <property name="defaultAutoCommit" value="true"/> </bean>My CustomQueryExcuterFactory:package com.radaptive.util;import java.util.Map;import net.sf.jasperreports.engine.JRDataset;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.query.JRQueryExecuter;import net.sf.jasperreports.engine.query.JRQueryExecuterFactory;public class CustomQueryExecuterFactory implements JRQueryExecuterFactory { /* (non-Javadoc) * @see net.sf.jasperreports.engine.query.JRQueryExecuterFactory#createQueryExecuter(net.sf.jasperreports.engine.JRDataset, java.util.Map) */ public JRQueryExecuter createQueryExecuter(JRDataset dataset, Map parameters) throws JRException { // TODO Auto-generated method stub return new CustomQueryExecuter(dataset, parameters); } /* (non-Javadoc) * @see net.sf.jasperreports.engine.query.JRQueryExecuterFactory#getBuiltinParameters() */ public Object[] getBuiltinParameters() { // TODO Auto-generated method stub return null; } /* (non-Javadoc) * @see net.sf.jasperreports.engine.query.JRQueryExecuterFactory#supportsQueryParameterType(java.lang.String) */ public boolean supportsQueryParameterType(String className) { // TODO Auto-generated method stub return true; }}My CustomQueryExecuter:package com.radaptive.util;import java.util.Map;import net.sf.jasperreports.engine.JRDataSource;import net.sf.jasperreports.engine.JRDataset;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.query.JRQueryExecuter;public class CustomQueryExecuter implements JRQueryExecuter { JRDataSource dataSource; public CustomQueryExecuter(JRDataset dataset, Map parameters) { // TODO Auto-generated constructor stub } public JRDataSource createDatasource() throws JRException { // TODO Auto-generated method stub return new CustomDataSource(dataSource); } public void close() { // TODO Auto-generated method stub } public boolean cancelQuery() throws JRException { // TODO Auto-generated method stub return false; }}My CustomDataSource:package com.radaptive.util;import net.sf.jasperreports.engine.JRDataSource;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JRField;public class CustomDataSource implements JRDataSource { JRDataSource dataSource; public CustomDataSource(JRDataSource dataSource2) { // TODO Auto-generated constructor stub } public boolean next() throws JRException { // TODO Auto-generated method stub return false; } public Object getFieldValue(JRField jrField) throws JRException { // TODO Auto-generated method stub return null; }} Link to comment Share on other sites More sharing options...
wentwog Posted May 12, 2011 Author Share Posted May 12, 2011 So, I see that you have not yet implemented your DataSource. You can use the example dataSource that I've attached in my previons post.Or do you encounter some problems doing it ? Link to comment Share on other sites More sharing options...
loganathann Posted May 12, 2011 Share Posted May 12, 2011 Thanks again..I have seen your examle program..here that you have loaded the object directly..but i need a implementation for Spring bean data sourceI dont know how to implement the datasource...for executing hql query in jasperserver for input control using Hibernate Data Source.. Link to comment Share on other sites More sharing options...
wentwog Posted May 12, 2011 Author Share Posted May 12, 2011 Unfortunately I have not used HSQL or Spring Aspect orientied Programming (AOP) with JasperServer.So I can give you only the general info about executing HSQL queries. (May be you already know it) First, you open Hibernate transaction, then Hibernate session, execute your HSQL query, close session, close transaction.If you are using Spring's AOP you can use declarative transaction and session management throught advisors.Unfortunately I have nor expirience, nor information about any specifics regarding usage of Hibernate or Spring together with JaserServer. Link to comment Share on other sites More sharing options...
loganathann Posted May 12, 2011 Share Posted May 12, 2011 okay..Thanks Mr.Wantwog for quik reply.. I am using Hibernate Data Source for Reports using Hql that works fine...But whe i using that data source for input control using hql query but i am getting ClassCastException..String cannot be cast to java.lang,ClassPost Edited by loganathann at 05/12/2011 11:41 Link to comment Share on other sites More sharing options...
wentwog Posted May 12, 2011 Author Share Posted May 12, 2011 There is nothing magical with input controls.What I have describes before is just the way how to intergate your java code with JasperServer for to read info from anywhere you want and can with Java, and then, to use the read data in inputControl.If you have such an error, try to figure out it's origin. Do you have the full stack trace ? Where the mentioned class casting occures ? Link to comment Share on other sites More sharing options...
loganathann Posted May 12, 2011 Share Posted May 12, 2011 This is my StackTrace:java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.ClassError Tracejava.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Class at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRQueryExecuterAdapter.getDatasetParameters(JRQueryExecuterAdapter.java:201) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRQueryExecuterAdapter.executeQuery(JRQueryExecuterAdapter.java:99) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeQuery(EngineServiceImpl.java:1055) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.executeQuery(ReportParametersAction.java:784) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:485) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:417) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:145) at com.jaspersoft.jasperserver.war.action.ViewReportAction.checkForParams(ViewReportAction.java:204) at com.jaspersoft.ji.report.options.actions.ReportOptionsViewAction.checkForParams(ReportOptionsViewAction.java:73) at sun.reflect.GeneratedMethodAccessor1188.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98) at org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:123) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:79) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101) at org.springframework.webflow.engine.State.enter(State.java:194) at org.springframework.webflow.engine.Flow.start(Flow.java:535) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:364) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:222) at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140) at sun.reflect.GeneratedMethodAccessor969.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy161.launchExecution(Unknown Source) at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193) at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.common.UploadMultipartFilter.doFilter(UploadMultipartFilter.java:83) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) at com.jaspersoft.jasperserver.war.security.JSSwitchUserProcessingFilter.doFilterHttp(JSSwitchUserProcessingFilter.java:154) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at com.jaspersoft.ji.license.JILicenseFilter.doFilter(JILicenseFilter.java:94) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:139) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:97) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at com.jaspersoft.jasperserver.multipleTenancy.MTBasicProcessingFilter.doFilterHttp(MTBasicProcessingFilter.java:180) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:184) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:184) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at com.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) 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:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Link to comment Share on other sites More sharing options...
wentwog Posted May 12, 2011 Author Share Posted May 12, 2011 I suppose the problem is in report's parameters.Your can look at the source code (http://jasperforge.org/svn/repos/jasperserver). Locate the version of JasperServer you are using.I use 4.0. And I've seen the error block: Object[] builtinParameters = queryExecuterFactory.getBuiltinParameters(); if (builtinParameters != null) { for (int i = 0; i < builtinParameters.length - 1; i += 2) { String name = (String) builtinParameters; Class type = (Class) builtinParameters[i + 1]; //!! this is the error line Object value = parameterValues.get(name); dsParameters.add(new ValueParameter(name, type, value)); } }But, looking in your code, you have posted bofore, I have found that you dont use builtinParameters for your dataSource,So, I conclude that you have changed your dataSource code, or the error corresponds to another data source you might use, or your JS verson is not 4.0.So, I advice you to go through the sources or try to remove the inputControl for which you are using your Hibernate dataSource, and see if it goes without errors.Good luck ! Link to comment Share on other sites More sharing options...
james_kwok Posted May 13, 2011 Share Posted May 13, 2011 Previously I've posted on loganathann issue as well but there seems to be no solution. I was using the Hibernate datasource implementation that comes with Jasper (inside example data source). Note that the problem doesn't happen when I choose to use JDBC datasource for the input control, so there should be something wrong with the Hibernate data source. Link to comment Share on other sites More sharing options...
tejinder6202 Posted April 8, 2013 Share Posted April 8, 2013 Hi ,I am trying to get webscraper example working on jasper server bvy doing the steps mentioned in "WENTWOG" .but i am getting following error ..2013-04-08 17:28:28,081 ERROR errorPage_jsp,http-9999-8:487 - stack trace of exception that redirected to errorPage.jsp java.lang.NullPointerException at com.jaspersoft.jasperserver.api.engine.jasperreports.util.CustomDataSourceDefinition.setDefaultValues(CustomDataSourceDefinition.java:209) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.CustomReportDataSourceServiceFactory.createDataSource(CustomReportDataSourceServiceFactory.java:80) at com.jaspersoft.jasperserver.war.action.DataSourceAction.newReportDataSource(DataSourceAction.java:590) at com.jaspersoft.jasperserver.war.action.DataSourceAction.createFormObject(DataSourceAction.java:552) at com.jaspersoft.jasperserver.war.action.DataSourceAction.initAction(DataSourceAction.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.javaIs there a problem in reading public static final String WEBSCRAPE_PATH = "C:/Program Files/jasperreports-server-cp-5.0.0/apache-tomcat/webapps/jasperserver/WEB-INF/bundles/webscraperds.properties"; Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now