| Author |
Message |
|
|
To close the issue completely: in order to make the change permanent and avoid having to change the font type in every document, re-pack BiRT as a war file on the server after modifying:
Server\webapps\SpagoBIBirtReportEngine\WEB-INF\platform\plugins\org.eclipse.birt.report.engine.fonts_2.6.1.v20100812\fontsConfig_pdf.xml
The mapping by default is sans-serif --> Helvetica. Switch it into something like Arial and your russian exports should work fine. Also, notice that windows configuration maps it to Arial by default, while on other systems it is mapped to other font types.
|
 |
|
|
|
Sorry, I missread my own quote. By doing step 4, the issue was solved.
|
 |
|
|
Greetings,
I am testing BiRT with russian charset. It displays properly on the web browser, but it doesn't when exported to pdf. Here are two images: the first one is a capture of the web, and the second one is from the exported pdf:
After searching for the issue, I found this from BiRT itself:
Fonts. BIRT PDF output doesn't work good for Russian fonts out-of-the-box, because of licensing issues with fonts. One simple solution to fix this is:
Get the *.ttf font files you need (you can copy them from any Windows installation, look in c:\Windows\Fonts). These 8 files should be enough in most cases (these are "Arial" and "Times New Roman" fonts):
arialbd.ttf arialbi.ttf ariali.ttf arial.ttf
timesbd.ttf timesbi.ttf timesi.ttf times.ttf
Copy these files to /usr/share/fonts/truetype (or any other place that is referenced from fontsConfig.xml).
Don't forget to fix file permissions:
chmod a+r /usr/share/fonts/truetype/*.ttf
Reference the fonts from *.rptdesign (or configure font-aliases):
/report/styles
<style name="report" id="4">
<property name="fontFamily">"Arial"</property>
<property name="fontSize">9pt</property>
</style>
Restart Tomcat:
$CATALINA_HOME/bin/shutdown.sh
$CATALINA_HOME/bin/startup.sh
But in BiRT's integration with SPAGO, I think the pdf exporting engine is outside of the base BiRT package, for I see nothing that would allow this implementation. Any ideas to solve this issue?
Furthermore, Adobe requested to install a language package to display this particular charset. If that could be avoided, it would be great.
|
 |
|
|
|
Ok, answering myself. In the properties view of the business model, change "OTHER" mapping to something suitable, and it works!
|
 |
|
|
Greetings. While evaluating SpagoBI suite and using Meta (and Studio) to generate the Business Model - by following the book from the store -, classes and queries, I encountered the following issue. When using some database tables to generate a class and then its query, all goes fine, but I have trouble using other tables at the query generation moment, getting this exception:
java.lang.RuntimeException: Impossible to build model structure
Caused by: org.hibernate.MappingException: property mapping has wrong number of columns: it.eng.spagobi.meta.T_07001.ABORT_REASON type: object
(full trace later).
I have been checking the forums looking for possible similar issues, and my guess is that hibernate maps to an Object type the contents of the column, instead of the actual data type (NVARCHAR2(240 CHAR)). Unfortunately, on Studio or Meta I see no way to map hibernate resources myself, so if this is the problem, can anyone tell me where can I remap that Object cast to a String, for example? It could also be a dialect issue, but so far I can't see if that option can be configured, or is left to the driver selection (thin driver)
Now, the compulsory data to complete the report:
Your OS (Operative System), including if is a 32 or 64 bit edition: Windows 7 Professional 64-bit
Java version: 1.6.0_29 b11 (32 bit)
Version of SpagoBI Studio / Meta: 3.5.1 (issue happens on both Meta and Studio)
DBMS and version are you using to create a Metamodel and query: Oracle Database 11.2.0.1.0
A simple summary of the steps required to reproduce the error:
1.- Create business model and import the tables (all of them, so any relationship is kept; it also happens when importing just a few tables)
2.- Create classes (one per table)
3.- Create query: here the exception happens, always when a table of type NVARCHAR2 is present; so editor cannot open (see logs below)
Always look a the logs file for any errors:
Could not open the editor: Impossible to initialize editor [it.eng.spagobi.meta.querybuilder.ui.editor.SpagoBIDataSetEditor]: [PersistenceUnit: SimpleSDOU_1347263075062] Unable to build EntityManagerFactory
Query editor cannot be opened wrote:java.lang.RuntimeException: Impossible to build model structure
at it.eng.qbe.model.structure.builder.jpa.JPAModelStructureBuilder.build(JPAModelStructureBuilder.java:175)
at it.eng.qbe.datasource.jpa.JPADataSource.getModelStructure(JPADataSource.java:139)
at it.eng.qbe.datasource.jpa.JPADataSourceWithClassLoader.getModelStructure(JPADataSourceWithClassLoader.java:41)
at it.eng.spagobi.meta.querybuilder.ui.QueryBuilder.<init>(QueryBuilder.java:91)
at it.eng.spagobi.meta.querybuilder.ui.editor.SpagoBIDataSetEditor.init(SpagoBIDataSetEditor.java:141)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1429)
at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:942)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: SimpleSDOU_1347263075062] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:912)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at it.eng.qbe.datasource.jpa.JPADataSource.initEntityManagerFactory(JPADataSource.java:71)
at it.eng.qbe.datasource.jpa.JPADataSourceWithClassLoader.open(JPADataSourceWithClassLoader.java:61)
at it.eng.qbe.datasource.jpa.JPADataSource.getEntityManager(JPADataSource.java:96)
at it.eng.qbe.model.structure.builder.jpa.JPAModelStructureBuilder.build(JPAModelStructureBuilder.java:82)
... 42 more
Caused by: org.hibernate.MappingException: property mapping has wrong number of columns: it.eng.spagobi.meta.T_07001.ABORT_REASON type: object
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:465)
at org.hibernate.mapping.RootClass.validate(RootClass.java:235)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1335)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1838)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:903)
... 48 more
Thanks for your attention.
|
 |
|
|
|
|