Ask a Question

Issue with SoapUITestCaseRunner from Maven in Linux box

deepti11sharma
New Contributor

Issue with SoapUITestCaseRunner from Maven in Linux box

I am trying to run my code from SoapUITestCaseRunner in Linux box,. I have downloaded and installed the non-jre zip folder from soapUi open source and instlalled the same in Linux box.

So when I try to run the below code :-

    SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
        Date date = new Date();
        WsdlProject project;
        String modifiedDate = new SimpleDateFormat("dd-MM-YYYY HH:mm:ss ").format(date);
        String[] xlsFile = new String[9];
        xlsFile[0] = "fileNamePath=" + xlsFilePath;
        xlsFile[1] = "fileName=" + dataFileName;
        xlsFile[2] = "lastExecutedBy=" + executedBy;
        xlsFile[3] = "lastExecutedOn=" + executedDate;
        xlsFile[4] = "applicationName=" + appName;
        xlsFile[5] = "folderPath=" + folderPath;
        xlsFile[6] = "scenarioName=" + scenarioName;
        xlsFile[7] = "methodName=" + methodName;
        xlsFile[8] = "paramsValue=" + paramsValue;
        String[] projectProp = new String[1];
        projectProp[0] = "runType=" + TestSuiteRunType.PARALLEL;
        try {
            project = new WsdlProject(soapProjectPath);
            project.setRunType(TestSuiteRunType.PARALLEL);
            project.save();
            runner.setProjectFile(soapProjectPath);
            runner.setGlobalProperties(xlsFile);
            runner.setPrintReport(false);
            runner.setExportAll(false);
            runner.setIgnoreError(true);
            runner.setJUnitReport(true);
            runner.run();

This is what I am getting in the Linux box in logs.

2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [fileName] to [soapNewblz1912fb0d5-a8fb-40a5-ab2b-afa1eae4fc50.xlsx]
2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [lastExecutedBy] to [IgniteAdmin]
2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [lastExecutedOn] to [30 Aug 2018 10:44:13]
2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [applicationName] to [OTFA_Regression]
2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [folderPath] to [/root/IgniteAutoinstall55/Ignite/Applications/IgniteBase/Software/apache-tomcat-8.5.15/resources/IgniteAdmin1D0E91573761E8AB27882415642C48D8Webservicess111D0E91573761E8AB27882415642C48D8\]
2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [scenarioName] to [Webservicess1]
2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [methodName] to [getBank]
2018-08-30 10:44:18.135 [http-nio-8080-exec-6]  INFO  c.e.s.tools.SoapUITestCaseRunner - Setting global property [paramsValue] to [[Body.getBank.blz]]
2018-08-30 10:44:18.217 [http-nio-8080-exec-6]  ERROR o.s.boot.web.support.ErrorPageFilter - Forwarding to error page from request [/testRunnerApi/] due to exception [org.apache.log4j.ConsoleAppender.setWriter(Ljava/io/Writer;)V]
java.lang.NoSuchMethodError: org.apache.log4j.ConsoleAppender.setWriter(Ljava/io/Writer;)V
    at com.eviware.soapui.tools.AbstractSoapUIRunner.ensureConsoleAppenderIsDefined(AbstractSoapUIRunner.java:96)
    at com.eviware.soapui.tools.AbstractSoapUIRunner.initGroovyLog(AbstractSoapUIRunner.java:77)
    at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:343)
    at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:202)
    at com.ibm.otfasoap.automation.soapexecution.TestRunnerExecution.runTestCaseRunner(TestRunnerExecution.java:124)
    at com.ibm.otfasoap.automation.soapexecution.TestRunnerExecution.getTestRunnerApiExecutionResult(TestRunnerExecution.java:70)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115)
    at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59)
    at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)

 

I am in urgent need of help as this is a Client Box Linux MAchine. The code runs fine on windows but is struck with Linux.

 

Any help will be highly appreciated.

2 REPLIES 2
JHunt
Community Hero

Looks like the error is coming from Log4j.

 

Make sure your classpath doesn't have other versions of Log4j, and that it does have the log4j JAR that is bundled with SoapUI. Or, specify as a Maven dependency the specific version of Log4j used by SoapUI (1.2.14).

 

If it still doesn't work, try setting the Java version to 1.7 in pom.xml, or run with the bundled JRE.

Hi ,

Thanks for reply. The war which has the soapTestrunner code is working as expected in windows env but is not working as expected in Linux. Seems like it is not picking JRE as appears to me.

I have attached my POM along with message.

 

 

cancel
Showing results for 
Search instead for 
Did you mean: