Comments (1)
Hello
According to the Korean translator's explanation, using the latest version of MongoDB, there was an error, and when using version 5.0, there was no error.
I also tried running it in a MongoDB 5.0.26
environment, and confirmed that the test code passes.
root@mongodb_docker_host:/# mongo --version
MongoDB shell version v5.0.26
Build Info: {
"version": "5.0.26",
...
To resolve class access exceptions to modules not registered as unnamed modules, and file encoding warnings (my Windows Terminal Encoding: MS949), I also added the following to the pom.xml
-
Exception for class access to modules not registered as unnamed modules
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @20322d26 ...
<plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.2</version> <configuration> <includes> <include>**/*.java</include> </includes> <argLine> --add-opens java.base/java.lang=ALL-UNNAMED </argLine> </configuration> </plugin>
- The test didn't fail without the above JVM options added, but once they were added, the warning was no longer exposed.
-
File encoding warnings
[WARNING] File encoding has not been set, using platform encoding MS949, i.e. build is platform dependent!
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>
- Unless your Windows terminal encoding is multibyte, I don't think you need to set sourceEncoding to UTF-8.
Result: mvn clean test
have a nice day. 👍
I think the more specific cause is that the mongo-java-driver version used by hibernate-ogm-mongodb:4.2.0.Final is old.
- https://central.sonatype.com/artifact/org.hibernate.ogm/hibernate-ogm-mongodb/4.2.0.Final/dependencies
- https://central.sonatype.com/artifact/org.mongodb/mongo-java-driver/2.13.1
from java-persistence-spring-data-hibernate.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-persistence-spring-data-hibernate.