You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying out Spring Modulith 1.2.3 with a Spring Boot 3.3.3 project that is written in Kotlin. On the Verifying Application Module Structure page I read about jMolecules, and I found that jmolecules-ddd has a Kotlin counterpart called kmolecules-ddd.
However, after adding org.jmolecules:kmolecules-ddd to my project, I got java.lang.NoClassDefFoundError: org/jmolecules/ddd/annotation/Module when calling org.springframework.modulith.core.ApplicationModuleInformation#of for Spring Modulith application module verification and documentation generation.
This seems to happen because JMoleculesTypes.isPresent() returns true, because org.jmolecules.ddd.annotation.Entity is present (provided by kmolecules-ddd), but JMoleculesModule.supports(lookup) then tries to look up org.jmolecules.ddd.annotation.Module, which is not provided by kmolecules-ddd (although it is indeed provided by jmolecules-ddd).
The text was updated successfully, but these errors were encountered:
I'm now thinking that these annotations are probably missing from kmolecules-ddd, because these are package-level annotations and Kotlin doesn't provide a way to define package-level annotations.
Maybe it's then best to let Spring Modulith not fail when org.jmolecules.ddd.annotation.Module is not present?
odrotbohm
changed the title
ApplicationModules.of throws NoClassDefFoundError for org.jmolecules.ddd.annotation.Module when using kmolecules-dddApplicationModules.of(…) throws NoClassDefFoundError` when using the jMolecules Kotlin library
Sep 6, 2024
odrotbohm
changed the title
ApplicationModules.of(…) throws NoClassDefFoundError` when using the jMolecules Kotlin libraryApplicationModules.of(…) throws NoClassDefFoundError when using the jMolecules Kotlin library
Sep 6, 2024
As @module is absent from the Kotlin flavor of jMolecules, code that refers to that is now guarded with a more specific check for that type in particular.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying out Spring Modulith 1.2.3 with a Spring Boot 3.3.3 project that is written in Kotlin. On the Verifying Application Module Structure page I read about jMolecules, and I found that
jmolecules-ddd
has a Kotlin counterpart called kmolecules-ddd.However, after adding
org.jmolecules:kmolecules-ddd
to my project, I gotjava.lang.NoClassDefFoundError: org/jmolecules/ddd/annotation/Module
when callingorg.springframework.modulith.core.ApplicationModuleInformation#of
for Spring Modulith application module verification and documentation generation.This seems to happen because
JMoleculesTypes.isPresent()
returnstrue
, becauseorg.jmolecules.ddd.annotation.Entity
is present (provided bykmolecules-ddd
), butJMoleculesModule.supports(lookup)
then tries to look uporg.jmolecules.ddd.annotation.Module
, which is not provided bykmolecules-ddd
(although it is indeed provided byjmolecules-ddd
).The text was updated successfully, but these errors were encountered: