Forum Discussion

Cantor_Futures_'s avatar
Cantor_Futures_
New Contributor
12 years ago

[Resolved] Mockservice WAR not correctly deploying

I have a mock service that was originally created using SOAPUIPro 4.5.1, after upgrading my SOAPUI version to 4.5.2 I made some edits to the service and regenerated the WAR file and get the following stacktrace when Tomcat attempts to start the mockservice

2013-07-19 19:30:15,204 ERROR [errorlog] java.lang.ArrayStoreException: org.apache.xmlbeans.impl.xb.xsdschema.impl.SchemaDocumentImpl
java.lang.ArrayStoreException: org.apache.xmlbeans.impl.xb.xsdschema.impl.SchemaDocumentImpl
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getSchemas(SchemaUtils.java:418)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getSchemas(SchemaUtils.java:327)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.loadSchemaTypes(SchemaUtils.java:192)
at com.eviware.soapui.impl.support.definition.support.XmlSchemaBasedInterfaceDefinition.loadSchemaTypes(XmlSchemaBasedInterfaceDefinition.java:79)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlInterfaceDefinition.load(WsdlInterfaceDefinition.java:61)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:66)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:30)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:268)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$400(AbstractDefinitionContext.java:44)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:235)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
at java.lang.Thread.run(Thread.java:662)
2013-07-19 19:30:15,207 ERROR [errorlog] com.eviware.soapui.impl.wsdl.support.xsd.SchemaException
com.eviware.soapui.impl.wsdl.support.xsd.SchemaException
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getSchemas(SchemaUtils.java:512)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getSchemas(SchemaUtils.java:327)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.loadSchemaTypes(SchemaUtils.java:192)
at com.eviware.soapui.impl.support.definition.support.XmlSchemaBasedInterfaceDefinition.loadSchemaTypes(XmlSchemaBasedInterfaceDefinition.java:79)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlInterfaceDefinition.load(WsdlInterfaceDefinition.java:61)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:66)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:30)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:268)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$400(AbstractDefinitionContext.java:44)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:235)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
at java.lang.Thread.run(Thread.java:662)
2013-07-19 19:30:15,209 ERROR [errorlog] com.eviware.soapui.impl.wsdl.support.xsd.SchemaException
com.eviware.soapui.impl.wsdl.support.xsd.SchemaException
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getSchemas(SchemaUtils.java:512)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getSchemas(SchemaUtils.java:327)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.loadSchemaTypes(SchemaUtils.java:192)
at com.eviware.soapui.impl.support.definition.support.XmlSchemaBasedInterfaceDefinition.loadSchemaTypes(XmlSchemaBasedInterfaceDefinition.java:79)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlInterfaceDefinition.load(WsdlInterfaceDefinition.java:61)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:66)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:30)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:268)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$400(AbstractDefinitionContext.java:44)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:235)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
at java.lang.Thread.run(Thread.java:662)



I googled the top error message and came across a post on here that indicated it was a problem with the .jar files being included in the WAR so I went and checked and found the .jar files for both 4.5.1 and 4.5.2 included in the WAR. I then removed the 4.5.1 jar files from the deployed service in Tomcat and restarted the webserver and the service started correctly so that does seem to be the issue.

The problem I am having now is that I can't find anywhere to change a setting that would stop including the 4.5.1 jar files in the WAR, I've removed all references to 4.5.1 in the preferences and don't see any in the project file, I've even deleted the copies of 4.5.1 that were still on my system but the soapui-4.5.1.jar is still being added to the WAR.

If needed I can provide both the war file generated in 4.5.1 as well as one generated in 4.5.2

3 Replies

  • Hi there.

    This is a very strange error. I have been able to reproduce this problem but only immediately after creating the war in SoapUI 4.5.1, and then doing the same in SoapUI 4.5.2.
    But as soon as I re-started SoapUI 4.5.2, the war was created properly, without including the 4.5.1 jar.

    Could you please confirm that this is not a matter of simply re-starting SoapUI?

    Regards,

    Renato
    SmartBear Software
  • Nope, I even rebooted with no change. One thing that I thought of that might have caused it is I had both the 32 and 64 bit versions of 4.5.1 installed but only installed the 64 bit version of 4.5.2. I'm going to completely uninstall everything from Smartbear then reinstall just 4.5.2 later today to see if that fixes it.
  • Ok I fixed it.

    The problem was with the WAR directory, when you first create a mockservice you give it a path for the war directory and all of the .jar files are copied to it, the next time you rebuilt that war file it pulls the .jar files from this path and not from the SOAPUI internal location, it only updates .jar files that are new or are changed, .jar files which are not present in soapui but are present in the war directory are simply copied into the war file. This means that when you update SOAPUI the old versions .jar's will be present and retained unless you delete the WAR directory and rebuild it from scratch.

    From a user perspective the problem here is that there is no indication what the problem is and no suggestion that you might need to delete the old war directory and since rebuilding a mockservice war file following a soapui upgrade is likely to be a fairly infrequent task it is likely that this will always result in a fair amount of troubleshooting before the user remembers the issue.

    One solution that might work is to give the user an option on the Deploy Project as War dialog to overwrite the war directory rather than update it when they select a war directory path that already exists.