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