arnaudroger / SimpleFlatMapper

Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper
http://simpleflatmapper.org
MIT License
435 stars 76 forks source link

Fails with java16 #761

Open davidkarlsen opened 3 years ago

davidkarlsen commented 3 years ago

I have a project which works fine with kotlin/jooq/sfm with java15, but when upgrading to java16 it fails in InjectConstructorBiInstantiator as it attempts to set null values, although the source has all values. Unfortunately I have not yet been able to pinpoint the exact problem in order to provide a better issue description.

Have you tested this on java16?

could it perhaps be tied to asm - as it has close ties to the JVM/bytecode? I noticed there seems to be some fork of asm in use.

ltkn commented 3 years ago

I don't use kotlin/jooq but with azul jdk16 and sfm-springjdbc/sfm-csv it's still working fine for me (debian+postgresql). openjdk version "16.0.1" 2021-04-20 OpenJDK Runtime Environment Zulu16.30+15-CA (build 16.0.1+9) OpenJDK 64-Bit Server VM Zulu16.30+15-CA (build 16.0.1+9, mixed mode, sharing)

I'm a bit nervous things will break with next jdk17 so I started this draft branch where ASM and few other dependencies are updated, feel free to give it a try : https://github.com/ltkn/SimpleFlatMapper/tree/feature/asm-and-other-dependencies-upgrade

davidkarlsen commented 3 years ago

@ltkn thanks - I tried building it with mvn clean install -Pdev9 in the root but it fails with:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sfm-tuples: Could not resolve dependencies for project org.simpleflatmapper:sfm-tuples:bundle:8.2.4-SNAPSHOT: Failed to collect dependencies at com.boundary:fasttuple-core:jar:0.1: Failed to read artifact descriptor for com.boundary:fasttuple-core:jar:0.1: Could not transfer artifact com.boundary:fasttuple-core:pom:0.1 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [arnaudroger-maven-repository (http://arnaudroger.github.io/maven, default, releases+snapshots)] -> [Help 1]
[ERROR] 
davidkarlsen commented 3 years ago

Related: https://github.com/jOOQ/jOOQ/issues/10150 and https://groups.google.com/g/jooq-user/c/Bfikrob2tnk

ltkn commented 3 years ago

can you try again with (a non headless jdk is required apt install zulu16-jdk) mvn clean install -Pdev9,jdk19

I've also updated jooq but not using it, not sure if it helps or actually makes it worse ;)

davidkarlsen commented 3 years ago
[INFO] Reactor Build Order:
[INFO] 
[INFO] sfm-test-sandbox                                                   [jar]
[INFO] sfm-test-sandbox-csv                                               [jar]
[INFO] sfm-test-proto                                                     [jar]
[INFO] sfm-test-osgi                                                      [jar]
[INFO] SFM JMH benchmark                                                  [jar]
[INFO] sfm-parent                                                         [pom]
[INFO] 
[INFO] ---------------< org.simpleflatmapper:sfm-test-sandbox >----------------
[INFO] Building sfm-test-sandbox 8.2.4-SNAPSHOT                           [1/6]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ sfm-test-sandbox ---
[INFO] Deleting /private/tmp/SimpleFlatMapper/sfm-test-sandbox/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sfm-test-sandbox ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /private/tmp/SimpleFlatMapper/sfm-test-sandbox/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ sfm-test-sandbox ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ sfm-test-sandbox ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /private/tmp/SimpleFlatMapper/sfm-test-sandbox/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ sfm-test-sandbox ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /private/tmp/SimpleFlatMapper/sfm-test-sandbox/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /private/tmp/SimpleFlatMapper/sfm-test-sandbox/src/test/java/module-info.java:[2,38] module not found: org.simpleflatmapper.map
[ERROR] /private/tmp/SimpleFlatMapper/sfm-test-sandbox/src/test/java/module-info.java:[3,38] module not found: org.simpleflatmapper.jdbc
[ERROR] /private/tmp/SimpleFlatMapper/sfm-test-sandbox/src/test/java/module-info.java:[4,38] module not found: org.simpleflatmapper.converter
[INFO] 3 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for sfm-parent 8.2.4-SNAPSHOT:
[INFO] 
[INFO] sfm-test-sandbox ................................... FAILURE [  0.714 s]
[INFO] sfm-test-sandbox-csv ............................... SKIPPED
[INFO] sfm-test-proto ..................................... SKIPPED
[INFO] sfm-test-osgi ...................................... SKIPPED
[INFO] SFM JMH benchmark .................................. SKIPPED
[INFO] sfm-parent ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.793 s
[INFO] Finished at: 2021-07-06T20:59:25+02:00
[INFO] ------------------------------------------------------------------------