ebean.ddl.generate & ebean.ddl.run not working in 12.11.5

309 views
Skip to first unread message

parveenya...@gmail.com

unread,
Sep 23, 2021, 6:44:39 AM9/23/21
to Ebean ORM
Hi Rob,

In 12.6.2, generation and executing the SQLs were working fine, the SQLs were executed on the first call to the ebean. I updated to version 12.11.5, and now neither the SQL is generated and hence it is not executed.  I am using java 16. 

Below is my build.gradle
implementation 'io.ebean:ebean:12.11.5'
implementation 'io.ebean:ebean-querybean:12.11.5'

annotationProcessor 'io.ebean:querybean-generator:12.11.5'
testImplementation 'io.ebean:ebean-test:12.11.5'

application.properties
ebean.ddl.generate= true
ebean.ddl.run= true

parveen

Rob Bygrave

unread,
Sep 23, 2021, 4:43:39 PM9/23/21
to ebean@googlegroups
Hi,

Glen just hit this issue yesterday and I think this is the same issue.

Almost certainly this issue is due to ebean-ddl-generator not being in the test classpath.

Background:
As part of the modularisation of ebean we split out the ddl generation into a ebean-ddl-generator module.  This module is generally only required for testing purposes (to generate and run ddl for tests). Prior to the modularisation of ebean this was all bundled into ebean itself. This generally makes sense because it reduces the size of ebean and the number of dependencies it requires for runtime (makes all the ddl related code and dependencies test scope only dependencies which is a good thing).

Now ebean-ddl-generator is a dependency of ebean-test - projects that use ebean-test just get ebean-ddl-generator BUT projects that don't use ebean-test need to now explicitly add ebean-ddl-generator as a test dependency (when we didn't need to do that prior).

<dependency>
  <groupId>io.ebean</groupId>
  <artifactId>ebean-ddl-generator</artifactId>
  <version>12.12.0-SNAPSHOT</version>
  <scope>test</scope>
</dependency>

Apologies as this issue is pretty hard to diagnose / spot. I wonder if we can improve the situation by logging a warning when trying to generate ddl without the ebean-ddl-generator in the classpath.

But yes, add ebean-ddl-generator as a test scope dependency and it should all run as before.


Cheers, Rob.

--

---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ebean/77703de1-d095-4132-a9b9-d5efaa68fcb7n%40googlegroups.com.

parveenya...@gmail.com

unread,
Sep 24, 2021, 7:23:26 AM9/24/21
to Ebean ORM
thanks a lot Rob, it is working now.
Reply all
Reply to author
Forward
0 new messages