Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
473 views
by The go-to Tester (360 points)

I have integrated SoapUi project with Java API and running with maven. While running test getting below error messages:

9:06:33,177 ERROR [AbstractTestRunner] Exception during Test Execution
java.lang.NoClassDefFoundError: com/jniwrapper/PlatformContext
    at com.eviware.soapui.SoapUI.isJXBrowserDisabled(SoapUI.java:1060)
    at com.eviware.soapui.SoapUI.isJXBrowserDisabled(SoapUI.java:1038)
    at com.eviware.soapui.impl.wsdl.submit.filters.HttpAuthenticationRequestFilter.filterAbstractHttpRequest(HttpAuthenticationRequestFilter.java:77)
    at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:31)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:184)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
    at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:238)
    at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:417)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:238)
    at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:147)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:42)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.jniwrapper.PlatformContext
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 19 more

1 Answer

0 like 0 dislike
by
selected by
 
Best answer

It looks like JNIWrapper is not in maven centralized repository. Is that your custom library? In that case you should add that as a custom library to your pom.xml file. Also, make sure that you have stored your library as given below directory structure.

/groupId/artifactId/version/artifactId-verion.jar

Eg.

<repository>
    <id>in-project</id>
    <name>In Project Repo</name>
    <url>file://${project.basedir}/libs</url>
</repository>

<dependency>
    <groupId>com.custom</groupId>
    <artifactId>custom-lib</artifactId>
    <version>1.0.0</version>
</dependency>

You can use above code, provided you have a libs folder under your project directory. And you have copied your custom library file into your libs folder.

Hope that helps!


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...