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

Hibernate upgrade #9179

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1a93e71
obs to maven new hibernate6 dependencies
mbussolotto Aug 19, 2024
48580bf
hypersistence utils instead of hibernate utils
mbussolotto Aug 19, 2024
a2a4745
import jakarta.persistence instead of javax.persistence
mbussolotto Aug 19, 2024
21539e5
change json type to use hypersistence library
mbussolotto Aug 19, 2024
d2f7689
remove missing import
mbussolotto Aug 20, 2024
70d8e7f
fix yesno type and remove useless override
mbussolotto Aug 20, 2024
e4d3a37
fix parameter type
mbussolotto Aug 20, 2024
11ce6e3
update IVY config to Leap 15.6
mcalmer Aug 23, 2024
8b94823
fix repositories and versions
mcalmer Aug 23, 2024
07ed89d
hibernate 6 adaptation
mbussolotto Oct 3, 2024
b852506
fixup! hibernate 6 adaptation
mbussolotto Oct 4, 2024
99b18c4
changelog
mbussolotto Oct 4, 2024
55580f5
update rpm requirements
mbussolotto Oct 4, 2024
f591c8c
fixup! update rpm requirements
mbussolotto Oct 8, 2024
1b9ba26
fixup! fixup! update rpm requirements
mbussolotto Oct 8, 2024
ee78f82
fixup! fixup! fixup! update rpm requirements
mbussolotto Oct 8, 2024
cee15c1
fixup! fixup! fixup! fixup! update rpm requirements
mbussolotto Oct 8, 2024
4cc0b38
fixup! fixup! fixup! fixup! fixup! update rpm requirements
mbussolotto Oct 8, 2024
a6b3668
add jakarta transaction dependencies
mbussolotto Oct 14, 2024
a40264d
upgrade jaxb
mbussolotto Oct 14, 2024
4f56de5
fixup! upgrade jaxb
mbussolotto Oct 14, 2024
6d0428b
update dependencies
mbussolotto Oct 21, 2024
c267e5a
fixup! update dependencies
mbussolotto Oct 21, 2024
dcc3b6a
cleanup ehcache
mbussolotto Oct 22, 2024
e21e62b
add jcache dep
mbussolotto Oct 22, 2024
ff075e0
remove updatable parameter annotation
mbussolotto Oct 22, 2024
c4f1577
fix mappedby with a view
mbussolotto Oct 23, 2024
2cac2e2
log all hibernate info
mbussolotto Oct 23, 2024
e923c86
fixup! remove updatable parameter annotation
mbussolotto Oct 24, 2024
127ab61
fix dep
mbussolotto Oct 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"nickheap.vscode-ant",
"shengchen.vscode-checkstyle",
"vscjava.vscode-java-debug",
"vscjava.vscode-java-pack",
"redhat.java",
"dbaeumer.vscode-eslint"
]
}
6 changes: 0 additions & 6 deletions java/.vscode/extensions.json

This file was deleted.

27 changes: 0 additions & 27 deletions java/.vscode/launch.json.template

This file was deleted.

28 changes: 24 additions & 4 deletions java/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,29 @@
"vmArgs": [
"-Drhn.config.dir=${workspaceFolder}/buildconf/test",
"-Dlog4j2.configurationFile=${workspaceFolder}/buildconf/test/log4j2.properties"
]
]
},
"ant.buildFilenames": "manager-build.xml",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable",
"java.compile.nullAnalysis.mode": "automatic"
}
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx4G -Xms2G -Xlog:disable",
"java.compile.nullAnalysis.mode": "automatic",
"java.checkstyle.version": "10.12.7",
"java.checkstyle.autocheck": "false",
"java.checkstyle.configuration": "${workspaceFolder}/buildconf/checkstyle.xml",
"java.project.sourcePaths": [
"lib",
"code/src",
"buildconf/ivy/repository/suse",
"build/java-branding",
"build/classes",
"build/webapp"
],
"java.checkstyle.properties": {
"checkstyle.cache.file": "${workspaceFolder}/build/checkstyle.cache.src",
"checkstyle.header.file": "${workspaceFolder}/buildconf/LICENSE.txt",
"checkstyle.suppressions.file": "${workspaceFolder}/buildconf/checkstyle-suppressions.xml",
"javadoc.lazy": "false",
"javadoc.method.scope": "public",
"javadoc.type.scope": "package",
"javadoc.var.scope": "package",
},
}
85 changes: 20 additions & 65 deletions java/buildconf/build-props.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<project name="build-props">
<property name="rhn-home" location="." />

<property file="${user.home}/.rhn.properties" />
<property name="src.dir" location="${rhn-home}/code" />
<property name="java.lib.dir" value="/usr/share/java"/>
<property name="build.dir" location="${rhn-home}/build" />
<property name="lib.dir" location="${rhn-home}/lib" />
<property name="build.lib.dir" location="${build.dir}/build-lib" />
Expand Down Expand Up @@ -39,20 +39,12 @@
<!-- =================== jar dependencies ======================= -->
<property name="commons-lang" value="commons-lang3"/>

<condition property="byte-buddy" value="byte-buddy/byte-buddy.jar" else="byte-buddy.jar">
<available file="${java.lib.dir}/byte-buddy/byte-buddy.jar"/>
</condition>
<available file="${java.lib.dir}/byte-buddy/byte-buddy.jar" property="byte-buddy" value="byte-buddy/byte-buddy.jar"/>

<condition property="byte-buddy-dep" value="byte-buddy/byte-buddy-dep.jar" else="byte-buddy-dep.jar">
<available file="${java.lib.dir}/byte-buddy/byte-buddy-dep.jar"/>
</condition>
<available file="${java.lib.dir}/byte-buddy/byte-buddy-dep.jar" property="byte-buddy-dep" value="byte-buddy/byte-buddy-dep.jar"/>

<available file="${java.lib.dir}/hibernate/hibernate-commons-annotations.jar" type="file"
property="hibernate-commons-annotations" value="hibernate/hibernate-commons-annotations"/>
<available file="${java.lib.dir}/hibernate-commons-annotations/hibernate-commons-annotations.jar" type="file"
property="hibernate-commons-annotations" value="hibernate-commons-annotations/hibernate-commons-annotations"/>
<available file="${java.lib.dir}/hibernate-commons-annotations.jar" type="file"
property="hibernate-commons-annotations" value="hibernate-commons-annotations" />

<condition property="commons-validator" value="apache-commons-validator" else="commons-validator">
<available file="${java.lib.dir}/apache-commons-validator.jar" />
Expand All @@ -67,59 +59,23 @@
<available file="${java.lib.dir}/log4j/log4j-jcl.jar" type="file" property="log4j-jcl" value="log4j/log4j-jcl" />
<property name="log4j-jars" value="${log4j-core} ${log4j-api} ${log4j-jcl}"/>

<condition property="jta11-jars" value="geronimo-jta-1.1-api" else="jta">
<available file="${java.lib.dir}/geronimo-jta-1.1-api.jar" />
</condition>

<condition property="javamail" value="javax.mail" else="javamail">
<available file="${java.lib.dir}/javax.mail.jar" />
</condition>

<condition property="commons-jexl" value="apache-commons-jexl/commons-jexl" else="commons-jexl">
<available file="${java.lib.dir}/apache-commons-jexl/commons-jexl.jar"/>
</condition>

<available file="${java.lib.dir}/ehcache.jar" type="file" property="ehcache" value="ehcache" />
<available file="${java.lib.dir}/ehcache-core.jar" type="file" property="ehcache" value="ehcache-core" />
<available file="${java.lib.dir}/apache-commons-jexl/commons-jexl.jar" type="file" property="commons-jexl" value="apache-commons-jexl/commons-jexl" />

<condition property="jaf" value="glassfish-activation" else="jaf">
<available file="${java.lib.dir}/glassfish-activation.jar"/>
</condition>
<condition property="jaf" value="jakarta-activation">
<available file="${java.lib.dir}/jakarta-activation/jakarta.activation.jar"/>
</condition>
<condition property="jaf" value="jakarta-activation/jakarta-activation-api">
<available file="${java.lib.dir}/jakarta-activation/jakarta.activation-api.jar"/>
</condition>
<available file="${java.lib.dir}/jcache.jar" type="file" property="jcache" value="jcache.jar" />

<available file="${java.lib.dir}/jaxb/jaxb-runtime.jar" type="file" property="jaxb-runtime" value="jaxb/jaxb-runtime.jar" />

<!-- com.sun.xml.bind replacement (jaxb) -->
<condition property="jaxb-api" value="jaxb-api" else="">
<available file="${java.lib.dir}/jaxb-api.jar" />
</condition>
<condition property="glassfish-jaxb-api" value="glassfish-jaxb-api" else="">
<available file="${java.lib.dir}/glassfish-jaxb-api.jar" />
</condition>
<condition property="jaxb-impl" value="glassfish-jaxb/jaxb-impl" else="">
<available file="${java.lib.dir}/glassfish-jaxb/jaxb-impl.jar" />
</condition>
<condition property="jaxb-runtime" value="glassfish-jaxb/jaxb-runtime" else="">
<available file="${java.lib.dir}/glassfish-jaxb/jaxb-runtime.jar" />
</condition>
<condition property="txw2" value="glassfish-jaxb/txw2" else="">
<available file="${java.lib.dir}/glassfish-jaxb/txw2.jar" />
</condition>
<condition property="istack-commons" value="istack-commons-runtime" else="">
<available file="${java.lib.dir}/istack-commons-runtime.jar" />
</condition>
<property name="jaxb" value="${jaxb-api} ${glassfish-jaxb-api} ${jaxb-impl} ${jaxb-runtime} ${txw2} ${istack-commons}"/>
<available file="${java.lib.dir}/jakarta-persistence-api.jar" type="file" property="jpa-api" value="jakarta-persistence-api.jar" />

<available file="${java.lib.dir}/hibernate6/hibernate-core.jar" type="file" property="hibernate6files" value="hibernate6/hibernate-core hibernate6/hibernate-c3p0 hibernate6/hibernate-jcache" />

<condition property="hibernate5files" value="hibernate5/hibernate-core hibernate5/hibernate-c3p0 hibernate5/hibernate-ehcache" else="hibernate-ehcache-5 hibernate-c3p0-5 hibernate-core-5">
<available file="${java.lib.dir}/hibernate5/hibernate-core.jar" type="file"/>
</condition>
<available file="${java.lib.dir}/objectweb-asm/asm.jar" type="file" property="asm" value="objectweb-asm/asm" />

<property name="hibernate5deps" value="${hibernate5files} ${hibernate-commons-annotations} slf4j/api jpa-api/jakarta.persistence-api ${byte-buddy} ${byte-buddy-dep} jboss-logging javassist log4j/log4j-slf4j-impl ${ehcache} classmate/classmate statistics hibernate-types/hibernate-types-52 jackson-databind jackson-core jackson-annotations"/>
<property name="hibernate6deps" value="${hibernate6files} ${hibernate-commons-annotations} ${asm} slf4j/api ${jcache} ${jpa-api} ${jaxb-runtime} ${byte-buddy} ${byte-buddy-dep} jboss-logging javassist log4j/log4j-slf4j-impl classmate/classmate statistics hypersistence-utils/hypersistence-utils-hibernate-63 jackson-databind jackson-core jackson-annotations"/>

<property name="c3p0" value="c3p0"/>
<available file="${java.lib.dir}/mchange-commons/mchange-commons-java.jar" type="file" property="c3p0" value="${c3p0} mchange-commons/mchange-commons-java"/>
Expand All @@ -142,7 +98,7 @@
<property name="common.jar.dependencies"
value="bcel ${cglib-jar} commons-beanutils commons-cli commons-codec
commons-collections commons-digester commons-discovery
commons-el commons-fileupload commons-io ${commons-lang} commons-logging ${commons-validator} ${hibernate5deps}
commons-el commons-fileupload commons-io ${commons-lang} commons-logging ${commons-validator} ${hibernate6deps}
${commons-compress} ${javamail} smtp jdom ${jmock-jars}
${log4j-jars} oro redstone-xmlrpc-client redstone-xmlrpc ${struts-jars} ${tomcat-jars}
bcprov bcpg stringtree-json postgresql-jdbc ongres-scram/client ongres-scram/common
Expand All @@ -154,7 +110,7 @@
<property name="test.build.jar.dependencies" value="junit ${log4j-jars} regexp ${jmock-jars} postgresql-jdbc" />

<property name="test.jar.dependencies"
value="antlr checkstyle dom4j emma emma_ant jdom ${jta11-jars} junit
value="antlr checkstyle dom4j emma emma_ant jdom junit
${log4j-jars}
regexp ${jmock-jars}
postgresql-jdbc" />
Expand All @@ -169,18 +125,18 @@
concurrent xalan-j2" />

<property name="run.jar.dependencies"
value="antlr objectweb-asm/asm ${cglib-jar} ${c3p0} commons-discovery dom4j ${jaf} ${jta11-jars} ojdbc14 sitemesh
value="antlr ${asm} ${cglib-jar} ${c3p0} commons-discovery dom4j ojdbc14 sitemesh
taglibs-standard-impl taglibs-standard-jstlel taglibs-standard-spec
xalan-j2 xalan-j2-serializer xerces-j2 ${common.jar.dependencies}" />

<!-- =================== RPM build, use jpackage syntax ======================= -->
<!-- property name="install.test.jar.dependencies"
value="antlr checkstyle dom4j emma emma_ant jdom ${jta11-jars} junit
value="antlr checkstyle dom4j emma emma_ant jdom junit
${log4j-jars} mockobjects mockobjects-core mockobjects-jdk1.4-j2ee1.3
regexp ${jmock-jars} strutstest" / -->

<!-- SUSE extra dependencies: build and runtime -->
<property name="suse-common-jars" value="jade4j jose4j salt-netapi-client spark-core spark-template-jade httpasyncclient simpleclient simpleclient_common simpleclient_hibernate simpleclient_servlet simpleclient_httpserver pgjdbc-ng/pgjdbc-ng pgjdbc-ng/spy netty/netty-common netty/netty-buffer netty/netty-resolver netty/netty-transport netty/netty-codec netty/netty-handler netty/netty-transport-native-unix-common java-saml java-saml-core joda-time woodstox-core-asl xmlsec stax2-api stax-api ${commons-jexl} ical4j ${product-common-jars} ${jaxb}" />
<property name="suse-common-jars" value="jade4j jose4j salt-netapi-client spark-core spark-template-jade httpasyncclient simpleclient simpleclient_common simpleclient_hibernate simpleclient_servlet simpleclient_httpserver pgjdbc-ng/pgjdbc-ng pgjdbc-ng/spy netty/netty-common netty/netty-buffer netty/netty-resolver netty/netty-transport netty/netty-codec netty/netty-handler netty/netty-transport-native-unix-common java-saml java-saml-core joda-time woodstox-core-asl xmlsec stax2-api stax-api ${commons-jexl} ical4j ${product-common-jars}" />

<!-- SUSE extra dependencies: runtime only -->
<property name="suse-runtime-jars" value="${commons-lang} concurrentlinkedhashmap-lru
Expand All @@ -191,14 +147,14 @@
${install.common.jar.dependencies} xalan-j2" />

<property name="install.run.jar.dependencies"
value="antlr objectweb-asm/asm ${cglib-jar} ${c3p0} commons-discovery dom4j ${jaf} ${jta11-jars} sitemesh
value="antlr ${asm} ${cglib-jar} ${c3p0} commons-discovery dom4j sitemesh
taglibs-standard-impl taglibs-standard-jstlel taglibs-standard-spec
xalan-j2 xalan-j2-serializer xerces-j2 ${install.common.jar.dependencies}" />

<property name="install.common.jar.dependencies"
value="bcel ${cglib-jar} commons-beanutils commons-cli commons-codec
commons-collections commons-digester commons-discovery
commons-el commons-fileupload commons-io ${commons-lang} commons-logging ${commons-validator} ${hibernate5deps}
commons-el commons-fileupload commons-io ${commons-lang} commons-logging ${commons-validator} ${hibernate6deps}
${commons-compress} ${tomcat-jars} ${javamail} jdom jsch
${log4j-jars} oro redstone-xmlrpc-client redstone-xmlrpc ${struts-jars}
stringtree-json postgresql-jdbc ongres-scram/client ongres-scram/common
Expand All @@ -207,18 +163,17 @@
concurrent simple-core snakeyaml simple-xml ${commons-jexl}" />

<property name="dist.jar.dependencies"
value="antlr objectweb-asm/asm bcel ${c3p0} ${cglib-jar}
value="antlr ${asm} bcel ${c3p0} ${cglib-jar}
commons-collections commons-beanutils commons-cli commons-codec
commons-digester commons-discovery commons-el commons-fileupload commons-io
${commons-lang} commons-logging ${commons-compress}
${commons-validator} concurrent dom4j ${hibernate5deps} ${jta11-jars}
${jaf} ${jasper-jars} ${javamail} ${jaxb} jdom ${other-jars}
${commons-validator} concurrent dom4j ${hibernate6deps} ${jasper-jars} ${javamail} ${jaxb} jdom ${other-jars}
${tomcat-jars} ${log4j-jars} redstone-xmlrpc-client redstone-xmlrpc
oro quartz stringtree-json sitemesh ${struts-jars}
taglibs-standard-impl taglibs-standard-jstlel taglibs-standard-spec
postgresql-jdbc ongres-scram/client ongres-scram/common ${stringprep-jars}
snakeyaml simple-xml ${suse-common-jars} ${suse-runtime-jars}
xalan-j2 xalan-j2-serializer xerces-j2 simple-core ${ehcache}" />
xalan-j2 xalan-j2-serializer xerces-j2 simple-core" />

<property name="taskomatic.jar.dependencies"
value="${dist.jar.dependencies} jsch" />
Expand Down
2 changes: 1 addition & 1 deletion java/buildconf/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<module name="TreeWalker">

<module name="ImportOrder">
<property name="groups" value="/^com.redhat.rhn\./,/^com.suse\./,com,org,/^java\./,javax,*" />
<property name="groups" value="/^com.redhat.rhn\./,/^com.suse\./,com,org,/^java\./,jakarta,javax,*" />
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
<property name="option" value="top"/>
Expand Down
37 changes: 19 additions & 18 deletions java/buildconf/ivy/ivy-suse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<dependencies>
<!-- Runtime dependencies -->
<dependency org="suse" name="antlr" rev="2.7.7" />
<dependency org="suse" name="asm" rev="9.3" />
<dependency org="suse" name="asm" rev="9.7.1" />
<dependency org="suse" name="bcel" rev="5.2" />
<dependency org="suse" name="byte-buddy" rev="1.14.16" />
<dependency org="suse" name="byte-buddy-dep" rev="1.14.16" />
<dependency org="suse" name="byte-buddy" rev="1.14.15" />
<dependency org="suse" name="byte-buddy-dep" rev="1.14.15" />
<dependency org="suse" name="c3p0" rev="0.9.5.5" />
<dependency org="suse" name="cglib" rev="3.3.0" />
<dependency org="suse" name="classmate" rev="1.5.1" />
Expand All @@ -32,14 +32,15 @@
<dependency org="suse" name="concurrent" rev="1.3.4" />
<dependency org="suse" name="concurrentlinkedhashmap-lru" rev="1.3.2" />
<dependency org="suse" name="dom4j" rev="2.1.4" />
<dependency org="suse" name="ehcache-core" rev="2.10.1" />
<dependency org="suse" name="geronimo-jta-1.1-api" rev="1.2" />
<dependency org="suse" name="antlr4" rev="4.13.0" />
<dependency org="suse" name="jcache" rev="1.1.0" />
<dependency org="suse" name="jakarta.transaction-api" rev="2.0.1" />
<dependency org="suse" name="google-gson" rev="2.8.9" />
<dependency org="suse" name="hibernate-c3p0" rev="5.3.25" />
<dependency org="suse" name="hibernate-commons-annotations" rev="5.0.4" />
<dependency org="suse" name="hibernate-core" rev="5.3.25" />
<dependency org="suse" name="hibernate-ehcache" rev="5.3.25" />
<dependency org="suse" name="hibernate-types-52" rev="2.16.2" />
<dependency org="suse" name="hibernate-c3p0" rev="6.5.2.Final" />
<dependency org="suse" name="hibernate-commons-annotations" rev="6.0.6" />
<dependency org="suse" name="hibernate-core" rev="6.5.2.Final" />
<dependency org="suse" name="hibernate-jcache" rev="6.5.2.Final" />
<dependency org="suse" name="hypersistence-utils-hibernate-63" rev="3.8.2" />
<dependency org="suse" name="httpasyncclient" rev="4.1.4" />
<dependency org="suse" name="httpclient" rev="4.5.12" />
<dependency org="suse" name="httpcore" rev="4.4.13" />
Expand All @@ -49,7 +50,7 @@
<dependency org="suse" name="jackson-core" rev="2.15.2" />
<dependency org="suse" name="jackson-databind" rev="2.15.2" />
<dependency org="suse" name="jade4j" rev="1.2.7" />
<dependency org="suse" name="jakarta-persistence-api" rev="2.2.2" />
<dependency org="suse" name="jakarta-persistence-api" rev="3.1.0" />
<dependency org="suse" name="java-saml" rev="2.4.0" />
<dependency org="suse" name="java-saml-core" rev="2.4.0" />
<dependency org="suse" name="javassist" rev="3.29.2" />
Expand Down Expand Up @@ -102,13 +103,13 @@
<dependency org="suse" name="xalan-j2-serializer" rev="2.7.2" />
<dependency org="suse" name="xerces-j2" rev="2.12.2" />
<dependency org="suse" name="xmlsec" rev="2.0.7" />
<dependency org="suse" name="glassfish-jaxb-api" rev="2.4.0" />
<dependency org="suse" name="glassfish-activation" rev="1.2.0" />
<dependency org="suse" name="jaxb-runtime" rev="2.3.1" />
<dependency org="suse" name="jaxb-impl" rev="2.3.1" />
<dependency org="suse" name="txw2" rev="2.3.1" />
<dependency org="suse" name="istack-commons-runtime" rev="3.0.7" />
<dependency org="suse" name="stax-ex" rev="1.8" />
<dependency org="suse" name="jaxb-api" rev="4.0.2" />
<dependency org="suse" name="jaxb-core" rev="4.0.5" />
<dependency org="suse" name="jaxb-runtime" rev="4.0.5" />
<dependency org="suse" name="jaxb-txw2" rev="4.0.5" />
<dependency org="suse" name="istack-commons-runtime" rev="4.2.0" />
<dependency org="suse" name="stax-ex" rev="2.1.0" />
<dependency org="suse" name="jakarta-activation" rev="2.1.3" />

<!-- Tomcat jars -->
<dependency org="suse" name="jasper" rev="[9.0.75,10.0.0[" />
Expand Down
Loading
Loading