Eukon05
Eukon05
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
Sorry for a late response, I've just tried it and the tests went through! Thank you so much!
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
I tried to check if it's being loaded by the class loader with this in an @BeforeAll block:
try {
Class.forName("org.hibernate.jpa.HibernatePersistenceProvider");
System.out.println("LOADED");
}
catch (ClassNotFoundException e) {
e.printStackTrace();
}
try {
Class.forName("org.hibernate.jpa.HibernatePersistenceProvider");
System.out.println("LOADED");
}
catch (ClassNotFoundException e) {
e.printStackTrace();
}
But it fails and gives an error: java.lang.IllegalAccessError: superclass access check failed: class org.jboss.logging.JBossLogRecord (in module org.jboss.logging) cannot access class java.util.logging.LogRecord (in module java.logging) because module org.jboss.logging does not read module java.logging
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
I also tried making a copy of the persistence.xml file in the test dir. but it did nothing
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
It didn't help, I also get a warning before the error: WARNING: jakarta.persistence.spi::No valid providers found.
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
Ok, let me try that
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
Should I create another persistence.xml file in the test/resources directory?
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
Now it went through, but then gave me another error:
Caused by: jakarta.persistence.PersistenceException: No Persistence provider for EntityManager named hibernate
Caused by: jakarta.persistence.PersistenceException: No Persistence provider for EntityManager named hibernate
31 replies
JCHJava Community | Help. Code. Learn.
Created by Eukon05 on 10/21/2024 in #java-help
Module not found when running tests in Maven
--- dependency:3.7.0:tree (default-cli) @ infodb-persistence-hibernate ---
[INFO] ovh.eukon05:infodb-persistence-hibernate:jar:1.0-SNAPSHOT
[INFO] +- ovh.eukon05:infodb-api-persistence:jar:1.0-SNAPSHOT:compile
[INFO] +- org.hibernate.orm:hibernate-core:jar:6.6.1.Final:compile
[INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:3.1.0:compile
[INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:2.0.1:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.5.0.Final:runtime
[INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:7.0.1.Final:runtime
[INFO] | +- io.smallrye:jandex:jar:3.2.0:runtime
[INFO] | +- com.fasterxml:classmate:jar:1.5.1:runtime
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.14.18:runtime
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.0:runtime
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:2.1.0:runtime
[INFO] | +- org.glassfish.jaxb:jaxb-runtime:jar:4.0.2:runtime
[INFO] | | \- org.glassfish.jaxb:jaxb-core:jar:4.0.2:runtime
[INFO] | | +- org.eclipse.angus:angus-activation:jar:2.0.0:runtime
[INFO] | | +- org.glassfish.jaxb:txw2:jar:4.0.2:runtime
[INFO] | | \- com.sun.istack:istack-commons-runtime:jar:4.1.1:runtime
[INFO] | +- jakarta.inject:jakarta.inject-api:jar:2.0.1:runtime
[INFO] | \- org.antlr:antlr4-runtime:jar:4.13.0:runtime
[INFO] +- com.h2database:h2:jar:2.3.232:test
[INFO] \- org.junit.jupiter:junit-jupiter:jar:5.11.2:test
[INFO] +- org.junit.jupiter:junit-jupiter-api:jar:5.11.2:test
[INFO] | +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] | +- org.junit.platform:junit-platform-commons:jar:1.11.2:test
[INFO] | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] +- org.junit.jupiter:junit-jupiter-params:jar:5.11.2:test
[INFO] \- org.junit.jupiter:junit-jupiter-engine:jar:5.11.2:test
[INFO] \- org.junit.platform:junit-platform-engine:jar:1.11.2:test
--- dependency:3.7.0:tree (default-cli) @ infodb-persistence-hibernate ---
[INFO] ovh.eukon05:infodb-persistence-hibernate:jar:1.0-SNAPSHOT
[INFO] +- ovh.eukon05:infodb-api-persistence:jar:1.0-SNAPSHOT:compile
[INFO] +- org.hibernate.orm:hibernate-core:jar:6.6.1.Final:compile
[INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:3.1.0:compile
[INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:2.0.1:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.5.0.Final:runtime
[INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:7.0.1.Final:runtime
[INFO] | +- io.smallrye:jandex:jar:3.2.0:runtime
[INFO] | +- com.fasterxml:classmate:jar:1.5.1:runtime
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.14.18:runtime
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.0:runtime
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:2.1.0:runtime
[INFO] | +- org.glassfish.jaxb:jaxb-runtime:jar:4.0.2:runtime
[INFO] | | \- org.glassfish.jaxb:jaxb-core:jar:4.0.2:runtime
[INFO] | | +- org.eclipse.angus:angus-activation:jar:2.0.0:runtime
[INFO] | | +- org.glassfish.jaxb:txw2:jar:4.0.2:runtime
[INFO] | | \- com.sun.istack:istack-commons-runtime:jar:4.1.1:runtime
[INFO] | +- jakarta.inject:jakarta.inject-api:jar:2.0.1:runtime
[INFO] | \- org.antlr:antlr4-runtime:jar:4.13.0:runtime
[INFO] +- com.h2database:h2:jar:2.3.232:test
[INFO] \- org.junit.jupiter:junit-jupiter:jar:5.11.2:test
[INFO] +- org.junit.jupiter:junit-jupiter-api:jar:5.11.2:test
[INFO] | +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] | +- org.junit.platform:junit-platform-commons:jar:1.11.2:test
[INFO] | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] +- org.junit.jupiter:junit-jupiter-params:jar:5.11.2:test
[INFO] \- org.junit.jupiter:junit-jupiter-engine:jar:5.11.2:test
[INFO] \- org.junit.platform:junit-platform-engine:jar:1.11.2:test
31 replies