Jump to content

aegleston

Members
  • Posts

    7
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by aegleston

  1. According to Textpad the file is still ANSI encoded.  I'm probably the one missing the point here.  How do you know the file is UTF-8 encoded?  Please note I had to remove any columns (in the report definition) with text because they contained customer data.  When this report goes into production it will contain text columns with names and email addresses.

    Thanks.

    Andy

  2. I am not sure.  Here is what I did.  I downloaded the .csv report from our JasperServer website onto my Windows machine.  I then viewed the character encoding in Firefox by changing. csv to .html and navigating to View and Character Encoding.  This showed ISO-8859-1.  I then viewed the file in TextPad.  Textpad seemed to think the file was ANSI encoded.

    So it seems not to be a UTF-8 encoded file but I don't know for sure.

    Andy



    Post Edited by aegleston at 12/16/2009 15:48
  3. Hi,

    We use JasperServer 3.0 (will be upgrading soon to 3.5).  We are trying to export a csv type report with UTF-8 encoding.  The file appears to be ANSI encoded every time.  So far we have:

    1) Set the URIEncoding = "UTF-8" in the server.xml file in $TOMCAT_BASE/conf.

    2) Added the following line in $TOMCAT_BASE/webapps/jasperserver/WEB-INF/classes/jasperreports.properties:

    net.sf.jasperreports.export.character.encoding=UTF-8

    I have searched the forums for JasperServer, iReport and JasperReports.

    Is there a way to make the csv file use UTF-8 encoding?

    Thanks.

    Andy

  4. Hi,

     

    We are encountering compile problems in our production environment which is Tomcat 5.5/JasperServer 2.1/Java 1.5 JRE. These compile problems do not occur in our development environment using iReport 2.0.4. The production compile problem only occurs if we reference the DateUtils class which was recommended in these forums and is a big help with more powerful date handling. In iReport, we simply added the commons-lang-2.3.jar to the classpath. In production, we added commons-lang-2.3.jar to the webapps/jasperserver/WEB-INF/lib directory. Here are the errors we see when attempting to run a report:

     

    com.jaspersoft.jasperserver.api.JSExceptionWrapper: Errors were encountered when compiling report expressions class file: 1. The method addMonths(Date, int) is undefined for the type DateUtils value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addMonths(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=0$ <-------> 2. The method addDays(Date, int) is undefined for the type DateUtils value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addDays(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=1$ <-----> 3. The method addMonths(Date, int) is undefined for the type DateUtils value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addMonths(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=0$ <-------> 4. The method addDays(Date, int) is undefined for the type DateUtils value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addDays(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=1$ <-----> 5. The method addMonths(Date, int) is undefined for the type DateUtils value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addMonths(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=0$ <-------> 6. The method addDays(Date, int) is undefined for the type DateUtils value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addDays(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=1$ <-----> 6 errors

     

    com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

    1. The method addMonths(Date, int) is undefined for the type DateUtils

    value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addMonths(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=0$

    <------->

    2. The method addDays(Date, int) is undefined for the type DateUtils

    value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addDays(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=1$

    <----->

    3. The method addMonths(Date, int) is undefined for the type DateUtils

    value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addMonths(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=0$

    <------->

    4. The method addDays(Date, int) is undefined for the type DateUtils

    value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addDays(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=1$

    <----->

    5. The method addMonths(Date, int) is undefined for the type DateUtils

    value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addMonths(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=0$

    <------->

    6. The method addDays(Date, int) is undefined for the type DateUtils

    value = (java.util.Date)(org.apache.commons.lang.time.DateUtils.addDays(org.apache.commons.lang.time.DateUtils.truncate(new Date(), Calendar.MONTH), -1));//$JR_EXPR_ID=1$

    <----->

    6 errors

     

    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)

    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:220)

    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.compileReport(EngineServiceImpl.java:753)

    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$CacheableCompiledReports.getData(EngineServiceImpl.java:157)

    at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.saveData(HibernateRepositoryCache.java:186)

    at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.getCachedItem(HibernateRepositoryCache.java:125)

    at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryCache.cache(HibernateRepositoryCache.java:71)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

     

    We have tried the following according to other posts in this forum:

    1) added jdt-compiler-3.1.1.jar to the webapps/jasperserver/WEB-INF/lib directory.

    2) included the following in the jasperreports.properties file in webapps/jasperserver/WEB-INF/classes:

     

    org.eclipse.jdt.core.compiler.source=1.5

    org.eclipse.jdt.core.compiler.compliance=1.5

    org.eclipse.jdt.core.compiler.codegen.TargetPlatform=1.5

     

    We have also tried editing the setclasspath.sh Tomcat script to manually include the commons-lang-2.3.jar in the classpath. For some reason, Tomcat and JasperServer do not seem to see the commons-lang-2.3.jar file which includes the DateUtils class.

     

    Any help is appreciated.

     

    Andy

     

    Post edited by: aegleston, at: 2008/03/22 19:27

     

    Post edited by: aegleston, at: 2008/03/23 11:51

    Post edited by: aegleston, at: 2008/03/23 11:52

×
×
  • Create New...