Jump to content
Changes to the Jaspersoft community edition download ×

bhushan_makade

Members
  • Posts

    7
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by bhushan_makade

  1. Hi, I am sorry but i don't have that file which I changed with me. But, I vaguely remember the steps. Its not that difficult. I hope you can make it work with this. Following are the step: 1) There is one .properties(sorry..dont remember the file name) file in source code where we specify the "From Email address". Add one more entry there for ex error.report.email.address=xxx@gmail.com 2) There is one configuration XML(sorry..dont remember the file name) file where this key error.report.email.address is refered. This key is mapped with some string constant which in turn is being used in "ReportExecutionJob.java". 3) So, once you get hold of the email address which you want to send the error reports in ReportExecutionJob.java , you can write the if condition in code where they are attaching the report. Its hardly a two line of code that you need to add. If you do not want all these steps , off course you can hard code the email address in code itself but that wont be good practise. Let me know if you find this helpful. All the best. Regards, Bhushan
  2. Hi All, We are using jasper server 3.5 for generating and scheduling the reports from our application. But we have requirement of scheduling large reports like having row count of 1 million records. When we tried to generate or run such a report from jasper server , It takes lot of time and then just gives outofmemory error. We need to increase the JVM memory size. Apart from this, we came to know about SwapFileVirtualizerFactory in the similar thread. <bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory"> <property name="maxSize" value="400"></property> <property name="directory" value="${java.io.tmpdir}"></property> </bean> but there is some more configuartion given in that thread which we are not able to find in the jasperserver files Following is what we are searching for: jasperreports.properties Use these settings... net.sf.jasperreports.governor.max.pages.enabled=true net.sf.jasperreports.governor.timeout.enabled=true net.sf.jasperreports.jdbc.concurrency=readOnly net.sf.jasperreports.jdbc.fetch.size=-2147483648 net.sf.jasperreports.jdbc.holdability=close net.sf.jasperreports.jdbc.result.set.type=forwardOnly Please let us know if such a configuration is possible in jasperserver 3.5. Apart from this, once the report is scheduled, we can just receive it in emails.But emails have size limits so we can not send large reports through emails. So we need to make changes in jasper server such that the generated report can be stored in File System instead of email or db repository. We could find lot of related threads but no concrete solution for this. So, please reply if you have done something similar to this and any help in this regard will be appreciated. Thanks in advance.
  3. Thanks for this post. I was really wondering if i can generate the large reports using jasper server. I have a simillar requirement wherein i need to schedule the report which would be having around 1 million records. When i tried to run such big report on jasperserver , obviously i got OutOfMemory Exception. Also, i need to store the generated report in file system in stead of repository. We have jasperserver 3.5. I am not sure what version of jasper server you are using because i am not able to find the jasperreports.properties file in it. So it would be great if you can throw some light on it. Also, if you can help with report getting stored on the file system , would appreciate it. Thanks & Regards, Bhushan
  4. Hi, I am using jasper server 3.5 webservice API for scheduling reports from application. We have a requirement of sending the report as zip attachment. From API perspective i could not find a direct way wherein i can specify to zip the particular report. But when i dug into code, i found a code which is doing the compression/zip logic Please see the attached code. So , just wanted to know if my report has more than one file, then only jasper will implicitely do the compression of that report? or is there any way i can specify to compress a report for me even if it has just one file? Code:protected void attachOutput(MimeMessageHelper messageHelper, ReportOutput output) throws MessagingException, JobExecutionException { String attachmentName; DataContainer attachmentData; if (output.getChildren().isEmpty()) { attachmentName = output.getFilename(); attachmentData = output.getData(); } else { attachmentData = createDataContainer(); boolean close = true; ZipOutputStream zipOut = new ZipOutputStream(attachmentData.getOutputStream()); try { zipOut.putNextEntry(new ZipEntry(output.getFilename())); StreamUtils.pipeData(output.getData().getInputStream(), zipOut); zipOut.closeEntry(); for (Iterator it = output.getChildren().iterator(); it.hasNext();) { ReportOutput child = (ReportOutput) it.next(); String childName = getChildrenFolderName(output.getFilename()) + '/' + child.getFilename(); zipOut.putNextEntry(new ZipEntry(childName)); StreamUtils.pipeData(child.getData().getInputStream(), zipOut); zipOut.closeEntry(); } zipOut.finish(); zipOut.flush(); close = false; zipOut.close(); } catch (IOException e) { throw new JSExceptionWrapper(e); } finally { if (close) { try { zipOut.close(); } catch (IOException e) { log.error("Error closing stream", e); } } } attachmentName = output.getFilename() + ".zip"; } try { attachmentName = MimeUtility.encodeWord(attachmentName, getCharacterEncoding(), null); } catch (UnsupportedEncodingException e) { throw new JSExceptionWrapper(e); } messageHelper.addAttachment(attachmentName, new DataContainerResource(attachmentData)); }
  5. Hi Lucian, Thanks a lot for your suggestion. We have implemented the logic in "ReportExecutionJob " class such that , in case of exception, it will read the "exception email address" from the properties file and send the error attachment file to that email address instead actual "toAddress". But, we are still worried about the fact that our JasperServer application is deployed in clustered environment. And just you mentioned , we have two instances of jasperserver pointing to the same metadata database. So, its creating concurrency issues when multiple reports are scheduled at the same time. So we are looking for the workaround for this problem. We are thinking of implementing "FOR UPDATE SKIP LOCKED" property of oracle. Please let us know if this is the right direction. Also, if you have any suggestion in this regards, like which files in source codes need to be modified , it would be of great help.. Thanks in advance.. regards, bhushan
  6. This is just one example where i am getting the error file as well as the report. but there may be other scenarios as well ..like... the generated file name already exists in the specific folder of scheduled reports and i have not put "overwrite" option to true.....it will throw exception at run time after report generation..... so i will get that exception in file as attachement.... can this be handled through code?...did anyone ever faced such issues?..... as far as code is concerned ..the API which i am using look pretty straightforward..... i am just building the "JobMailNotification " object and setting it in "Job" object .... This is a killer issue.... Code:com.jaspersoft.jasperserver.api.JSExceptionWrapper: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.ContentRepoFileResource] with identifier [4557]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.ContentRepoFileResource#4557]Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.ContentRepoFileResource#4557] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1714) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2357) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2257) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2557) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.springframework.orm.hibernate3.HibernateTemplate$27.doInHibernate(HibernateTemplate.java:806) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367) at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:804) at com.jaspersoft.jasperserver.api.metadata.common.service.impl.HibernateDaoImpl.executeWriteCallback(HibernateDaoImpl.java:78) at com.jaspersoft.jasperserver.api.metadata.common.service.impl.HibernateDaoImpl.executeWriteCallback(HibernateDaoImpl.java:67) at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.saveResource(HibernateRepositoryServiceImpl.java:330) at sun.reflect.GeneratedMethodAccessor1357.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy18.saveResource(Unknown Source) at com.jaspersoft.jasperserver.multipleTenancy.PathTransformationRepositoryService.saveResource(PathTransformationRepositoryService.java:445) at sun.reflect.GeneratedMethodAccessor1357.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy18.saveResource(Unknown Source) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.saveToRepository(ReportExecutionJob.java:862) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.saveToRepository(ReportExecutionJob.java:516) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:383) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:188) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
  7. Hi, I am using JasperSever 3.5 version and using webservices APIs to schedule the reports from my Application. Most of the time , it works fine and i get the Report in specific format as an Email Attachment. But, if for any unforseen reason , any exception occurs during the "report execution" of schduled job... still the email gets triggered and it contains the text file with error stack trace. My problem is, these reports are directly going to the clients, so i dont want exception file go to clients. So, please let me know if there is any feature/property in JasperServer where i can specify email address for receiving the errornous reports. or any workaround for redirecting the errornous reports to any other email id. or is this scenario unrealistic? Any help will be appreciated ..... Thanks in advance...
×
×
  • Create New...