Ask a Question

SU 5.1.2 Maven plugin RuntimeException:java.lang.ClassCastException:

Patios
New Contributor

SU 5.1.2 Maven plugin RuntimeException:java.lang.ClassCastException:

Following problem ocurrs during execution of maven project with soapUi pro 5.1.2 plugin.

Thanks in advance for help with this issue. 

 

RuntimeException:java.lang.ClassCastException: org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath cannot be cast to org.apache.xmlbeans.impl.store.SaxonXBeansDelegate$SelectPathInterface]

 

Pom file:

 

<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>com.tieto.soapUI</groupId>
	<artifactId>soapui-maven2-plugin</artifactId>
	<packaging>jar</packaging>
	<version>2.1</version>
	<name>HelenWSBasicMavenProject</name>
	<description>HelenWSBasicMavenProject</description>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<findbugs.version>2.5.2</findbugs.version>
		<checkstyle.version>2.9.1</checkstyle.version>
		<surefire.reportplugin.version>2.2</surefire.reportplugin.version>
		<cobertura.version>2.5.2</cobertura.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>com.fifesoft</groupId>
			<artifactId>rsyntaxtextarea</artifactId>
			<version>2.0.7</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>
	</dependencies>
	<pluginRepositories>
		<pluginRepository>
			<id>codehausPluginRepository</id>
			<url>https://nexus.codehaus.org/content/groups/snapshots-group/org/codehaus/mojo/</url>
		</pluginRepository>
		<pluginRepository>
			<id>SmartBearPluginRepository</id>
			<url>http://www.soapui.org/repository/maven2/</url>
		</pluginRepository>
		<pluginRepository>
			<id>mvnPluginRepository</id>
			<url>http://mirrors.ibiblio.org/maven/mule/dependencies/maven2/</url>
		</pluginRepository>
		<pluginRepository>
			<id>apache.snapshots</id>
			<name>Apache Development Snapshot Repository</name>
			<url>https://repository.apache.org/content/repositories/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>
	<licenses>
		<license>
			<name>Oracle Technology Network Development and Distribution License Terms</name>
			<url>http://www.oracle.com/technology/software/htdocs/distlic.html</url>
		</license>
	</licenses>
	<build>
		<plugins>
			<plugin>
				<groupId>com.smartbear.soapui</groupId>
				<artifactId>soapui-pro-maven-plugin</artifactId>
				<version>5.1.2</version>
				<dependencies>
					<dependency>
						<groupId>oracle</groupId>
						<artifactId>ojdbc14</artifactId>
						<version>10.2.0.2</version>
					</dependency>
					<dependency>
						<groupId>org.reflections</groupId>
						<artifactId>reflections</artifactId>
						<version>0.9.9-RC1</version>
					</dependency>
					<dependency>
						<groupId>org.apache.poi</groupId>
						<artifactId>poi-ooxml</artifactId>
						<version>3.10-FINAL</version>
					</dependency>
					<dependency>
						<groupId>mysql</groupId>
						<artifactId>mysql-connector-java</artifactId>
						<version>5.1.6</version>
					</dependency>
					<dependency>
						<groupId>com.jgoodies</groupId>
						<artifactId>jgoodies-binding</artifactId>
						<version>2.7.0</version>
					</dependency>
					<dependency>
						<groupId>com.jgoodies</groupId>
						<artifactId>jgoodies-validation</artifactId>
						<version>2.4.2</version>
					</dependency>
					<dependency>
						<groupId>com.jgoodies</groupId>
						<artifactId>jgoodies-forms</artifactId>
						<version>1.6.0</version>
					</dependency>
					<dependency>
						<groupId>com.jgoodies</groupId>
						<artifactId>jgoodies-looks</artifactId>
						<version>2.5.2</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<argLine>-Xms1024m -Xmx2048m -XX:smileytongue:ermSize=150m
								-XX:+HeapDumpOnOutOfMemoryError</argLine>
							<id>HelenWSBasicMavenProject</id>
							<projectFile>src/test/soapui/HelenWebServiceAutomation-soapui-project.xml</projectFile>
							<outputFolder>${project.build.directory}/surefire-reports</outputFolder>
							<junitReport>true</junitReport>
							<exportAll>true</exportAll>
							<printReport>true</printReport>
							<projectProperties>
							</projectProperties>
							<soapuiProperties>
								<property>
									<name>soapui.logroot</name>
									<value>${project.build.directory}/soapui-logs/</value>
								</property>
								<property>
									<name>soapui.ext.libraries</name>
									<value>ext</value>
								</property>
								<property>
									<name>soapui.scripting.library</name>
									<value>scripts</value>
								</property>
								<property>
									<name>soapui.home</name>
									<value>${env.SOAPUI_HOME}/bin</value>
								</property>
							</soapuiProperties>
							<inputProject />
							<outputProject />
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>2.6.1</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>.</directory>
							<includes>
								<include>**/*.log</include>
							</includes>
						</fileset>
						<fileset>
							<directory>./report</directory>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>${findbugs.version}</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>${cobertura.version}</version>
				<configuration>
					<formats>
						<format>xml</format>
					</formats>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>${findbugs.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${checkstyle.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>${surefire.reportplugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>${cobertura.version}</version>
				<configuration>
					<formats>
						<format>xml</format>
					</formats>
				</configuration>
			</plugin>
		</plugins>
	</reporting>
	<organization>
		<name>patios.com</name>
	</organization>
</project>

 

 

 

Jenkins error:

[ERROR] ----------------- Messages ------------------------------
[ERROR] [Check for existence of [ReturnCode]] XPathContains assertion failed for path [declare namespace ns1='http://schemas.forum.com/ForumService/V150';
[ERROR] exists( //ns1:CheckIsAliveOutput/ns1:ReturnCode)] : RuntimeException:java.lang.ClassCastException: org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath cannot be cast to org.apache.xmlbeans.impl.store.SaxonXBeansDelegate$SelectPathInterface
3 REPLIES 3
nmrao
Community Hero

Check if this is something that you are looking for http://forum.soapui.org/viewtopic.php?f=5&t=24821


Regards,
Rao.
npiper
Frequent Visitor

+1 - I am also getting this error on the soapUI Pro plugin version 5.1.2 that the assertion is failing. (XPath Assertion)

 

This occurs when running the test headlessly via Maven.

 

This does not occur when I run the same test in the GUI.  A dependency/classpath issue perhaps with the plugin pom?

Attaching the maven output file:

 

 

 

amitgrover8
Occasional Contributor

Hi,

 

I resolved this issue by removing following dependencies.

 

 

 	<!-- 	<dependency> 
			<groupId>org.reflections</groupId> 
			<artifactId>reflections</artifactId> 
			<version>0.9.9-RC1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>3.10-FINAL</version>
		</dependency> -->

After removing these my project is running succesfully. Hope this helps.

cancel
Showing results for 
Search instead for 
Did you mean: