Forum Discussion

scsete's avatar
scsete
New Contributor
7 years ago

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

I have created a REST mock service with ServiceV PRO version 2.2.0 and after exporting the war file, i'm getting the following error, when i try to access the endpoint in the mock(Tomcat 8.0.48):

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)
...
Why is it trying to deal with Wsdl stuff? No idea...

POSTman message body:

<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>

Export config attached.

I have read the java version matters, where it is exported and where i run, they are identical(JAVA 8_151)

Anyone has any idea, what went wrong?
Any suggestion is welcome!

3 Replies

    • TLerche's avatar
      TLerche
      Occasional Contributor

      Hello is here any solution available?

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        What version of ServiceV you are using? Several updates have been released since past January.

        If the problem still exists for the latest 2.5.0 version of ServiceV, I would recommend to contact Support directly via the https://support.smartbear.com/message/?prod=ReadyAPI form and reference this thread.