Skip to content

Implement refactorings - Import error in AbendImpl

0

During the implementation of refactorings in AWS Blu Age Level 3 Self-Paced Troubleshooting Workshop, I get errors due to missing dependencies in AbendImpl.java code with "import com.netfective.bluage.gapwalk.rt.call.ProgramExecutionResult; import com.netfective.bluage.gapwalk.rt.call.internal.StopRunUnitException;".

I’ve searched the Refactoring Toolbox but was unable to locate these classes or their associated JARs. I tried additional other dependencies after installing Runtime Timebombed, but the issue still persists.

Thanks in advance for your help.

Here is my current 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>aws.bluage.demo</groupId>
<artifactId>carddemo-refactoring</artifactId>
<version>3.1.419</version>

<properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<gapwalk.version>4.2.1</gapwalk.version>
</properties>

<dependencies>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.7.26</version>
	</dependency>
	<dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-context</artifactId>
	  <version>5.3.32</version> 
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-log4j12</artifactId>
		<version>1.7.26</version>
	</dependency>
	<dependency>
		<groupId>com.netfective.bluage</groupId>
		<artifactId>com.netfective.bluage.reverse.gapwalk.refactoring.java</artifactId>
		<version>${gapwalk.version}</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.emfcloud</groupId>
		<artifactId>emfjson-jackson</artifactId>
		<version>2.2.0</version>
	</dependency>
	<dependency>
		<groupId>org.junit.jupiter</groupId>
		<artifactId>junit-jupiter-engine</artifactId>
		<version>5.7.1</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.junit.platform</groupId>
		<artifactId>junit-platform-runner</artifactId>
		<version>1.7.1</version>
		<scope>test</scope>
	</dependency>
</dependencies>

<build>
	<finalName>gilda-refactoring</finalName>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.7.0</version>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
			</configuration>
		</plugin>
	</plugins>

</build>
</project>
1 Answer
0
Accepted Answer

The import errors you're experiencing with ProgramExecutionResult and StopRunUnitException in your AbendImpl class are due to missing dependencies in your project's pom.xml file.

To resolve these import errors, you need to add the following Blu Age runtime dependencies to your pom.xml:

<dependency>
<groupId>com.netfective.bluage</groupId>
<artifactId>gapwalk.runtime.legacy.statements</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.netfective.bluage</groupId>
<artifactId>gapwalk-datasimplifier-io-bluesam</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.netfective.bluage</groupId>
<artifactId>gapwalk-runtime-database-support</artifactId>
<scope>provided</scope>
</dependency>

A few important points to consider:

  1. Make sure you're using the same version of AWS Blu Age for both generating the modernized code and executing it. Version mismatches can cause dependency issues.

  2. If you're still experiencing issues after adding these dependencies, you may need to check your Maven settings to ensure they're correctly configured to access the necessary repositories for Blu Age dependencies.

  3. After making these changes, clean and rebuild your project to ensure the dependencies are properly resolved.

Alternatively, it's worth noting that some workshop participants found that they didn't need to directly implement the Abend code in their refactor project. If you're following a specific workshop exercise, double-check the assignment instructions to ensure you're taking the correct approach.
Sources
AWS Blu Age L3 : Refactoring -Implement | AWS re:Post
Blu Age L3 Workshop Refactoring Java Project Setup | AWS re:Post
Maven dependency error when importing Blu Age L3 Workshop modernized code | AWS re:Post

answered a year ago

EXPERT

reviewed a year ago

  • This solved the issue after importing Runtime Timebombed dependencies (https://catalog.us-east-1.prod.workshops.aws/workshops/bf71c0bc-6d8a-4d04-9c10-ab479f7f0e37/en-US/tools/bluage/runtime-timebombed) and using version 4.2.0.

    New dependencies in pom.xml : <dependency> <groupId>com.netfective.bluage</groupId> <artifactId>gapwalk.runtime.legacy.statements</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.netfective.bluage</groupId> <artifactId>gapwalk-datasimplifier-io-bluesam</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.netfective.bluage</groupId> <artifactId>gapwalk-runtime-database-support</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency>

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.