cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] JSON conversion to XML does not work

Highlighted
Contributor

Re: JSON conversion to XML does not work

On my local using  ReadyAPi 2.8.2 UI-Interface i was able to execute the project  successfully. Where we have jenkins machine( on linux) and iam getting issue. when i execute project.

[ERROR] Failed to execute goal com.smartbear:ready-api-maven-plugin:2.8.2:test (1) on project Testing: Execution 1 of goal com.smartbear:ready-api-maven-plugin:2.8.2:test failed: An API incompatibility was encountered while executing com.smartbear:ready-api-maven-plugin:2.8.2:test: java.lang.NoSuchMethodError: org.apache.commons.lang.ArrayUtils.isNotEmpty([Ljava/lang/Object;)Z

[ERROR] -----------------------------------------------------

[ERROR] realm =    plugin>com.smartbear:ready-api-maven-plugin:2.8.2

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/var/lib/jenkins/.m2/repository/com/smartbear/ready-api-maven-plugin/2.8.2/ready-api-maven-plugin-2.8.2.jar

[ERROR] urls[1] = file:/var/lib/jenkins/.m2/repository/org/codehaus/groovy/groovy/2.4.4/groovy-2.4.4.jar

[ERROR] urls[2] = file:/var/lib/jenkins/.m2/repository/net/sf/json-lib/json-lib/2.4/json-lib-2.4.jar

[ERROR] urls[3] = file:/var/lib/jenkins/.m2/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar

[ERROR] urls[4] = file:/var/lib/jenkins/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar

[ERROR] urls[5] = file:/var/lib/jenkins/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar

[ERROR] urls[6] = file:/var/lib/jenkins/.m2/repository/net/sf/ezmorph/ezmorph/1.0.1/ezmorph-1.0.1.jar

[ERROR] urls[7] = file:/var/lib/jenkins/.m2/repository/net/sourceforge/jexcelapi/jxl/2.6.12/jxl-2.6.12.jar

[ERROR] urls[8] = file:/var/lib/jenkins/.m2/repository/postgresql/postgresql/postgresql-9.3-1104.jdbc41/postgresql-postgresql-9.3-1104.jdbc41.jar

 

[ERROR] urls[194] = file:/var/lib/jenkins/.m2/repository/wsdl4j/wsdl4j/1.6.2-fixed/wsdl4j-1.6.2-fixed.jar

[ERROR] urls[195] = file:/var/lib/jenkins/.m2/repository/commons-ssl/not-yet-commons-ssl/0.3.17/not-yet-commons-ssl-0.3.17.jar

[ERROR] urls[196] = file:/var/lib/jenkins/.m2/repository/commons-cli/commons-cli/1.3.1/commons-cli-1.3.1.jar

[ERROR] urls[197] = file:/var/lib/jenkins/.m2/repository/swingx/swingx/soapui/swingx-soapui.jar

[ERROR] urls[198] = file:/var/lib/jenkins/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar

[ERROR] urls[199] = file:/var/lib/jenkins/.m2/repository/org/mozilla/rhino/1.7.10/rhino-1.7.10.jar

[ERROR] urls[200] = file:/var/lib/jenkins/.m2/repository/xmlunit/xmlunit/1.2/xmlunit-1.2.jar

[ERROR] urls[201] = file:/var/lib/jenkins/.m2/repository/org/bouncycastle/bcprov-jdk15/1.46/bcprov-jdk15-1.46.jar

[ERROR] urls[202] = file:/var/lib/jenkins/.m2/repository/jtidy/jtidy/r872-jdk15/jtidy-r872-jdk15.jar

[ERROR] urls[203] = file:/var/lib/jenkins/.m2/repository/javax/jms/jms/1.1/jms-1.1.jar

[ERROR] urls[204] = file:/var/lib/jenkins/.m2/repository/hermesjms/hermes/1.14/hermes-1.14.jar

[ERROR] urls[205] = file:/var/lib/jenkins/.m2/repository/amf/flex-messaging-common/1.0/flex-messaging-common-1.0.jar

[ERROR] urls[206] = file:/var/lib/jenkins/.m2/repository/amf/flex-messaging-core/1.0/flex-messaging-core-1.0.jar

[ERROR] urls[207] = file:/var/lib/jenkins/.m2/repository/thoughtworks/xstream/1.3.1/xstream-1.3.1.jar

[ERROR] urls[208] = file:/var/lib/jenkins/.m2/repository/net/sourceforge/nekohtml/nekohtml/1.9.14/nekohtml-1.9.14.jar

[ERROR] urls[209] = file:/var/lib/jenkins/.m2/repository/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar

[ERROR] urls[210] = file:/var/lib/jenkins/.m2/repository/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar

[ERROR] urls[211] = file:/var/lib/jenkins/.m2/repository/l2fprod/l2fprod-common-fontchooser/7.3/l2fprod-common-fontchooser-7.3.jar

[ERROR] urls[212] = file:/var/lib/jenkins/.m2/repository/org/apache/ws/commons/util/ws-commons-util/1.0.2/ws-commons-util-1.0.2.jar

[ERROR] urls[213] = file:/var/lib/jenkins/.m2/repository/com/github/markusbernhardt/proxy-vole/1.0.4/proxy-vole-1.0.4.jar

 

 

 

Below is my pom.xml:-

 

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>API_Testing</groupId>
<artifactId>Testing</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Testing</name>
<url>https://maven.apache.org</url>

<properties>
<readyapi.version>2.8.2</readyapi.version>
<groovy.version>2.4.4</groovy.version>
<postgresql.version>postgresql-9.3-1104.jdbc41</postgresql.version>
<maven.clean.version>3.0.0</maven.clean.version>
<jxl.version>2.6.12</jxl.version>
<jtds.version>1.3.0</jtds.version>
<xmlunit.version>2.2.1</xmlunit.version>
<json.version>20160807</json.version>
<poi.version>3.12</poi.version>
<commonlang.version>2.3</commonlang.version>
<jsonlib.version>2.4</jsonlib.version>
<ezmorph.version>1.0.1</ezmorph.version>

</properties>
<!-- SmartBearPluginRepository plugin is necessary to add -->
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url></url>
<!-- <url>https://maven.gridpoint.com/nexus/content/groups/public/</url> -->
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven.clean.version}</version>
<configuration>
<filesets>
<fileset>
<directory>${logDir}</directory>
<includes>
<include>**/*.log.*</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- soapui-pro-maven-plugin -->
<plugin>
<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>${readyapi.version}</version>
<dependencies>
<!-- Dependency to read external file's -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
<!-- Dependancy to Groovy jar to parse json to xml -->
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>${jsonlib.version}</version>
</dependency>

<dependency>
<groupId>net.sf.ezmorph</groupId>
<artifactId>ezmorph</artifactId>
<version>${ezmorph.version}</version>
</dependency>
<!-- Dependency to read excel files -->
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>${jxl.version}</version>
</dependency>

<!-- Dependency to read data from postgres database -->
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<!-- Dependency to read data from sqlserver database -->

<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commonlang.version}</version>
</dependency>
<!-- Dependency to convert unicode values -->
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>${jtds.version}</version>
</dependency>
<dependency>
<groupId>org.gridpoint</groupId>
<artifactId>SinglePeriod</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/jars/SinglePeriod_1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-matchers</artifactId>
<version>${xmlunit.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>


</dependencies>

<executions>
<execution>
<id>1</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<!-- Project path -->
<projectFile>${projectFile}</projectFile>
<!-- Reports Output folder -->
<outputFolder>MobileProjectReports</outputFolder>
<junitReport>true</junitReport>
<printReport>true</printReport>
<exportAll>false</exportAll>
<testFailIgnore>true</testFailIgnore>
<readyApiProperties>
<property>
<name>soapui.home</name>
<value>${soapuiHome}</value>
</property>
<property>
<name>test.history.disabled</name>
<value>true</value>
</property>
<property>
<name>soapui.scripting.library</name>
<value>${project.basedir}/src/main/java/GlobalScripts</value>
</property>
<property>
<name>soapui.ext.libraries</name>
<value>${project.basedir}/src/main/java/GlobalScripts</value>
</property>
</readyApiProperties>
<!--soapuiProperties> <property> <name>soapui.scripting.library</name>
<value>${project.basedir}\src\main\java\GlobalScripts</value> </property>
<property> <name>soapui.ext.libraries</name> <value>${project.basedir}\src\main\java\GlobalScripts</value>
</property> </soapuiProperties -->
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</project>

 

 

Note:- I tried to open support ticket filling the form more than 4 times. Looks like they have some issue. Its keep throughing error.

Highlighted
Community Hero

Re: JSON conversion to XML does not work

Hi,

 

My knowledge of Java/Groovy architecture is very limited, but based on

> java.lang.NoSuchMethodError: org.apache.commons.lang.ArrayUtils.isNotEmpty()

it is my understanding that corresponding class/method was not found.

According to https://www.google.com/search?q=groovy+jar+for+org.apache.commons.lang.ArrayUtils, ArrayUtils class must be in, for example, commons-lang-X.X.jar (https://repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar)

Neither your .pom nor the posted error log mention commons-lang*.jar, so I think that you should add it as a dependency. (Not sure where and how though.)

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 12
2 nmrao 8
3 HimanshuTayal 3
Top Kudoed Authors