Forum Discussion

scsete's avatar
scsete
New Contributor
7 years ago
Solved

Exported war file not working - ServiceV PRO 2.2.0.

I have created a REST mock with ServiceV PRO 2.2.0. I exported as a war file and deployed on Tomcat 8.0.48.
The problem comes when i try to access the endpoint in the mock!

Message: com.eviware.soapui.DefaultSoapUICore cannot be cast to com.eviware.soapui.mockaswar.MockAsWarCoreInt

Postman message:
<html>
<head>
<title>Apache Tomcat/8.0.48 - Error report</title>
<style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style>
</head>
<body>
<h1>HTTP Status 500 - com.eviware.soapui.DefaultSoapUICore cannot be cast to com.eviware.soapui.mockaswar.MockAsWarCoreInterface</h1>
<div class="line"></div>
<p>
<b>type</b> Exception report
</p>
<p>
<b>message</b>
<u>com.eviware.soapui.DefaultSoapUICore cannot be cast to com.eviware.soapui.mockaswar.MockAsWarCoreInterface</u>
</p>
<p>
<b>description</b>
<u>The server encountered an internal error that prevented it from fulfilling this request.</u>
</p>
<p>
<b>exception</b>
</p>
<pre>java.lang.ClassCastException: com.eviware.soapui.DefaultSoapUICore cannot be cast to com.eviware.soapui.mockaswar.MockAsWarCoreInterface
com.eviware.soapui.mockaswar.MockAsWarServlet.getMockServletCore(MockAsWarServlet.java:167)
com.eviware.soapui.mockaswar.MockAsWarServlet.service(MockAsWarServlet.java:173)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
</pre>
<p>
<b>note</b>
<u>The full stack trace of the root cause is available in the Apache Tomcat/8.0.48 logs.</u>
</p>
<hr class="line">
<h3>Apache Tomcat/8.0.48</h3>
</body>
</html>

Tomcat log:
10-Jan-2018 10:15:02.601 INFO [http-apr-8080-exec-4] com.eviware.soapui.mockaswar.MockAsWarServlet.init Starting REST Virt [REST Virt 1]
10-Jan-2018 10:15:02.608 SEVERE [http-apr-8080-exec-4] com.eviware.soapui.mockaswar.MockAsWarServlet.init null
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.start(WsdlMockRunner.java:229)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.<init>(WsdlMockRunner.java:77)
at com.eviware.soapui.impl.rest.mock.RestMockService.start(RestMockService.java:382)
at com.eviware.soapui.impl.support.AbstractMockService.start(AbstractMockService.java:204)
at com.eviware.soapui.mockaswar.MockAsWarServlet.init(MockAsWarServlet.java:101)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
...

Export config attached.

Export and running JAVA version is JAVA 8_151.

Attached example project: GET /status (endpoint)

Kindly suggest what can be a problem!

  • I found the problem, 2.2.0 version has this bug. I installed earlier 2.1.0 version. Everything is fine!

2 Replies

  • scsete's avatar
    scsete
    New Contributor

    The sad thing previously working export doesn't work with exact same export settings. This is really weird!
    Can it be 2.2.0 version has some defect?

  • scsete's avatar
    scsete
    New Contributor

    I found the problem, 2.2.0 version has this bug. I installed earlier 2.1.0 version. Everything is fine!