Forum Discussion

dsw's avatar
dsw
New Contributor
14 years ago

Malformed UTF character: 0xe2 0x80 0x3f

I am using SoapUI v4.0.0

I've been working on a project for several days. For some reason soapUI now fails to load the project. The error log reports "Malformed UTF-8 character: 0xe2 0x80 0x3f". See log snippet below.

A post several years ago indicates there was a bug in SoapUI, which caused malformed UTF-8 chars, but I have found nothing recent. The old post suggests manually editing the file and removing the offending character, but I have no idea how to locate the bad character. I have opened the file in other editors without any problems.

Any suggestions?

Error Log Snippet:
=================
ERROR:com.eviware.soapui.support.SoapUIException: Failed to load project from file ......
at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:404)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:234)
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.reloadProject(WorkspaceImpl.java:539)
at com.eviware.soapui.impl.wsdl.WsdlProject.reload(WsdlProject.java:1254)
at com.eviware.soapui.impl.wsdl.actions.project.ReloadProjectAction.perform(ReloadProjectAction.java:62)
at com.eviware.soapui.impl.wsdl.actions.project.ReloadProjectAction.perform(ReloadProjectAction.java:28)
at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:89)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.CharConversionException: Malformed UTF-8 character: 0xe2 0x80 0x3f
at org.apache.xmlbeans.impl.piccolo.xml.UTF8XMLDecoder.decode(UTF8XMLDecoder.java:108)
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:314)
... 46 more
  • amirsliem's avatar
    amirsliem
    Occasional Contributor
    I've the same problem

    Wed Aug 08 14:04:00 PDT 2012:ERROR:com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/C:/SoapUI/Projects/EcommWebServices/EcommWebServices-SoapUIPro-Project.xml]
    com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/C:/SoapUI/Projects/EcommWebServices/EcommWebServices-SoapUIPro-Project.xml]
    at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(SourceFile:314)
    at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:244)
    at com.eviware.soapui.impl.wsdl.WsdlProjectPro.<init>(SourceFile:180)
    at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(SourceFile:53)
    at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(SourceFile:16)
    at com.eviware.soapui.impl.WorkspaceImpl.reloadProject(WorkspaceImpl.java:539)
    at com.eviware.soapui.impl.WorkspaceImpl.openProject(WorkspaceImpl.java:665)
    at com.eviware.soapui.impl.wsdl.actions.project.OpenProjectAction.perform(OpenProjectAction.java:39)
    at com.eviware.soapui.impl.wsdl.actions.project.OpenProjectAction.perform(OpenProjectAction.java:26)
    at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:89)
    at com.eviware.soapui.support.action.swing.DefaultActionList.performDefaultAction(DefaultActionList.java:107)
    at com.eviware.soapui.ui.Navigator$TreeMouseListener$1.run(Navigator.java:408)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.io.CharConversionException: Malformed UTF-8 character: 0xe2 0x80 0x3f
    at org.apache.xmlbeans.impl.piccolo.xml.UTF8XMLDecoder.decode(UTF8XMLDecoder.java:108)
    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.yylex(PiccoloLexer.java:3958)
    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.WsdlProjectPro.loadProject(SourceFile:193)
    ... 25 more
  • rdls's avatar
    rdls
    Occasional Contributor

    This post is really old, but just I just posted a solution that worked for me in a newer thread regarding this problem.  Pasting it here as well, just in case it might help someone.

     

     

    I just encountered this error and was able to fix it on my machine.   When I searched Google using: soapui Caused by: java.io.CharConversionException: Malformed UTF-8 character: 0xe2 0x80 0x3f,  I came across this post and a few others but I didn't see any final resolutions other than to change the encoding of the entire xml file to UTF-8 or find the offending characters in a text editor.  My xml file was already in UTF-8, so that tip didn't help.  I ended up finding the offending characters using Beyond Compare and Notepad ++.  I didn't see any final resolutions posted, so I'm posting this hoping it might help someone in some way. 

     

    Problem situation: 

    A coworker imported a SoapUI NG Pro project I had created (and was still working on) in ReadyAPI 1.5.0 into her fresh ReadyAPI 1.5.0 installation.  She made modifications to the project, saved her changes, then she removed the project from SoapUI NG Pro.  She later tried to import the project she had *just* saved, and the Malformed UTF-8 error was thrown.  I tried to import her file, and the error was thrown on my ReadyAPI installation as well.

     

    How I fixed the problem: 

    1. I used Beyond Compare (free trial) to diff her version of the xml file that was throwing the error VS my currently working version saved on my machine.  In Beyond Compare, the offending characters were exposed in the diffs as diamonds with questions marks and some other weird character.  The offending character was located in a date value I was passing in a JSON request. 

     

    2. For a better view, I opened my *currently working xml* file in Notepad++, located the offending character, and it appeared as: xE2x80? .   xE2 and x80 were each highlighted in black. 

     

    3. I opened that same currently working xml file in SoapUI NG Pro 1.5.0 and located the test step containing the offending character by reading the XML to find what testcase and step it was located in.  Turns out it was in a JSON request I would post. The date value was: "2015-09-21”,  

    The offending character was the closing double quote character which was a ”, instead of a ", and that was the cause of our issue.  The source of that offending character was due to the way a developer created the JSON for me to use. 

     

    4. I replaced all diffed instances of xE2x80 (which was ”) with " and saved the project in SoapUI. 

     

    5. She imported my fixed project again, made her changes, saved it, removed the project, and was able to import it with no problems.