Skip to content

Add local development setup for RACM debugging#93

Open
glemson wants to merge 4 commits intomainfrom
eclipse-config
Open

Add local development setup for RACM debugging#93
glemson wants to merge 4 commits intomainfrom
eclipse-config

Conversation

@glemson
Copy link
Contributor

@glemson glemson commented Mar 3, 2026

Add documentation and configuration changes to support running RACM locally via Spring Boot embedded Tomcat for development and debugging.

  • Add RACM README.md with local setup, build, and Eclipse instructions
  • Exclude spring-boot-starter-logging globally to prevent log4j bridge conflicts
  • Exclude org.springframework.boot.jdbc from AspectJ weaving (Oracle classes)
  • Add .gitignore entries for Eclipse artifacts, AspectJ dumps, and RACM lib/
  • Add racm .gitignore for lib/ and WebContent/WEB-INF/classes/

Add documentation and configuration changes to support running RACM
locally via Spring Boot embedded Tomcat for development and debugging.

- Add RACM README.md with local setup, build, and Eclipse instructions
- Exclude spring-boot-starter-logging globally to prevent log4j bridge conflicts
- Exclude org.springframework.boot.jdbc from AspectJ weaving (Oracle classes)
- Add .gitignore entries for Eclipse artifacts, AspectJ dumps, and RACM lib/
- Add racm .gitignore for lib/ and WebContent/WEB-INF/classes/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds local-development documentation and configuration tweaks to make the RACM service easier to run/debug locally (embedded Tomcat + AspectJ LTW), while also adjusting repository ignores and build configuration to avoid logging/weaving conflicts.

Changes:

  • Document RACM local build/run/debug workflow (including required javaagents) and add RACM-specific developer notes.
  • Update AspectJ weaving config to exclude org.springframework.boot.jdbc..*.
  • Add/extend .gitignore entries and globally exclude spring-boot-starter-logging from Java subprojects.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
components/java/racm/src/main/resources/META-INF/aop.xml Excludes Spring Boot JDBC packages from AspectJ weaving.
components/java/racm/README.md New RACM local setup/build/run/debug documentation.
components/java/racm/CLAUDE.md New RACM component notes (build/debug/config/architecture).
components/java/racm/.gitignore Ignores local-only RACM libs and Eclipse/Tomcat class output.
components/java/build.gradle Globally excludes spring-boot-starter-logging from all Java subprojects.
.gitignore Adds ignores for Eclipse artifacts, AspectJ dumps, and backup files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +16
configurations.all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The global exclusion of spring-boot-starter-logging for all Java subprojects is likely to break projects that rely on it transitively. For example, fileservice-bootstrapper uses org.apache.logging.log4j.* but only depends on spring-boot-starter; it currently gets log4j-api via spring-boot-starter-logging (through log4j-to-slf4j). With this change, that module will no longer compile/run with logging. Consider scoping this exclusion only to Spring Boot apps that explicitly add spring-boot-starter-log4j2, or alternatively add explicit logging dependencies (e.g., log4j-api / spring-boot-starter-log4j2) to the affected projects instead of excluding globally.

Suggested change
configurations.all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
afterEvaluate { project ->
def implementationConfig = project.configurations.findByName('implementation')
def hasLog4j2Starter = implementationConfig?.dependencies?.any { dep ->
dep.group == 'org.springframework.boot' && dep.name == 'spring-boot-starter-log4j2'
}
if (hasLog4j2Starter) {
configurations.all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
}

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +26
- Java 17 JDK
- SQL Server with a `racm` database
- Two Java agent JARs (required by AspectJ load-time weaving and EclipseLink):
- `aspectjweaver-1.9.22.1.jar` (available in Gradle cache after building)
- `spring-instrument-5.3.31.jar` (download from Maven Central, store in `racm/lib/` which is gitignored)

Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This README hard-codes spring-instrument-5.3.31.jar for the -javaagent, but the RACM Gradle build currently declares Spring Boot starter dependencies at 3.2.2 (while the plugin is 2.7.18). If RACM is effectively on Spring Boot 3/Spring Framework 6, the spring-instrument major version must match (5.x vs 6.x) or load-time weaving may fail. Consider updating the README to derive the required agent version from the Gradle build (or add org.springframework:spring-instrument as a Gradle dependency and instruct developers to use the jar from the Gradle cache).

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this caused a consistency problem with other components when actually trying to run racm from within eclipse. simplest solution was to have the library explicitly loaded here.

glemson and others added 2 commits March 3, 2026 14:37
Add documentation and configuration changes to support running RACM
locally via Spring Boot embedded Tomcat for development and debugging.

- Add RACM README.md with local setup, build, and Eclipse instructions
- Exclude spring-boot-starter-logging globally to prevent log4j bridge conflicts
- Exclude org.springframework.boot.jdbc from AspectJ weaving (Oracle classes)
- Add .gitignore entries for Eclipse artifacts, AspectJ dumps, and RACM lib/
- Add racm .gitignore for lib/ and WebContent/WEB-INF/classes/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@glemson glemson marked this pull request as draft March 3, 2026 21:02
@glemson glemson force-pushed the eclipse-config branch 3 times, most recently from cdbfbf6 to 71d0595 Compare March 4, 2026 12:42
@@ -0,0 +1,39 @@
# RACM Component

## Code Style
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much of this file is generic either the repo as a whole or the java projects within. Perhaps it is prudent to place much of it at a higher level in the repo sooner rather than later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, but let's discuss our GenAI usage and how it is reflected in the code base in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is probably best for this PR to leave the CLAUDE.md file here and later when working in the larger context to add a file there and maybe move some of the current content up.

### Prerequisites

- Java 17 JDK
- SQL Server with a `racm` database
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could supply more information on this (e.g. version requirements, how to start one in docker), or we can add a reference to the relevant place in the helm chart to look

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the database could also be named differently as long as it is properly set in the config file(s)

Comment on lines +13 to +15
api('org.springframework.boot:spring-boot-starter-web:2.6.6') {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this better belongs in the racm gradle file, similar to that of fileservice. However if there is another reason to do it here due to eclipse, we probably want to create an issue to track a resolution

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to homogenize how logging is done anyway I think? so an issue is in order.
This is still a draft and let's have some further discussion how to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd like to take the current solution, issue an issue and move towards updating the logging of racm.

@glemson glemson marked this pull request as ready for review March 7, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants