Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen-ddl fails after upgrade to 2.4.0 #37

Closed
mprins opened this issue Oct 19, 2021 · 9 comments
Closed

gen-ddl fails after upgrade to 2.4.0 #37

mprins opened this issue Oct 19, 2021 · 9 comments

Comments

@mprins
Copy link
Contributor

mprins commented Oct 19, 2021

After upgrading hibernate54-ddl-maven-plugin (and hibernate55-ddl-maven-plugin) from 2.3.0 to 2.40 I get the following error when running the gen-ddl goal.

[INFO] Reactor Summary for tailormap 5.9.10-SNAPSHOT:
[INFO] 
[INFO] tailormap .......................................... SUCCESS [  0.253 s]
[INFO] viewer-config-persistence .......................... FAILURE [  1.264 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.049 s (Wall Clock)
[INFO] Finished at: 2021-10-19T09:56:31+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal de.jpdigital:hibernate54-ddl-maven-plugin:2.4.0:gen-ddl (schema-export-main) on project viewer-config-persistence: Execution schema-export-main of goal de.jpdigital:hibernate54-ddl-maven-plugin:2.4.0:gen-ddl failed: Scanner SubTypesScanner was not configured -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.jpdigital:hibernate54-ddl-maven-plugin:2.4.0:gen-ddl (schema-export-main) on project viewer-config-persistence: Execution schema-export-main of goal de.jpdigital:hibernate54-ddl-maven-plugin:2.4.0:gen-ddl failed: Scanner SubTypesScanner was not configured
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution schema-export-main of goal de.jpdigital:hibernate54-ddl-maven-plugin:2.4.0:gen-ddl failed: Scanner SubTypesScanner was not configured
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
Caused by: org.reflections.ReflectionsException: Scanner SubTypesScanner was not configured
    at org.reflections.Store.get (Store.java:39)
    at org.reflections.Store.getAllIncluding (Store.java:75)
    at org.reflections.Reflections.getAllAnnotated (Reflections.java:469)
    at org.reflections.Reflections.getTypesAnnotatedWith (Reflections.java:430)
    at org.reflections.Reflections.getTypesAnnotatedWith (Reflections.java:416)
    at de.jpdigital.maven.plugins.hibernate5ddl.EntityFinder.findEntities (EntityFinder.java:264)
    at de.jpdigital.maven.plugins.hibernate5ddl.GenerateDdlMojo.execute (GenerateDdlMojo.java:192)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :viewer-config-persistence

apparently this originates in ronmamo/reflections#273 which was reported fixed with version 0.10. I tried forcing this newer version (both 0.10.0 as well as 0.10.1) as a plugin dependency, however there are API incompatibilities so it ends up in a runtime error. Downgrading to something before 0.9.12 (

<version>0.9.12</version>
) also fails in API incompatibilities.

Any chance you can release a version with a fix version of org.reflections:reflections?

reproducer is available in B3Partners/tailormap-legacy#2905

@mprins mprins changed the title after upgrade to gen-ddl fails after upgrade to 2.4.0 Oct 19, 2021
@mprins
Copy link
Contributor Author

mprins commented Oct 19, 2021

I've prepared a PR in #38 that upgrades the reflections dependency, that solves my problem when using "hibernate54-ddl-maven-plugin:2.5.0-SNAPSHOT", but the problem persists when using "hibernate55-ddl-maven-plugin:2.5.0-SNAPSHOT"

mprins added a commit to B3Partners/tailormap-legacy that referenced this issue Oct 19, 2021
mprins added a commit to B3Partners/tailormap-legacy that referenced this issue Oct 19, 2021
mprins added a commit to B3Partners/tailormap-legacy that referenced this issue Oct 19, 2021
@jpdigital
Copy link
Owner

Thanks for the update. The updated dependency will be part of version 2.5.0, which will hopefully be released in the next two weeks. I will look into the problem with Hibernate 5.5.

@jpdigital
Copy link
Owner

I've prepared a PR in #38 that upgrades the reflections dependency, that solves my problem when using "hibernate54-ddl-maven-plugin:2.5.0-SNAPSHOT", but the problem persists when using "hibernate55-ddl-maven-plugin:2.5.0-SNAPSHOT"

Which Java version are you using? Would be good to know because with Java 11 at least the tests for the hibernate-55 variant work. But maybe some of the changes in Java in recent versions might cause problems here. It would also be very helpful if you could provide a simple demo project that helps me to reproduce the problem.

@mprins
Copy link
Contributor Author

mprins commented Nov 1, 2021

I was convinced I was using Java 11, but am confused now as java -version says java 8. However the github actions are definitely using Java 11 (eg. https://github.com/B3Partners/tailormap/runs/3715499584?check_suite_focus=true)

@jpdigital
Copy link
Owner

Would it be possible for you to try it with a snapshot from the master branch? At least the integration tests all pass, for all Hibernate versions supported. Otherwise I would properly clone your repo to investigate the issue further.

@jpdigital
Copy link
Owner

jpdigital commented Nov 10, 2021

Could be that you forget to update the artifact ID for the hibernate5 plugin in the pom.xml of the viewer-config-persistence module? When the artifact ID in that pom.xml does not match the one from the plugin management section, Maven may has used the 2.4.0 version with the reflections version which causes the problem. I just checked out the tailormap repository and can build the viewer-config-persistence module without problems with the hibernate54-ddl-maven-plugin, hibernate55-ddl-maven-plugin and the hibernate56-ddl-maven-plugin, which will be published as part of version 2.5.0.

Would be kind if you could check this, because I'm planning to release version 2.5.0 with the updated dependency for Reflections - thanks for preparing this - this Saturday. But I don't want to release it if there might be a problem.

@mprins
Copy link
Contributor Author

mprins commented Nov 11, 2021

I'll give it a try later today

mprins added a commit to B3Partners/tailormap-legacy that referenced this issue Nov 11, 2021
@mprins
Copy link
Contributor Author

mprins commented Nov 11, 2021

I've pushed a snapshot build of your master branch to https://repo.b3p.nl/nexus/service/rest/repository/browse/public/de/jpdigital/ and updated my branch in B3Partners/tailormap-legacy#2940 to use hibernate56-ddl-maven-plugin and the whole build seems to be working, all CI checks passed

@jpdigital
Copy link
Owner

Release 2.5.0 is out. I think the problem should be gone with it. Otherwise, please create a new bug.

mprins added a commit to B3Partners/tailormap-legacy that referenced this issue Nov 16, 2021
mprins added a commit to B3Partners/tailormap-legacy that referenced this issue Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants