Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error - java.lang.NoSuchFieldException: modifiers while running the scripts #422

Open
parulbangar16 opened this issue Aug 2, 2022 · 7 comments

Comments

@parulbangar16
Copy link

QAF Version

ctsjv-qaf-automation

Steps To Reproduce

While running the scripts we are getting modifiers issue -

java.lang.NoSuchFieldException: modifiers
at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
at com.qmetry.qaf.automation.util.ClassUtil.setField(ClassUtil.java:599)

@cjayswal
Copy link
Member

cjayswal commented Aug 2, 2022

The information provided here is not enough. Provide QAF version and execution environment details. You can find this details in report under environment-information. You can also provide details about test authoring used for instance, BDD or Java (Testng Test)

Looks like duplicate of #331

@parulbangar16
Copy link
Author

parulbangar16 commented Aug 3, 2022

Please find more details below -

Regarding QAF -

<modelVersion>4.0.0</modelVersion>
<parent>
	<groupId>com.wellsfargo.ctsjv</groupId>
	<artifactId>ctsjv-qaf-automation-parent</artifactId>
	<version>10.0.0.1</version>
	
</parent> 

We were using the same framework in WellsFargo (Oracle Java 8 used) and it was working fine now we shifted to CPU and we are getting issues here - (Now RedHat java version 11 and RedHat Java version 8 we are using)

If we are running with Java 11 -

We are getting below mentioned error
;
java.lang.NoSuchFieldException: modifiers
at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
at com.qmetry.qaf.automation.util.ClassUtil.setField(ClassUtil.java:599)

If we change to Java 8 then we are getting complication issues -

java.lang.UnsupportedClassVersionError: com/cts/base/CSBaseTestCase has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Can you please help into this.

@parulbangar16
Copy link
Author

Please find the full pom.xml below -


4.0.0

com.wellsfargo.ctsjv
ctsjv-qaf-automation-parent
10.0.0.1

</parent> 

<artifactId>SeleniumCTSGatewayAutomation</artifactId>
<packaging>jar</packaging>
<version>2.0.0-SNAPSHOT</version>

<!-- <artifactId>wf-eqe-automation-web</artifactId>
<packaging>jar</packaging>
<name>wf-eqe-automation-web</name>-->


<name>SeleniumCTSGatewayAutomation</name>

<properties>
	<jdk.source.version>1.8</jdk.source.version>
	<jdk.target.version>1.8</jdk.target.version>
	<eqe.version>3.3-SNAPSHOT</eqe.version>
</properties>
<build>
<plugins>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-compiler-plugin</artifactId>
		<version>3.8.1</version>
		<configuration>
			<source>${jdk.source.version}</source>
			<target>${jdk.target.version}</target>
		</configuration>
	</plugin>
	<plugin>
		<groupId>org.sonarsource.scanner.maven</groupId>
		<artifactId>sonar-maven-plugin</artifactId>
		<version>3.4.0.905</version>
</plugin> 
</plugins>
</build>


<dependencies>
	
	<dependency>
		<groupId>com.wellsfargo.ctsjv</groupId>
		<artifactId>ctsjv-qaf-automation</artifactId>
		<version>10.0.0-SNAPSHOT</version>
		<scope>compile</scope>
	</dependency>
			
	<!-- dependency for Acceptance BOT -->
	<dependency>
		<groupId>org.imgscalr</groupId>
		<artifactId>imgscalr-lib</artifactId>
		<version>4.2</version>
	</dependency>
	<dependency>
		<groupId>com.madgag</groupId>
		<artifactId>animated-gif-lib</artifactId>
		<version>1.2</version>
	</dependency>
	<dependency>
		<groupId>com.qmetry</groupId>
		<artifactId>qaf-execution-recorder</artifactId>
		<version>0.0.1</version>
		<scope>system</scope>
		<systemPath>${project.basedir}/lib/qaf-execution-recorder-0.0.1.jar</systemPath>
	</dependency>
	<!-- for run history listener -->
	<dependency>
		<groupId>commons-jxpath</groupId>
		<artifactId>commons-jxpath</artifactId>
		<version>1.3</version>
	</dependency>
 <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.1.0</version>
        <scope>test</scope>
    </dependency>
</dependencies>

@parulbangar16
Copy link
Author

This is TestNG

@cjayswal
Copy link
Member

cjayswal commented Aug 5, 2022

@parulbangar16 QAF version and execution environment details are still missing. You can find this details in report under environment-information.

Regardless of that you should contact to internal team who is maintaining ctsjv-qaf-automation library.

@parulbangar16
Copy link
Author

@cjayswal QAF report - dashboard.htm is not generating that is why we are not able to share the environment - information.

@cjayswal
Copy link
Member

cjayswal commented Aug 8, 2022

You should contact to internal team who is maintaining ctsjv-qaf-automation library for the issue. Report issue to internal team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants