Jump to content
We've recently updated our Privacy Statement, available here ×

lpennings

Members
  • Posts

    6
  • 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 lpennings

  1. When trying to execute the following line of code: JasperReport jr = (JasperReport) JRLoader.loadObject(sourceFile); I get the following exception: net/sf/jasperreports/engine/JasperPrint incompatible with net/sf/jasperreports/engine/JasperReport . I am using jasperrports-3.5.3.jar. Any ideas? The documentation for that class tells me that an Object is being returned for that method loadObject(File). Code:JasperReport jr = (JasperReport) JRLoader.loadObject(sourceFile);net/sf/jasperreports/engine/JasperPrint incompatible with net/sf/jasperreports/engine/JasperReport
  2. Can someone help me understand the subject of PROPERTY_TEXT_WRAP? I'm seeing that when the data populated in the cell is larger than the cell width, the text is wrapped. Simply put, if the column definition is 50 and the data returned to the cell is 100, the text will wrap. Even if I put the property_text_wrap.False, the text still wraps. Does anyone have any idea how to prevent text from wrapping? Any assistance would be greatly appreciated!
  3. I've figured out what the issue with the no input source found. The offending code is trying to set the PROPERTY_WRAP_TEXT, boolean.FALSE. the code is as follows:new JExcelApiExporter(); JExcelApiExporter xlsExporter = xlsExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());new HashMap();if (jasperPrint.getName().equalsIgnoreCase("DroppedUpc") || jasperPrint.getName().equalsIgnoreCase("InstructionSummary"))"65000")); As soon as the HashMap (m) is set to the parameters, all the previously set parameters are wiped out. Can someone give me some direction on how to set the PROPERTY_WRAP_TEXT properly? Any help is greatly appreciated. Thank you. xlsExporter.setParameter(JRExporterParameter.INPUT_FILE_NAME, destFile.toString()); xlsExporter.setParameter(JRXlsExporterParameter.INPUT_FILE, sourceFile); xlsExporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); xlsExporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE); m.put(JRXlsExporterParameter.PROPERTY_WRAP_TEXT,Boolean.FALSE); xlsExporter.setParameters(m); xlsExporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); xlsExporter.setParameter(JRXlsExporterParameter.MAXIMUM_ROWS_PER_SHEET, Integer.decode( xlsExporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); xlsExporter.exportReport();
  4. Some additional debugging information. [iNFO ]: - Loading XML bean definitions from URL [file:/opt/was61/AppServer/profiles/Appsrv01/installedApps/cvgrheespd002Node01Cell/ESpecApp.ear/fonts/fonts1298566395082.xml] [DEBUG]: - Using JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl] [DEBUG]: - Trying to resolve XML entity with public id [null] and system id [http://www.springframework.org/schema/beans/spring-beans-2.0.xsd] [DEBUG]: - Loading schema mappings from [META-INF/spring.schemas] [DEBUG]: - Loaded schema mappings: {http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/jms/spring-jms-2.5.xsd=org/springframework/jms/config/spring-jms-2.5.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/jms/spring-jms.xsd=org/springframework/jms/config/spring-jms-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd} [1894492 --- 8036]2011-02-25 11:49:07,824] [DEBUG]: - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.0.xsd [DEBUG]: - Loading bean definitions [DEBUG]: - Found 1 beans for extension type interface net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Creating shared instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Creating instance of bean 'fontBean12985663950821242' with merged definition [Root bean: class [net.sf.jasperreports.engine.fonts.SimpleFontFamily]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [file:/opt/was61/AppServer/profiles/Appsrv01/installedApps/cvgrheespd002Node01Cell/ESpecApp.ear/fonts/fonts1298566395082.xml]] [DEBUG]: - Eagerly caching bean 'fontBean12985663950821242' to allow for resolving potential circular references [DEBUG]: - Getting BeanInfo for class [net.sf.jasperreports.engine.fonts.SimpleFontFamily] [DEBUG]: - Caching PropertyDescriptors for class [net.sf.jasperreports.engine.fonts.SimpleFontFamily] [DEBUG]: - Found bean property 'boldItalicFace' of type [net.sf.jasperreports.engine.fonts.FontFace] [DEBUG]: - Found bean property 'boldFace' of type [net.sf.jasperreports.engine.fonts.FontFace] [DEBUG]: - Found bean property 'italicPdfFont' of type [java.lang.String] [DEBUG]: - Found bean property 'pdfEmbedded' of type [java.lang.Boolean] [DEBUG]: - Found bean property 'name' of type [java.lang.String] [DEBUG]: - Found bean property 'locales' of type [java.util.Set] [DEBUG]: - Found bean property 'pdfEncoding' of type [java.lang.String] [DEBUG]: - Found bean property 'italicFace' of type [net.sf.jasperreports.engine.fonts.FontFace] [DEBUG]: - Found bean property 'bold' of type [java.lang.String] [DEBUG]: - Found bean property 'boldItalicPdfFont' of type [java.lang.String] [DEBUG]: - Found bean property 'italic' of type [java.lang.String] [DEBUG]: - Found bean property 'normalFace' of type [net.sf.jasperreports.engine.fonts.FontFace] [DEBUG]: - Found bean property 'class' of type [java.lang.Class] [DEBUG]: - Found bean property 'boldPdfFont' of type [java.lang.String] [DEBUG]: - Found bean property 'boldItalic' of type [java.lang.String] [DEBUG]: - Found bean property 'normal' of type [java.lang.String] [DEBUG]: - Found bean property 'defaultExportFont' of type [java.lang.String] [DEBUG]: - Found bean property 'normalPdfFont' of type [java.lang.String] [DEBUG]: - Found bean property 'exportFonts' of type [java.util.Map] [DEBUG]: - Converting String to [class java.lang.Boolean] using property editor [org.springframework.beans.propertyeditors.CustomBooleanEditor@6ba76ba7] [DEBUG]: - Fill 906769932: created for SHELL_VALUES_REPORT [DEBUG]: - Fill 906769932: filling report [DEBUG]: - Found 0 beans for extension type interface net.sf.jasperreports.engine.scriptlets.ScriptletFactory [DEBUG]: - Fill 906769932: adding page 1 [DEBUG]: - Fill 906769932: title [DEBUG]: - Fill 906769932: creating subreport filler [DEBUG]: - Fill 535502827: created for SHELL_VALUES_REPORT_CLNT [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Fill 906769932: starting 535502827 [DEBUG]: - Fill 535502827: starting thread Thread[sHELL_VALUES_REPORT_CLNT subreport filler,5,main] [DEBUG]: - Fill 535502827: waiting for fill result [DEBUG]: - Fill 535502827: filling report [DEBUG]: - Fill 535502827: no data [DEBUG]: - Fill 535502827: all sections [DEBUG]: - Fill 535502827: column header [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Getting bean fontBean12985663950821242 as extension of type net.sf.jasperreports.engine.fonts.FontFamily [DEBUG]: - Returning cached instance of singleton bean 'fontBean12985663950821242' [DEBUG]: - Fill 535502827: ended [DEBUG]: - Fill 535502827: notifying of completion [DEBUG]: - Fill 535502827: notified of fill result [DEBUG]: - Fill 906769932: subreport 535502827 finished [DEBUG]: - Fill 906769932: ended [AUDIT]: - Report generation failed..No input source supplied to the exporter. [WARN ]: - No input source supplied to the exporter.
  5. Thank you Sanda for the help...that was the issue. The new exception is: [1894492 --- 8036]2011-02-25 11:49:08,367] [ERROR]: - No input source supplied to the exporter. com.acnielsen.arch.exception.arch.ACNException: No input source supplied to the exporter. at com.acnielsen.espec.bo.util.ExportDataToReportUtility.exportAsExcel(ExportDataToReportUtility.java:235) at com.acnielsen.espec.bo.util.ExportDataToReportUtility.generateJasperReport(ExportDataToReportUtility.java:138) at com.acnielsen.espec.bo.reports.ReportsBO.getReportsBO(ReportsBO.java:109) at com.acnielsen.espec.bo.reports.ScheduleLaterService.generateReportNow(ScheduleLaterService.java:434) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at com.acnielsen.espec.bo.reports.ScheduleLaterService.run(ScheduleLaterService.java:195) at com.acnielsen.standalone.main.ESpecReportsMain.main(ESpecReportsMain.java:51) Caused by: net.sf.jasperreports.engine.JRException: No input source supplied to the exporter. at net.sf.jasperreports.engine.JRAbstractExporter.setInput(JRAbstractExporter.java:845) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:169) at com.acnielsen.espec.bo.util.ExportDataToReportUtility.exportAsExcel(ExportDataToReportUtility.java:227) ... 9 more This report worked perfectly fine prior to the upgrade. Any ideas?
  6. I've read all the postings on this subject. I have generated my Arial.jar file which contains the arial.ttf family fonts. This jar along with the jasperreports-3.7.3, spring-2.5 jars are located on my WAS classpath. When I attempt to generate a report, I get the following exception: [1894435 --- 12628]2011-02-24 13:39:06,914] [DEBUG]: - Instantiating extensions registry class net.sf.jasperreports.extensions.DefaultExtensionsRegistry [1894435 --- 12628]2011-02-24 13:39:06,920] [DEBUG]: - Loading registries for cache key sun.misc.Launcher$AppClassLoader@755f755f [1894435 --- 12628]2011-02-24 13:39:06,922] [DEBUG]: - Found resource jasperreports_extension.properties at jar:file:/opt/was61/AppServer/profiles/Appsrv01/installedApps/cvgrheespd002Node01Cell/ESpecApp.ear/jasperreports-3.7.3.jar!/jasperreports_extension.properties in classloader sun.misc.Launcher$AppClassLoader@755f755f [1894435 --- 12628]2011-02-24 13:39:06,923] [DEBUG]: - Found resource jasperreports_extension.properties at jar:file:/opt/was61/AppServer/profiles/Appsrv01/installedApps/cvgrheespd002Node01Cell/ESpecApp.ear/Arial.jar!/jasperreports_extension.properties in classloader sun.misc.Launcher$AppClassLoader@755f755f [1894435 --- 12628]2011-02-24 13:39:06,924] [DEBUG]: - Loading JasperReports extension properties resource jar:file:/opt/was61/AppServer/profiles/Appsrv01/installedApps/cvgrheespd002Node01Cell/ESpecApp.ear/jasperreports-3.7.3.jar!/jasperreports_extension.properties [1894435 --- 12628]2011-02-24 13:39:06,926] [DEBUG]: - Instantiating registry of type net.sf.jasperreports.extensions.DefaultExtensionsRegistryFactory for property net.sf.jasperreports.extension.registry.factory.default [1894435 --- 12628]2011-02-24 13:39:06,926] [DEBUG]: - Instantiating extensions registry for default using factory class net.sf.jasperreports.extensions.DefaultExtensionsRegistryFactory [1894435 --- 12628]2011-02-24 13:39:06,927] [DEBUG]: - Instantiating registry of type net.sf.jasperreports.governors.GovernorExtensionsRegistryFactory for property net.sf.jasperreports.extension.registry.factory.governor [1894435 --- 12628]2011-02-24 13:39:06,927] [DEBUG]: - Instantiating extensions registry for governor using factory class net.sf.jasperreports.governors.GovernorExtensionsRegistryFactory [1894435 --- 12628]2011-02-24 13:39:06,928] [DEBUG]: - Instantiating registry of type net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory for property net.sf.jasperreports.extension.registry.factory.components [1894435 --- 12628]2011-02-24 13:39:06,928] [DEBUG]: - Instantiating extensions registry for components using factory class net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory [1894435 --- 12628]2011-02-24 13:39:06,951] [DEBUG]: - Loading JasperReports extension properties resource jar:file:/opt/was61/AppServer/profiles/Appsrv01/installedApps/cvgrheespd002Node01Cell/ESpecApp.ear/Arial.jar!/jasperreports_extension.properties [1894435 --- 12628]2011-02-24 13:39:06,952] [DEBUG]: - Instantiating registry of type net.sf.jasperreports.extensions.SpringExtensionsRegistryFactory for property net.sf.jasperreports.extension.registry.factory.fonts [1894435 --- 12628]2011-02-24 13:39:06,952] [DEBUG]: - Instantiating extensions registry for fonts using factory class net.sf.jasperreports.extensions.SpringExtensionsRegistryFactory [1894435 --- 12628]2011-02-24 13:39:07,009] [ERROR]: - Error instantiating extensions registry for fonts net.sf.jasperreports.engine.JRRuntimeException: Could not find Spring resource /fonts/fonts1298566395082.xml for extensions registry fonts at net.sf.jasperreports.extensions.SpringExtensionsRegistryFactory.getBeanFactory(SpringExtensionsRegistryFactory.java:91) at net.sf.jasperreports.extensions.SpringExtensionsRegistryFactory.createRegistry(SpringExtensionsRegistryFactory.java:73) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:238) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:213) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:162) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:132) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:104) at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:76) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:194) at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:181) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:76) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:86) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:56) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:78) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624) at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:513) at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:465) at com.acnielsen.espec.bo.util.ExportDataToReportUtility.generateShellValuesReport(ExportDataToReportUtility.java:465) at com.acnielsen.espec.bo.util.ExportDataToReportUtility.generateJasperReport(ExportDataToReportUtility.java:137) at com.acnielsen.espec.bo.reports.ReportsBO.getReportsBO(ReportsBO.java:109) at com.acnielsen.espec.bo.reports.ScheduleLaterService.generateReportNow(ScheduleLaterService.java:434) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at com.acnielsen.espec.bo.reports.ScheduleLaterService.run(ScheduleLaterService.java:195) at com.acnielsen.standalone.main.ESpecReportsMain.main(ESpecReportsMain.java:51) Any assistance would be greatly appreciated. I've attached my Arial.jar file for reference.
×
×
  • Create New...