ormlite-jdbc icon indicating copy to clipboard operation
ormlite-jdbc copied to clipboard

Compatibility with Java 9.

Open angelelectrico opened this issue 7 years ago • 7 comments
trafficstars

If you try to compile a Java 9 deep encapsulated module with both code and jdbc you will get the following error:

error: module ModuleName reads package com.j256.ormlite.db from both ormlite.jdbc and ormlite.core

This seems fairly easy to fix, just move the package to the other project or rename it.

Thanks!

angelelectrico avatar Apr 10 '18 16:04 angelelectrico

Interesting problem. It can't be moved to core but it can be pushed to a new package in JDBC. Can you move them to com.j256.ormlite.db.jdbc and see if it compiles?

Thanks.

j256 avatar Apr 10 '18 16:04 j256

@j256 moving only jdbc then logger becomes the next issue, and so on, I moved the whole core and jdbc to have new top packages (com.j256.ormlite -> com.j256.ormlite.core), do you think this is an acceptable approach ?

zanella avatar Jun 21 '18 09:06 zanella

I think it makes more sense to just move the jdbc packages since core is a lot larger but whatever works for you @zanella in the short-term.

j256 avatar Jun 21 '18 14:06 j256

Hello, I had the same problem so I combined to two libraries into one (available here, usable via Gradle/Maven/etc here) works perfectly on Java 11

1fexd avatar Feb 20 '20 09:02 1fexd

I hackfixed it as well by simply copying both -android and -jdbc into -core.

mifritscher avatar Mar 17 '20 15:03 mifritscher

This has been [hopefully] fixed in 5.2. Can someone verify? I'm not working with Java 9 yet.

j256 avatar Nov 15 '20 16:11 j256