Aw: Re: TomEE does not launch on Java 24

Wolfgang Knauf <[email protected]> Fri, 4 Apr 2025 11:24:42 +0200
Newsgroups gmane.comp.java.openejb.user
Message-ID <trinity-035d2bc2-0261-45fe-bdea-19c328ea1ec4-1743758682735@msvc-mesg-gmx021>
Thanks for the reply, I created https://issues=2Eapache=2Eorg/jira/browse/T=
OMEE-4474


Best regards

Wolfgang


> Gesendet: Freitag, 4=2E April 2025 um 11:00
> Von: "Vicente Rossello" <cocorossello@gmail=2Ecom>
> An: users@tomee=2Eapache=2Eorg
> Betreff: Re: TomEE does not launch on Java 24
>
> <html><head></head><body>Hi,
>=20
> Just FYI, I got working with java 24 by removing the policies
>=20
> Remove lines 424 to 432 in
> https://github=2Ecom/apache/tomee/blob/main/container/openejb-core/src/m=
ain/java/org/apache/openejb/core/security/AbstractSecurityService=2Ejava#L4=
24
>=20
> Also, if you deploy with intellij (which uses a openejb deployer), you w=
ill
> need to remove the checkPermission in
> https://github=2Ecom/apache/tomee/blob/main/container/openejb-core/src/m=
ain/java/org/apache/openejb/core/security/AbstractSecurityService=2Ejava#L3=
89
>=20
> If you still want to check permissions you can do this dirty hack:
>             if ("openejb/Deployer"=2Eequals(ejbName) || type =3D=3D
> BUSINESS_LOCALBEAN_HOME || type =3D=3D LOCALBEAN) {
>                 return true;
>             }
>=20
> Finally, you also need to disable
> https://github=2Ecom/apache/tomee/blob/main/server/openejb-client/src/ma=
in/java/org/apache/openejb/client/JaasIdentityResolver=2Ejava#L28
> by returning null=2E
>=20
> These are dirty workarounds, I don't know the implications, but they are=
 ok
> for our use case=2E
>=20
>=20
>=20
> On Fri, Apr 4, 2025 at 10:48=E2=80=AFAM Richard Zowalla <rzo1@apache=2Eo=
rg> wrote:
>=20
> &gt; Hi,
> &gt;
> &gt; You can open a Jira at https://issues=2Eapache=2Eorg/jira/projects/=
TOMEE/
> &gt;
> &gt; Currently, there is no issue to track Java 24 support since the par=
t of
> &gt; TomEE using SecurityManager wasn=E2=80=99t reworked yet nor did we =
test with Java
> &gt; 24 and our 3rd party dependencies=2E
> &gt;
> &gt; If you have some capacity, feel free to propose a PR to rework that=
 part
> &gt; of TomEE=2E
> &gt;
> &gt; Gru=C3=9F
> &gt; Richard
> &gt;
> &gt; &gt; Am 04=2E04=2E2025 um 10:28 schrieb Wolfgang Knauf
> &gt; <wolfgang=2Eknauf@gmx=2Ede=2Einvalid>:
> &gt; &gt;
> &gt; &gt; Hi all,
> &gt; &gt;
> &gt; &gt; (sorry if this is a duplicate one, I already sent it a few day=
s ago, but
> &gt; as it did not appear, I think it might be related to the fact that =
I did
> &gt; not subscribe to the list)
> &gt; &gt;
> &gt; &gt; TomEE 10=2E0=2E1 fails to launch with Java 24:
> &gt; &gt;
> &gt; &gt; 01-Apr-2025 13:10:36=2E888 SCHWERWIEGEND [main]
> &gt; org=2Eapache=2Eopenejb=2Eutil=2EOpenEJBErrorHandler=2EhandleUnknown=
Error FATAL ERROR:
> &gt; Unknown error in Assembler=2E Please send the following stack trace=
 and this
> &gt; message to users@tomee=2Eapache=2Eorg :
> &gt; &gt; org=2Eapache=2Exbean=2Erecipe=2EConstructionException: Error i=
nvoking
> &gt; constructor: public org=2Eapache=2Etomee=2Ecatalina=2ETomcatSecurit=
yService()
> &gt; &gt;  at
> &gt; org=2Eapache=2Exbean=2Erecipe=2EReflectionUtil$ConstructorFactory=
=2Ecreate(ReflectionUtil=2Ejava:981)
> &gt; &gt;  at
> &gt; org=2Eapache=2Exbean=2Erecipe=2EObjectRecipe=2EinternalCreate(Objec=
tRecipe=2Ejava:279)
> &gt; &gt;  at org=2Eapache=2Exbean=2Erecipe=2EAbstractRecipe=2Ecreate(Ab=
stractRecipe=2Ejava:96)
> &gt; &gt;  at org=2Eapache=2Exbean=2Erecipe=2EAbstractRecipe=2Ecreate(Ab=
stractRecipe=2Ejava:61)
> &gt; &gt;  at org=2Eapache=2Exbean=2Erecipe=2EAbstractRecipe=2Ecreate(Ab=
stractRecipe=2Ejava:49)
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Eassembler=2Eclassic=2EAssembler=2EcreateSe=
curityService(Assembler=2Ejava:3553)
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Eassembler=2Eclassic=2EAssembler=2EbuildCon=
tainerSystem(Assembler=2Ejava:579)
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Eassembler=2Eclassic=2EAssembler=2Ebuild(As=
sembler=2Ejava:497)
> &gt; &gt;  at org=2Eapache=2Eopenejb=2EOpenEJB$Instance=2E<init>(OpenEJB=
=2Ejava:150)
> &gt; &gt;  at org=2Eapache=2Eopenejb=2EOpenEJB=2Einit(OpenEJB=2Ejava:307=
)
> &gt; &gt;  at
> &gt; org=2Eapache=2Etomee=2Ecatalina=2ETomcatLoader=2Einitialize(TomcatL=
oader=2Ejava:244)
> &gt; &gt;  at
> &gt; org=2Eapache=2Etomee=2Ecatalina=2EServerListener=2ElifecycleEvent(S=
erverListener=2Ejava:161)
> &gt; &gt;  at
> &gt; org=2Eapache=2Ecatalina=2Eutil=2ELifecycleBase=2EfireLifecycleEvent=
(LifecycleBase=2Ejava:109)
> &gt; &gt;  at
> &gt; org=2Eapache=2Ecatalina=2Eutil=2ELifecycleBase=2EsetStateInternal(L=
ifecycleBase=2Ejava:389)
> &gt; &gt;  at org=2Eapache=2Ecatalina=2Eutil=2ELifecycleBase=2Einit(Life=
cycleBase=2Ejava:123)
> &gt; &gt;  at org=2Eapache=2Ecatalina=2Estartup=2ECatalina=2Eload(Catali=
na=2Ejava:712)
> &gt; &gt;  at org=2Eapache=2Ecatalina=2Estartup=2ECatalina=2Eload(Catali=
na=2Ejava:735)
> &gt; &gt;  at
> &gt; java=2Ebase/jdk=2Einternal=2Ereflect=2EDirectMethodHandleAccessor=
=2Einvoke(DirectMethodHandleAccessor=2Ejava:104)
> &gt; &gt;  at java=2Ebase/java=2Elang=2Ereflect=2EMethod=2Einvoke(Method=
=2Ejava:565)
> &gt; &gt;  at org=2Eapache=2Ecatalina=2Estartup=2EBootstrap=2Eload(Boots=
trap=2Ejava:302)
> &gt; &gt;  at org=2Eapache=2Ecatalina=2Estartup=2EBootstrap=2Emain(Boots=
trap=2Ejava:472)
> &gt; &gt; Caused by: java=2Elang=2EIllegalStateException: Could not inst=
all JACC
> &gt; Policy Provider: org=2Eapache=2Eopenejb=2Ecore=2Esecurity=2EJaccPro=
vider$Policy
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Ecore=2Esecurity=2EAbstractSecurityService=
=2EinstallPolicy(AbstractSecurityService=2Ejava:443)
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Ecore=2Esecurity=2EAbstractSecurityService=
=2EinstallJacc(AbstractSecurityService=2Ejava:431)
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Ecore=2Esecurity=2EAbstractSecurityService=
=2E<init>(AbstractSecurityService=2Ejava:94)
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Ecore=2Esecurity=2EAbstractSecurityService=
=2E<init>(AbstractSecurityService=2Ejava:88)
> &gt; &gt;  at
> &gt; org=2Eapache=2Etomee=2Ecatalina=2ETomcatSecurityService=2E<init>(To=
mcatSecurityService=2Ejava:55)
> &gt; &gt;  at
> &gt; java=2Ebase/jdk=2Einternal=2Ereflect=2EDirectConstructorHandleAcces=
sor=2EnewInstance(DirectConstructorHandleAccessor=2Ejava:62)
> &gt; &gt;  at
> &gt; java=2Ebase/java=2Elang=2Ereflect=2EConstructor=2EnewInstanceWithCa=
ller(Constructor=2Ejava:499)
> &gt; &gt;  at
> &gt; java=2Ebase/java=2Elang=2Ereflect=2EConstructor=2EnewInstance(Const=
ructor=2Ejava:483)
> &gt; &gt;  at
> &gt; org=2Eapache=2Exbean=2Erecipe=2EReflectionUtil$ConstructorFactory=
=2Ecreate(ReflectionUtil=2Ejava:971)
> &gt; &gt; =2E=2E=2E 20 more
> &gt; &gt; Caused by: java=2Elang=2EUnsupportedOperationException: Settin=
g a
> &gt; system-wide Policy object is not supported
> &gt; &gt;  at java=2Ebase/java=2Esecurity=2EPolicy=2EsetPolicy(Policy=2E=
java:114)
> &gt; &gt;  at
> &gt; org=2Eapache=2Eopenejb=2Ecore=2Esecurity=2EAbstractSecurityService=
=2EinstallPolicy(AbstractSecurityService=2Ejava:441)
> &gt; &gt; =2E=2E=2E 28 more
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt; Is there something I should do about this (file a JIRA issue),=
 or is the
> &gt; Java 24 support already on your roadmap?
> &gt; &gt;
> &gt; &gt; Best regards
> &gt; &gt;
> &gt; &gt; Wolfgang
> &gt;
> &gt;</init></init></init></init></wolfgang=2Eknauf@gmx=2Ede=2Einvalid></=
rzo1@apache=2Eorg></body></html>