Apache OpenOffice (AOO) Bugzilla – Issue 102106
RPT: Error opening report with image
Last modified: 2013-08-07 15:45:09 UTC
OO: BrOffice.org 3.1.0 RPT: 1.1.0 OS: Mac OS X 10.5.7 DB: Oracle JDBC I'm facing a problem trying to add images (company logo) to the report. I can insert the image (tried both jpg and png) and save the report, however when running it I get this error (when it doesn't crash OO): [jni_uno bridge error] UNO calling Java method execute: non-UNO exception occurred: java.lang.InternalError: Can't start the AWT because Java was started on the first thread. Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line java stack trace: java.lang.InternalError: Can't start the AWT because Java was started on the first thread. Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1723) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:993) at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.loadLibraries(Toolkit.java:1509) at java.awt.Toolkit.<clinit>(Toolkit.java:1530) at java.awt.Dimension.<clinit>(Dimension.java:68) at com.sun.star.report.SOImageService.getImageSize(SOImageService.java:87) at com.sun.star.report.SOImageService.getImageSize(SOImageService.java:131) at com.sun.star.report.pentaho.output.ImageProducer.produceFromURL(ImageProducer.java:394) at com.sun.star.report.pentaho.output.ImageProducer.produceFromString(ImageProducer.java:315) at com.sun.star.report.pentaho.output.ImageProducer.produceImage(ImageProducer.java:195) at com.sun.star.report.pentaho.output.OfficeDocumentReportTarget.startImageProcessing(OfficeDocumen tReportTarget.java:1269) at com.sun.star.report.pentaho.output.text.TextRawReportTarget.startOther(TextRawReportTarget.java:57 0) at com.sun.star.report.pentaho.output.OfficeDocumentReportTarget.startElement(OfficeDocumentReportT arget.java:709) at com.sun.star.report.pentaho.layoutprocessor.ImageElementLayoutController.generateImage(ImageElem entLayoutController.java:117) at com.sun.star.report.pentaho.layoutprocessor.ImageElementLayoutController.delegateContentGeneratio n(ImageElementLayoutController.java:88) at com.sun.star.report.pentaho.layoutprocessor.AbstractReportElementLayoutController.advance(Abstract ReportElementLayoutController.java:132) at org.jfree.report.flow.AbstractReportProcessor.processReportRun(Unknown Source) at org.jfree.report.flow.SinglePassReportProcessor.processReport(Unknown Source) at com.sun.star.report.pentaho.PentahoReportJob.execute(PentahoReportJob.java:353) at com.sun.star.report.pentaho.SOReportJobFactory$_SOReportJobFactory.execute(SOReportJobFactory.jav a:219) This error happens once and subsequent tries to open the same report yield a slight different error: [jni_uno bridge error] UNO calling Java method execute: non-UNO exception occurred: java.lang.NoClassDefFoundError java stack trace: java.lang.NoClassDefFoundError at com.sun.star.report.SOImageService.getImageSize(SOImageService.java:87) at com.sun.star.report.SOImageService.getImageSize(SOImageService.java:131) at com.sun.star.report.pentaho.output.ImageProducer.produceFromURL(ImageProducer.java:394) at com.sun.star.report.pentaho.output.ImageProducer.produceFromString(ImageProducer.java:315) at com.sun.star.report.pentaho.output.ImageProducer.produceImage(ImageProducer.java:195) at com.sun.star.report.pentaho.output.OfficeDocumentReportTarget.startImageProcessing(OfficeDocumen tReportTarget.java:1269) at com.sun.star.report.pentaho.output.text.TextRawReportTarget.startOther(TextRawReportTarget.java:57 0) at com.sun.star.report.pentaho.output.OfficeDocumentReportTarget.startElement(OfficeDocumentReportT arget.java:709) at com.sun.star.report.pentaho.layoutprocessor.ImageElementLayoutController.generateImage(ImageElem entLayoutController.java:117) at com.sun.star.report.pentaho.layoutprocessor.ImageElementLayoutController.delegateContentGeneratio n(ImageElementLayoutController.java:88) at com.sun.star.report.pentaho.layoutprocessor.AbstractReportElementLayoutController.advance(Abstract ReportElementLayoutController.java:132) at org.jfree.report.flow.AbstractReportProcessor.processReportRun(Unknown Source) at org.jfree.report.flow.SinglePassReportProcessor.processReport(Unknown Source) at com.sun.star.report.pentaho.PentahoReportJob.execute(PentahoReportJob.java:353) at com.sun.star.report.pentaho.SOReportJobFactory$_SOReportJobFactory.execute(SOReportJobFactory.jav a:219) I also noticed I set the image attributes as scale = yes and keep aspect ratio (I don't know if these are the correct terms as my OO is localized), but when I reopen the report in design mode, the same attributes are scale = yes and scale to fit.
confirming, assigning, targeting
fs->oj: you might need to check with our Java/Mac gurus about this. I seem to remember that there's a known problem with calling AWT code on Mac. Perhaps we need to find an implementation of SOImageService.getImageSize which does not call into AWT.
"Can't start the AWT because Java was started on the first thread." → duplicate *** This issue has been marked as a duplicate of 92926 ***
closing duplicate. Not 100% whether the subsequent error is just a side effect of the other one (my guess is yes, but who knows). Please check once a test-build with the fix of the other issue is available and double-check.