Thanks for the reply, I created https://issues.apache.org/jira/browse/TOMEE-4474


Best regards

Wolfgang


> Gesendet: Freitag, 4. April 2025 um 11:00
> Von: "Vicente Rossello" <cocorosse...@gmail.com>
> An: users@tomee.apache.org
> Betreff: Re: TomEE does not launch on Java 24
>
> <html><head></head><body>Hi,
> 
> Just FYI, I got working with java 24 by removing the policies
> 
> Remove lines 424 to 432 in
> https://github.com/apache/tomee/blob/main/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java#L424
> 
> Also, if you deploy with intellij (which uses a openejb deployer), you will
> need to remove the checkPermission in
> https://github.com/apache/tomee/blob/main/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java#L389
> 
> If you still want to check permissions you can do this dirty hack:
>             if ("openejb/Deployer".equals(ejbName) || type ==
> BUSINESS_LOCALBEAN_HOME || type == LOCALBEAN) {
>                 return true;
>             }
> 
> Finally, you also need to disable
> https://github.com/apache/tomee/blob/main/server/openejb-client/src/main/java/org/apache/openejb/client/JaasIdentityResolver.java#L28
> by returning null.
> 
> These are dirty workarounds, I don't know the implications, but they are ok
> for our use case.
> 
> 
> 
> On Fri, Apr 4, 2025 at 10:48 AM Richard Zowalla <r...@apache.org> wrote:
> 
> &gt; Hi,
> &gt;
> &gt; You can open a Jira at https://issues.apache.org/jira/projects/TOMEE/
> &gt;
> &gt; Currently, there is no issue to track Java 24 support since the part of
> &gt; TomEE using SecurityManager wasn’t reworked yet nor did we test with Java
> &gt; 24 and our 3rd party dependencies.
> &gt;
> &gt; If you have some capacity, feel free to propose a PR to rework that part
> &gt; of TomEE.
> &gt;
> &gt; Gruß
> &gt; Richard
> &gt;
> &gt; &gt; Am 04.04.2025 um 10:28 schrieb Wolfgang Knauf
> &gt; <wolfgang.kn...@gmx.de.invalid>:
> &gt; &gt;
> &gt; &gt; Hi all,
> &gt; &gt;
> &gt; &gt; (sorry if this is a duplicate one, I already sent it a few days 
> 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.0.1 fails to launch with Java 24:
> &gt; &gt;
> &gt; &gt; 01-Apr-2025 13:10:36.888 SCHWERWIEGEND [main]
> &gt; org.apache.openejb.util.OpenEJBErrorHandler.handleUnknownError FATAL 
> ERROR:
> &gt; Unknown error in Assembler. Please send the following stack trace and 
> this
> &gt; message to users@tomee.apache.org :
> &gt; &gt; org.apache.xbean.recipe.ConstructionException: Error invoking
> &gt; constructor: public org.apache.tomee.catalina.TomcatSecurityService()
> &gt; &gt;  at
> &gt; 
> org.apache.xbean.recipe.ReflectionUtil$ConstructorFactory.create(ReflectionUtil.java:981)
> &gt; &gt;  at
> &gt; 
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:279)
> &gt; &gt;  at 
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> &gt; &gt;  at 
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> &gt; &gt;  at 
> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> &gt; &gt;  at
> &gt; 
> org.apache.openejb.assembler.classic.Assembler.createSecurityService(Assembler.java:3553)
> &gt; &gt;  at
> &gt; 
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:579)
> &gt; &gt;  at
> &gt; org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:497)
> &gt; &gt;  at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
> &gt; &gt;  at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
> &gt; &gt;  at
> &gt; org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:244)
> &gt; &gt;  at
> &gt; 
> org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:161)
> &gt; &gt;  at
> &gt; 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109)
> &gt; &gt;  at
> &gt; 
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
> &gt; &gt;  at 
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:123)
> &gt; &gt;  at org.apache.catalina.startup.Catalina.load(Catalina.java:712)
> &gt; &gt;  at org.apache.catalina.startup.Catalina.load(Catalina.java:735)
> &gt; &gt;  at
> &gt; 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
> &gt; &gt;  at java.base/java.lang.reflect.Method.invoke(Method.java:565)
> &gt; &gt;  at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:302)
> &gt; &gt;  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472)
> &gt; &gt; Caused by: java.lang.IllegalStateException: Could not install JACC
> &gt; Policy Provider: org.apache.openejb.core.security.JaccProvider$Policy
> &gt; &gt;  at
> &gt; 
> org.apache.openejb.core.security.AbstractSecurityService.installPolicy(AbstractSecurityService.java:443)
> &gt; &gt;  at
> &gt; 
> org.apache.openejb.core.security.AbstractSecurityService.installJacc(AbstractSecurityService.java:431)
> &gt; &gt;  at
> &gt; 
> org.apache.openejb.core.security.AbstractSecurityService.<init>(AbstractSecurityService.java:94)
> &gt; &gt;  at
> &gt; 
> org.apache.openejb.core.security.AbstractSecurityService.<init>(AbstractSecurityService.java:88)
> &gt; &gt;  at
> &gt; 
> org.apache.tomee.catalina.TomcatSecurityService.<init>(TomcatSecurityService.java:55)
> &gt; &gt;  at
> &gt; 
> java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
> &gt; &gt;  at
> &gt; 
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
> &gt; &gt;  at
> &gt; java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
> &gt; &gt;  at
> &gt; 
> org.apache.xbean.recipe.ReflectionUtil$ConstructorFactory.create(ReflectionUtil.java:971)
> &gt; &gt; ... 20 more
> &gt; &gt; Caused by: java.lang.UnsupportedOperationException: Setting a
> &gt; system-wide Policy object is not supported
> &gt; &gt;  at java.base/java.security.Policy.setPolicy(Policy.java:114)
> &gt; &gt;  at
> &gt; 
> org.apache.openejb.core.security.AbstractSecurityService.installPolicy(AbstractSecurityService.java:441)
> &gt; &gt; ... 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.kn...@gmx.de.invalid></r...@apache.org></body></html>

Reply via email to