You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to update to a later version of Ebean (coming from 12.x) , but are encountering some errors while doing so.
One of them is related to Querybeans throwing an IllegalAccessError with @embeddable class in another package.
Expected behavior
We expect the following line to work without throwing an exception.
QueryBeans not to throw the IllegalAccessError when the @embeddable class is not in the same package.
We're reusing an @embeddable class in multiple Entities, therefore have moved it to another 'common' package structure.
This issue/bug was introduced after #3455 . (14.5.0 works, 14.6.0 onwards fails)
Actual behavior
An IllegalAccessError is thrown:
java.lang.IllegalAccessError: class org.example.content.model.query.QContentWithEmbeddedId tried to access protected method 'void org.example.common.embedded.query.QEmbeddableId$Assoc.<init>(java.lang.String, java.lang.Object)' (org.example.content.model.query.QContentWithEmbeddedId and org.example.common.embedded.query.QEmbeddableId$Assoc are in unnamed module of loader 'app')
at org.example.content.model.query.QContentWithEmbeddedId.<init>(QContentWithEmbeddedId.java:3)
at org.example.content.model.query.QContentWithEmbeddedId.<clinit>(QContentWithEmbeddedId.java:16)
From what I can tell it is related to the change made in file :
querybean-generator/src/main/java/io/ebean/querybean/generator/SimpleQueryBeanWriter.java
writeAssocBeanConstructor("protected Assoc");
Could you tell me if this is indeed a bug, or has this been done for a particular reason.
Thanks,
Cas
The text was updated successfully, but these errors were encountered:
We are trying to update to a later version of Ebean (coming from 12.x) , but are encountering some errors while doing so.
One of them is related to Querybeans throwing an IllegalAccessError with @embeddable class in another package.
Expected behavior
We expect the following line to work without throwing an exception.
QueryBeans not to throw the IllegalAccessError when the @embeddable class is not in the same package.
We're reusing an @embeddable class in multiple Entities, therefore have moved it to another 'common' package structure.
This issue/bug was introduced after #3455 . (14.5.0 works, 14.6.0 onwards fails)
Actual behavior
An IllegalAccessError is thrown:
Steps to reproduce
Created sample project : https://github.com/casmir/ebean-querybean-protected-assoc
Create an embeddable class in one package and use that with an Entity in another package.
From what I can tell it is related to the change made in file :
querybean-generator/src/main/java/io/ebean/querybean/generator/SimpleQueryBeanWriter.java
Could you tell me if this is indeed a bug, or has this been done for a particular reason.
Thanks,
Cas
The text was updated successfully, but these errors were encountered: