Martin Panzer (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ed8c2e...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTU5MzViOWFk...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16587?atlOrigin=eyJpIjoiNTU5Mz...
) HHH-16587 (
https://hibernate.atlassian.net/browse/HHH-16587?atlOrigin=eyJpIjoiNTU5Mz...
) WARN [org.hib.met.int.MetadataContext] (JPA Startup Thread) HHH015011: Unable to locate
static metamodel field : (
https://hibernate.atlassian.net/browse/HHH-16587?atlOrigin=eyJpIjoiNTU5Mz...
)
Change By: Martin Panzer (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ed8c2e...
)
h3. Describe the bug
I have the following field in my entity:
{noformat}[...]
public class Rule {
[...]
@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "condition", columnDefinition = "json")
private Predicate condition;
[..]
}{noformat}
During quarkus startup I now get following warning:
{noformat}2023-05-05 11:36:39,583 WARN [org.hib.met.int.MetadataContext] (JPA Startup
Thread) HHH015011: Unable to locate static metamodel field :
com.activelogistics.wolf.webruleservice.rule.db.model.Rule_#condition; this may or may not
indicate a problem with the static metamodel {noformat}
The metamodel is generated by following dependency:
{noformat} <dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>{noformat}
The field condition is indeed missing in the metamodel.
During the Q3 migration, I changed the field from this:
{noformat} @Type(type =
"io.hypersistence.utils.hibernate.type.json.JsonNodeBinaryType")
@Column(name = "condition", columnDefinition = "json")
private Predicate condition;{noformat}
And the condition was included in the metamodel.
Could it be, that {{JdbcTypeCode}} is not respected by the metamodel generator and
therefore the field not included?
h3. Expected behavior
_No response_
h3. Actual behavior
_No response_
h3. How to Reproduce?
Reproducer:
[
orm-warning-json.zip|https://github.com/quarkusio/quarkus/files/11406031/...]
# mvn clean compile quarkus:dev
# Warning is printed
h3. Output of {{uname -a}} or {{ver}}
MINGW64_NT-10.0-19045 NANBCHL9NG3 3.3.6-341.x86_64 2022-09-05 20:28 UTC x86_64 Msys
h3. Output of {{java -version}}
openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment Temurin-17.0.4+8
(build 17.0.4+8) OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (build 17.0.4+8, mixed mode,
sharing)
h3. GraalVM version (if different from Java)
_No response_
h3. Quarkus version or git rev
3.0.2.Final
h3. Build tool (ie. output of {{mvnw --version}} or {{gradlew --version}})
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home:
C:\eclipse\tools\java\maven Java version: 17.0.4, vendor: Eclipse Adoptium, runtime:
C:\eclipse\tools\java\17 Default locale: de_DE, platform encoding: Cp1252 OS name:
"windows 10", version: "10.0", arch: "amd64", family:
"windows"
h3. Additional information
_No response_
(
https://hibernate.atlassian.net/browse/HHH-16587#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16587#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:84d3b45 )