Forum Discussion

Junglos's avatar
Junglos
New Contributor
7 years ago

Problem running virtual service from exported war file on tomcat

Hi Everybody,

 

I'm currently trying to test virtual services (created from wsdl file) that are exported to a *.war file and deployed in tomcat. The deployment is successful, it is visible and runing when you check in "Manager App". The problem starts when I want to enter the link and view the WebUI. Everytime I get a 500 Error "com.eviware.soapui.DefaultSoapUICore cannot be cast to com.eviware.soapui.mockaswar.MockAsWarCoreInterface". 

 

Error from browser: 

java.lang.ClassCastException: com.eviware.soapui.DefaultSoapUICore cannot be cast to com.eviware.soapui.mockaswar.MockAsWarCoreInterface
	com.eviware.soapui.mockaswar.MockAsWarServlet.getMockServletCore(MockAsWarServlet.java:170)
	com.eviware.soapui.mockaswar.MockAsWarServlet.service(MockAsWarServlet.java:176)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Server logs:

04-Sep-2018 13:57:56.226 SEVERE [http-nio-8080-exec-3] com.eviware.soapui.mockaswar.MockAsWarServlet.init null
 java.lang.NullPointerException
	at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.start(WsdlMockRunner.java:231)
	at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.<init>(WsdlMockRunner.java:79)
	at com.eviware.soapui.impl.wsdl.mock.WsdlMockService.start(WsdlMockService.java:439)
	at com.eviware.soapui.impl.support.AbstractMockService.start(AbstractMockService.java:211)
	at com.eviware.soapui.mockaswar.MockAsWarServlet.init(MockAsWarServlet.java:99)
	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1124)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1079)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:761)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

I read some posts on the internet about this but they are minimum 1-2yrs old and no solution worked for me. I tried exporting the war file from two versions of ReadyApi 2.3 and 2.4, ran it on two systems windows and ubuntu and on two versions of tomcat version 8 and 9. I also tried making everything from scrach (without using a wsdl file) and also no luck.. always get that error. Can somebody help me? Anybody had this issue?

 

BR,

Michal

 

  • Junglos's avatar
    Junglos
    New Contributor

    Additional info:

    This time I generated the war file in SoapUI 5.3.0 free version and it worked. Got it deployed in tomcat without problems and its running. Now the question is why can't I get it running when I save the war file in ReadyApi ??