Forum Discussion

vadimator's avatar
vadimator
New Contributor
6 years ago

ERROR: java.lang.IllegalArgumentException: Name is not valid

Hey guys!

I couldn't find answer to this question anywhere, so decided to ask community. For some reason Tech support is too slow.

In short: I no longer can Save or Save As or Export one of my projects. Other projects do get saved normally 

Context: I have found out about it only after a week of this error happening, since ReadyApi did not show me any errors unless I open Logs. And the way I see it, is that my project xml file does not get modified/updated when I hit save.

Please help! I can't even restart the app because I will loose all my week long changes.

 

Thanks a lot!

This is the error i'm getting:

Fri Feb 22 16:02:38 PST 2019: ERROR: java.lang.IllegalArgumentException: Name is not valid
java.lang.IllegalArgumentException: Name is not valid
at org.apache.xmlbeans.impl.store.Cursor.validateLocalName(Cursor.java:125)
at org.apache.xmlbeans.impl.store.Cursor._insertElementWithText(Cursor.java:1715)
at org.apache.xmlbeans.impl.store.Cursor._insertElementWithText(Cursor.java:1711)
at org.apache.xmlbeans.impl.store.Cursor.insertElementWithText(Cursor.java:4163)
at com.eviware.soapui.support.xml.XmlObjectConfigurationBuilder.add(XmlObjectConfigurationBuilder.java:50)
at com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.UI.DataGeneratorDataSource.save(DataGeneratorDataSource.java:407)
at com.eviware.soapui.impl.wsdl.teststeps.datasource.AbstractDataSource.saveConfig(AbstractDataSource.java:77)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.beforeSave(WsdlDataSourceTestStep.java:947)
at com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem.beforeSave(AbstractWsdlModelItem.java:234)
at com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem.beforeSave(AbstractWsdlModelItem.java:234)
at com.eviware.soapui.impl.wsdl.WsdlProject.beforeSave(WsdlProject.java:1455)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.beforeSave(WsdlProjectPro.java:817)
at com.eviware.soapui.impl.wsdl.WsdlProject.save(WsdlProject.java:1079)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.save(WsdlProjectPro.java:1669)
at com.eviware.soapui.impl.wsdl.WsdlProject.save(WsdlProject.java:1065)
at com.eviware.soapui.impl.wsdl.actions.project.SaveProjectAction.perform(SaveProjectAction.java:42)
at com.eviware.soapui.impl.wsdl.actions.project.SaveProjectSoapUIAction.perform(SaveProjectSoapUIAction.java:29)
at com.eviware.soapui.impl.wsdl.actions.project.SaveProjectAction.perform(SaveProjectAction.java:1)
at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:129)
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.plaf.basic.BasicButtonListener.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.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.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)

  • Hey vadimator 

     

    Ok - I don't know if I can help cos I haven't seen this before but I'll try.  If you can save/save as/export other projects then the problem would appear to be some sort of corruption with the .xml file itself.

     

    So you have say a week's worth of changes that you're going to lose - right?  do you have a version controlled version by any chance?  probably not if you're raising this ticket. -but I had to ask - cos that'll take  all the effort out of the heavy lifting.

     

    anyway - navigate to the file's location and take a copy of the file - so worst case - you have a spare copy. you can do this with the project .xml file - I've just tested this and its fine with unsaved changes.

     

    according to what you said - you don't actually know when it started occuring - right?  so you could have only lost 1 days worth of changes?

     

    Now - this is either straightforward or not  - if the file's corruption was bad enough that it resulted in malformed xml you shouldn't be able to open the  project in ReadyAPI!.

     

    Try and open a spare copy of the project file in software with an XML parser (like XMLSpy or Notepad++ with the XMLplugins.  If the file is malformed you should get a warning about substitution characters - if it's not malformed xml - can you look through the file to see if anything pops out?  That's a really rubbish suggestion though - cos its unlikely you'll spot the problem

     

    This next might help - looking at the stack trace (and I don't know how ReadyAPI! stacktraces are logged) - sometimes I can see a problem in a stacktrace - sometimes I can't - but it mentions the following:

     

    java.lang.IllegalArgumentException: Name is not valid
    at org.apache.xmlbeans.impl.store.Cursor.validateLocalName(Cursor.java:125)
    at org.apache.xmlbeans.impl.store.Cursor._insertElementWithText(Cursor.java:1715)
    at org.apache.xmlbeans.impl.store.Cursor._insertElementWithText(Cursor.java:1711)
    at org.apache.xmlbeans.impl.store.Cursor.insertElementWithText(Cursor.java:4163)
    at com.eviware.soapui.support.xml.XmlObjectConfigurationBuilder.add(XmlObjectConfigurationBuilder.java:50)
    at com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.UI.DataGeneratorDataSource.save(DataGeneratorDataSource.java:407)
    at com.eviware.soapui.impl.wsdl.teststeps.datasource.AbstractDataSource.saveConfig(AbstractDataSource.java:77)

    so - I'm totally guessing here - interpreting the content in the stacktrace, it 'appears' to be that you created some object with a name it didn't like - perhaps on a datasource object.  I'd go back to ReadyAPI! and look at each of the objects in your project (focusing first on Datasource type objects first just in case) and  rename each object ensuring you haven't managed to insert an illegal character into a name - every so often  - see if you can successfully hit save monitoring  the stacktrace.

     

    Overwrite all the names of every object in your project ensuring you haven't got any dodgy characters in there.

     

    That's my best guess at fixing this

     

    nice one,

     

    richie

  • Thanks richie  for your reply. 

    My project xml file's Date modified is 2/14/19, so that tells me that it was the last day when it successfully saved. That file I'm able to open in a new instance of the ReadyAPI with no problem since there is no error in the xml, but unfortunately the one with the issue I'm not able to open seperately in Note++ to investigate xml because I can't save it in the first place.

    So far, I've gone through all project and renamed all the Test Case/Suites/Property names that contained any special characters except "_". (Underscore did not give problems before, so I left it.). No success yet.

     

    Next I'm planning to start deleting Data Source objects one by one and trying to save. I've read somewhere that whenever you moving objects up or down your file tree with your mouse it can cause breakage in project xml file, and I've done that a lot :(

     

    If you have any other ideas please share

    Thanks,

6 Replies

  • richie's avatar
    richie
    Community Hero

    Hey vadimator 

     

    Ok - I don't know if I can help cos I haven't seen this before but I'll try.  If you can save/save as/export other projects then the problem would appear to be some sort of corruption with the .xml file itself.

     

    So you have say a week's worth of changes that you're going to lose - right?  do you have a version controlled version by any chance?  probably not if you're raising this ticket. -but I had to ask - cos that'll take  all the effort out of the heavy lifting.

     

    anyway - navigate to the file's location and take a copy of the file - so worst case - you have a spare copy. you can do this with the project .xml file - I've just tested this and its fine with unsaved changes.

     

    according to what you said - you don't actually know when it started occuring - right?  so you could have only lost 1 days worth of changes?

     

    Now - this is either straightforward or not  - if the file's corruption was bad enough that it resulted in malformed xml you shouldn't be able to open the  project in ReadyAPI!.

     

    Try and open a spare copy of the project file in software with an XML parser (like XMLSpy or Notepad++ with the XMLplugins.  If the file is malformed you should get a warning about substitution characters - if it's not malformed xml - can you look through the file to see if anything pops out?  That's a really rubbish suggestion though - cos its unlikely you'll spot the problem

     

    This next might help - looking at the stack trace (and I don't know how ReadyAPI! stacktraces are logged) - sometimes I can see a problem in a stacktrace - sometimes I can't - but it mentions the following:

     

    java.lang.IllegalArgumentException: Name is not valid
    at org.apache.xmlbeans.impl.store.Cursor.validateLocalName(Cursor.java:125)
    at org.apache.xmlbeans.impl.store.Cursor._insertElementWithText(Cursor.java:1715)
    at org.apache.xmlbeans.impl.store.Cursor._insertElementWithText(Cursor.java:1711)
    at org.apache.xmlbeans.impl.store.Cursor.insertElementWithText(Cursor.java:4163)
    at com.eviware.soapui.support.xml.XmlObjectConfigurationBuilder.add(XmlObjectConfigurationBuilder.java:50)
    at com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.UI.DataGeneratorDataSource.save(DataGeneratorDataSource.java:407)
    at com.eviware.soapui.impl.wsdl.teststeps.datasource.AbstractDataSource.saveConfig(AbstractDataSource.java:77)

    so - I'm totally guessing here - interpreting the content in the stacktrace, it 'appears' to be that you created some object with a name it didn't like - perhaps on a datasource object.  I'd go back to ReadyAPI! and look at each of the objects in your project (focusing first on Datasource type objects first just in case) and  rename each object ensuring you haven't managed to insert an illegal character into a name - every so often  - see if you can successfully hit save monitoring  the stacktrace.

     

    Overwrite all the names of every object in your project ensuring you haven't got any dodgy characters in there.

     

    That's my best guess at fixing this

     

    nice one,

     

    richie

    • vadimator's avatar
      vadimator
      New Contributor

      Thanks richie  for your reply. 

      My project xml file's Date modified is 2/14/19, so that tells me that it was the last day when it successfully saved. That file I'm able to open in a new instance of the ReadyAPI with no problem since there is no error in the xml, but unfortunately the one with the issue I'm not able to open seperately in Note++ to investigate xml because I can't save it in the first place.

      So far, I've gone through all project and renamed all the Test Case/Suites/Property names that contained any special characters except "_". (Underscore did not give problems before, so I left it.). No success yet.

       

      Next I'm planning to start deleting Data Source objects one by one and trying to save. I've read somewhere that whenever you moving objects up or down your file tree with your mouse it can cause breakage in project xml file, and I've done that a lot :(

       

      If you have any other ideas please share

      Thanks,

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Any ideas, Community?

         

        vadimator, I know that you are working with the Support team. Please let us know the solution you will identify.