Pages

16 May 2012

SoapUI 4.5.0 Project XML File Encoding Problem

I' ve been already using SoapUI Pro 3.6.1 since license expires. Previous migrations to soapUI newer versions had not caused problems but when starting using SoapUI 4.5.0(free) version resulted destroying existing projects. I checked log file ("C:\...\SmartBear\soapUI-4.5.0\bin\soapui.log") and realised that something went wrong about encoding of soapUI project XMLs. Turkish language characters in wsdl files are located in soapUI project XMLs and they are violating cp1254 character convention and causes below exception log. 


java.io.CharConversionException: Malformed UTF-8 character: 0xc5 0x3f
 at org.apache.xmlbeans.impl.piccolo.xml.UTF8XMLDecoder.decode(UTF8XMLDecoder.java:80)
 at org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader$FastStreamDecoder.read(XMLStreamReader.java:762)
 at org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader.read(XMLStreamReader.java:162)
 at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yy_refill(PiccoloLexer.java:3474)
 at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yynextChar(PiccoloLexer.java:3721)
 at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseCdataSection(PiccoloLexer.java:2671)
 at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:4850)
 at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
 at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
 at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
 at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
 at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276)
 at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
 at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
 at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(Unknown Source)
 at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:333)
 at com.eviware.soapui.impl.wsdl.WsdlProject.(WsdlProject.java:244)
 at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:62)
 at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:24)
 at com.eviware.soapui.impl.WorkspaceImpl.loadWorkspace(WorkspaceImpl.java:175)
 at com.eviware.soapui.impl.WorkspaceImpl.(WorkspaceImpl.java:87)
 at com.eviware.soapui.impl.WorkspaceFactoryImpl.openWorkspace(WorkspaceFactoryImpl.java:32)
 at com.eviware.soapui.SoapUI.startSoapUI(SoapUI.java:795)
 at com.eviware.soapui.SoapUI$SoapUIRunner.run(SoapUI.java:645)
 at com.eviware.soapui.SoapUI.main(SoapUI.java:744)
 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)
 at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
 at com.exe4j.runtime.WinLauncher.main(Unknown Source)

In order to recover corrupted project xml files; save existing soapUI projects, then open soapui-project.xml with notepad++ and change encoding of file with UTF8. After that, change "soapUI-4.5.0.1-SNAPSHOT.vmoptions" file as follows:

-Xms128m
-Xmx1000m
-Dfile.encoding=UTF-8
-Dsoapui.properties=soapui.properties
-Dsoapui.home=C:\Program Files\SmartBear\soapUI-4.5.0.1-SNAPSHOT/bin
-Dsoapui.ext.libraries=C:\Program Files\SmartBear\soapUI-4.5.0.1-SNAPSHOT/bin/ext
-Dsoapui.ext.listeners=C:\Program Files\SmartBear\soapUI-4.5.0.1-SNAPSHOT/bin/listeners
-Dsoapui.ext.actions=C:\Program Files\SmartBear\soapUI-4.5.0.1-SNAPSHOT/bin/actions
-Dwsi.dir=C:\Program Files\SmartBear\soapUI-4.5.0.1-SNAPSHOT/wsi-test-tools
-Djava.library.path=C:\Program Files\SmartBear\soapUI-4.5.0.1-SNAPSHOT/bin
-Djava.util.Arrays.useLegacyMergeSort=true
-Djxbrowser.xulrunner.dir=C:\Program Files\SmartBear\soapUI-4.5.0.1-SNAPSHOT\.JxBrowser


Above modification set file.encoding system property of SoapUI embedded JVM as UTF-8 and turkish characters are not error prone.

Then, everything is ok!
Broken SoapUI Project on Workspace

take care...

4 comments:

Thx for reading! Comments are appreciated...