juanpzfz Posted March 30, 2007 Share Posted March 30, 2007 Hi, when I click to "expresion editor" button, nothing happens on UI but an exception raises (see below). It also happens to buttons related with edit expressions, for example "Add" button in "Condicional Styles" window. However other buttons like "Foreground" button or "Create.." in pattern field works fine. Thanks in advance. Environment:- iReport 1.3.1- jre j2sdk1.4.2_12- "Windows XP proffesional. Version 2002. Service pack 2"-------------------java.lang.IllegalArgumentException: unknown format type at at java.text.MessageFormat.makeFormat(MessageFormat.java:1426) at java.text.MessageFormat.applyPattern(MessageFormat.java:447) at it.businesslogic.ireport.gui.ExpressionEditor.caretUpdate(ExpressionEditor.java:1110) at it.businesslogic.ireport.gui.ExpressionEditor.<init>(ExpressionEditor.java:181) at it.businesslogic.ireport.gui.JRTextExpressionArea.jMenuItemTextEditorActionPerformed(JRTextExpressionArea.java:201) at it.businesslogic.ireport.gui.JRTextExpressionArea.editButtonActionPerformed(JRTextExpressionArea.java:369) at org.syntax.jedit.JEditTextArea$1.actionPerformed(JEditTextArea.java:163) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:480) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) Link to comment Share on other sites More sharing options...
csbac Posted April 1, 2007 Share Posted April 1, 2007 Hi!It might be a problem of the Java version ... maybe the format string used in the UI only works with Java 5.0 (aka JRE/JDK 1.5.0)? Mh, I can't find any difference in the documentation of MessageFormat in 1.4.2 and 1.5.0 ... Do you use any {} in text fields, except (cleanly formed) jasper report $P{} or other $X{} statements? Have a try with it,Sebastian Link to comment Share on other sites More sharing options...
juanpzfz Posted April 3, 2007 Author Share Posted April 3, 2007 Hi, On my reports I use $V{} and $F{}. But I've created an empty report just for testing with only one static field and I click on its "Print when expression" button and the same exception raises.I also tried with jre 1.5.0_11 (see java -version below). PD: My regional setting is Spanish-Spain, does it have any side effect? Thanks for your time. Juanpzfz ---------NOTE: at startup.bat I've added the java -version. The next output is the result (partial) of calling startup.bat. D:swiReport-1.3.1>java -versionjava version "1.5.0_11"Java 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)Java HotSpot Client VM (build 1.5.0_11-b03, mixed mode, sharing) D:swiReport-1.3.1>java -cp ";.classes;.fonts;;.libantlr-2.7.5.jar;.libasm-attrs.jar;.libasm.jar;.libbarbecue-1.1.jar;.libbsh-1.3.0.jar;.libcglib-2.1.jar;.libcincom-jr-xmla.jar;.libcommons-beanutils-1.7.jar;.libcommons-collections-2.1.jar;.libcommons-dbcp-1.2.1.jar;.libcommons-digester-1.7.jar;.libcommons-javaflow-20060411.jar;.libcommons-logging-1.0.2.jar;.libcommons-logging-api-1.0.2.jar;.libcommons-pool-1.3.jar;.libdom4j-1.6.jar;.libehcache-1.1.jar;.libeigenbase-properties.jar;.libeigenbase-resgen.jar;.libeigenbase-xom.jar;.libflexdock-0.4.1.jar;.libgroovy-all-1.0-beta-10.jar;.libhibernate3.jar;.libhsqldb-1.7.1.jar;.libiReport.jar;.libitext-1.3.1.jar;.libjakarta-bcel-20050813.jar;.libJasperBabylon-1.0.0.jar;.libjasperreports-1.3.1.jar;.libjavacup.jar;.libjcmdline-1.0.2.jar;.libjcommon-1.0.0.jar;.libjdt-compiler-3.1.1.jar;.libjfreechart-1.0.0.jar;.libjpa.jar;.libjr-bsh-compiler.jar;.libjsmoothgen-ant-0.9.7.jar;.libjta.jar;.libjxl-2.6.jar;.liblog4j-1.2.8.jar;.liblooks-2.0-rc.jar;.libmicroba-0.4.1-bin.jar;.libmondrian-2.0.1.jar;.libmysql-connector-java-3.1.11-bin.jar;.libnsisant-1.1.jar;.libpng-encoder-1.5.jar;.libpoi-2.0-final-20040126.jar;.librex-20070125.jar;.libsaaj-api-1.3.jar;.libservlet.jar;.libspring-2.0-m2.jar;.libspring-context-2.0-m2.jar;.libspring-hibernate3-2.0-m2.jar;.libsqleonardo-2007.03.jar;.libtinylaf.jar;.libtoniclf.jar;.libxalan.jar;.libxercesImpl.jar;.libxml-apis.jar" -Direport.home="D:swiReport-1.3.1" -Djava.security.policy="D:swiReport-1.3.1/policy.all" -Xms128m -Xmx512m it.businesslogic.ireport.gui.MainFrame Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: unknown format type at at java.text.MessageFormat.makeFormat(Unknown Source) at java.text.MessageFormat.applyPattern(Unknown Source) at it.businesslogic.ireport.gui.ExpressionEditor.caretUpdate(ExpressionEditor.java:1110) at it.businesslogic.ireport.gui.ExpressionEditor.<init>(ExpressionEditor.java:181) at it.businesslogic.ireport.gui.JRTextExpressionArea.jMenuItemTextEditorActionPerformed(JRTextExpressionArea.java:201) at it.businesslogic.ireport.gui.JRTextExpressionArea.editButtonActionPerformed(JRTextExpressionArea.java:369)... Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted April 3, 2007 Share Posted April 3, 2007 The problem is the Spanish locale. You should replace the line: LineColumn=Lu00EDnea {0,nu00FAmero,entero}, Columna {1,nu00FAmero,entero} with: LineColumn=Lu00EDnea {0,number,integer}, Columna {1,number,integer} in the file: it/businesslogic/ireport/locale/Ireport_es_ES.properties GiulioPost edited by: giulio, at: 2007/04/03 16:50 Link to comment Share on other sites More sharing options...
csbac Posted April 4, 2007 Share Posted April 4, 2007 Great - I just like translators that manage to change keywords from English into German, Spanish or whatever language :blink: Just heard about a database book translated into German where "Distinct" in SELECT DISTINCT was translated ... Sebastian Link to comment Share on other sites More sharing options...
juanpzfz Posted April 4, 2007 Author Share Posted April 4, 2007 Hi, your idea works!. Thanks a lot. To close this thread I will detail how to do that change: - From iReport menu: "Plugin"-->"Translation status", choose your locale. - Find linecolumn entry and update the change Giulio told: "Lu00EDnea {0,number,integer}, Columna {1,number,integer}" - Click save button. And close the Plugin window - Restart Ireport. Just for curiosity. The new updated Ireport_es_ES.properties will be placed at "documents and settings/[uSER]/.ireport/classes/**/locale" I try to update via Ireport_es_ES.properties placed INTO ireport.rar, but it does NOT work, so do not follow this way. Thanks a lot. Juanpzfz Post edited by: juanpzfz, at: 2007/04/04 09:05Post edited by: juanpzfz, at: 2007/04/04 09:06 Link to comment Share on other sites More sharing options...
juanpzfz Posted April 4, 2007 Author Share Posted April 4, 2007 Sorry I post the last message twice and I don't know how to delete it. Post edited by: juanpzfz, at: 2007/04/04 09:04 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now