Skip to content

remove rogue clara jar (and strip down EB 2-particle test script)#1148

Merged
c-dilks merged 12 commits intodevelopmentfrom
rogue-clara-jar
Mar 23, 2026
Merged

remove rogue clara jar (and strip down EB 2-particle test script)#1148
c-dilks merged 12 commits intodevelopmentfrom
rogue-clara-jar

Conversation

@baltzell
Copy link
Collaborator

@baltzell baltzell commented Mar 16, 2026

There's a jclara-4.3.jar in this repo, which gets installed via COATJAVA's build script into coatjava/lib/utils. That "rogue" jar serves (only) as a runtime dependency for the components of COATJAVA that extend CLARA, when run from outside CLARA, e.g. recon-util. Meanwhile, a normal CLARA installation also includes its own jclara jar, which CLARA runtime uses while explicitly ignoring coatjava/lib/utils. COATJAVA's maven build also ignores this rogue jar.

This pull request takes a small step in cleaning this up by:

  1. Removing the rogue jclara jar from coatjava's source repository.
  2. Instead using maven to retrieve and install a remote copy of that jar in coatjava/lib/utils
  3. Updating the maven build to use a new, non-SNAPSHOT jclara 4.3 maven repository

Also, as a prerequisite, a non-SNAPSHOT 4.3 maven repo was manually created on clasweb (by copying 4.3-SNAPSHOT).

@baltzell
Copy link
Collaborator Author

Weird, this google json library wasn't in the jclara jar:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/JsonParseException
	at ai.djl.repository.RepositoryFactoryImpl.init(RepositoryFactoryImpl.java:112)
	at ai.djl.repository.RepositoryFactoryImpl.<clinit>(RepositoryFactoryImpl.java:51)
	at ai.djl.repository.Repository.newInstance(Repository.java:90)
	at ai.djl.repository.zoo.DefaultModelZoo.parseLocation(DefaultModelZoo.java:66)
	at ai.djl.repository.zoo.DefaultModelZoo.<init>(DefaultModelZoo.java:47)
	at ai.djl.repository.zoo.Criteria$Builder.optModelPath(Criteria.java:591)
	at org.jlab.rec.ahdc.AI.ModelTrackFinding.<init>(ModelTrackFinding.java:47)
	at org.jlab.service.ahdc.AHDCEngine.init(AHDCEngine.java:84)
	at org.jlab.clas.reco.EngineProcessor.addEngine(EngineProcessor.java:235)
	at org.jlab.clas.reco.EngineProcessor.addEngine(EngineProcessor.java:254)
	at org.jlab.clas.reco.EngineProcessor.initAll(EngineProcessor.java:186)
	at org.jlab.clas.reco.EngineProcessor.main(EngineProcessor.java:426)
Caused by: java.lang.ClassNotFoundException: com.google.gson.JsonParseException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)

@c-dilks
Copy link
Member

c-dilks commented Mar 17, 2026

Weird, this google json library wasn't in the jclara jar:

Perhaps then we can get rid of the dependency conflict resolution here too:

coatjava/pom.xml

Lines 227 to 235 in 1ccf10a

<!-- resolve conflict between `org.jlab.coda:jclara` and `ai.djl:api`
by choosing the later version of their `com.google.code.gson:gson` dependency
- `djl`'s `gson` version is here: https://github.com/deepjavalibrary/djl/blob/master/gradle/libs.versions.toml
-->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.13.1</version> <!-- WARNING: if changed, see `docs/dependency_conflicts.md` -->
</dependency>

@baltzell
Copy link
Collaborator Author

no luck

@baltzell baltzell marked this pull request as ready for review March 22, 2026 23:46
@baltzell
Copy link
Collaborator Author

baltzell commented Mar 23, 2026

As @c-dilks pointed out, the new 4.3 maven repo on clasweb was missing a dependency pom, hence the previous (runtime) CI failures. That's been fixed.

@c-dilks
Copy link
Member

c-dilks commented Mar 23, 2026

Now we get a new warning:

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.jlab.clas:common-tools:pom:13.7.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-enforcer-plugin @ org.jlab.clas:coatjava:13.7.1-SNAPSHOT, /home/dilks/j/coatjava/pom.xml, line 392, column 15
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.jlab.clas:coatjava:pom:13.7.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-enforcer-plugin @ line 392, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 

@c-dilks
Copy link
Member

c-dilks commented Mar 23, 2026

Now we get a new warning:

It's unrelated to this PR, though I'm surprised it appeared now and now it's more obvious in the mvn output; I'll fix it in a separate PR.

@c-dilks c-dilks merged commit 7532104 into development Mar 23, 2026
23 checks passed
@c-dilks c-dilks deleted the rogue-clara-jar branch March 23, 2026 13:48
@baltzell baltzell changed the title remove rogue clara jar remove rogue clara jar (and strip down EB 2-particle test script) Mar 23, 2026
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.

2 participants