[ https://issues.apache.org/jira/browse/NETBEANS-5121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
S. M. updated NETBEANS-5121: ---------------------------- Description: The following exactly same code works fine when it is deployed outside Netbeans or with an older Netbeans version. So I feel the following is a Netbeans 12.2 Issue: My JAAS custom security module is disclosed by the following code: {code} static { URL jaasConfigURL = LoginRMB.class.getClassLoader().getResource("my_jaas.config"); System.setProperty("java.security.auth.login.config", jaasConfigURL.toString()); } {code} my_jaas.config looks like: {code} MySecurityContext { com.cortexsoft.jaas.myloginmodul.MyLoginModule required debug=true; }; {code} I deploy to Glassfish 4.1.2. or 5.0.1 When I try to establish the security context by: {code} LoginContext lc = new LoginContext("MySecurityContext", myCallbackHandler); {code} ...the following error occurs: {code} javax.security.auth.login.LoginException: No LoginModules configured for MySecurityContext at javax.security.auth.login.LoginContext.init(LoginContext.java:264) at javax.security.auth.login.LoginContext.<init>(LoginContext.java:417) at com.cortexsoft.mypackage.web.mb.login.JaasLoginHelper.jaasLogin(JaasLoginHelper.java:49) at com.cortexsoft.mypackage.web.mb.login.LoginRMB.login(LoginRMB.java:1131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.el.parser.AstValue.invoke(AstValue.java:289) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304) at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast(UICommand.java:315) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:305) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745) {code} was: The following exactly same code works fine when it is deployed outside Netbeans or with an older Netbeans version. So I feel the following is a Netbeans 12.2 Issue: My JAAS custom security module is disclosed by the following code: {code} static { URL jaasConfigURL = LoginRMB.class.getClassLoader().getResource("my_jaas.config"); System.setProperty("java.security.auth.login.config", jaasConfigURL.toString()); } {code} my_jaas.config looks like: {code} MySecurityContext { com.cortexsoft.jaas.myloginmodul.MyLoginModule required debug=true; }; {code} I deploy to Glassfish 4.1.2. or 5.0.1 When I try to establish the security context by: {code} LoginContext lc = new LoginContext("MySecurityContext", myCallbackHandler); {code} ...the following error occurs: javax.security.auth.login.LoginException: No LoginModules configured for MySecurityContext at javax.security.auth.login.LoginContext.init(LoginContext.java:264) at javax.security.auth.login.LoginContext.<init>(LoginContext.java:417) at com.cortexsoft.mypackage.web.mb.login.JaasLoginHelper.jaasLogin(JaasLoginHelper.java:49) at com.cortexsoft.mypackage.web.mb.login.LoginRMB.login(LoginRMB.java:1131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.el.parser.AstValue.invoke(AstValue.java:289) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304) at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast(UICommand.java:315) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:305) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745) > Netbeans 12.2: Publishing JAAS-Context fails > -------------------------------------------- > > Key: NETBEANS-5121 > URL: https://issues.apache.org/jira/browse/NETBEANS-5121 > Project: NetBeans > Issue Type: Bug > Components: javaee - EJB Project, serverplugins - GlassFish > Affects Versions: 12.2 > Environment: Netbeans 12.2, Glassfish 4.1.2, Glassfish 5.0.1, > Project: jdk1.8.0_65, Netbeans: jdk 15.01 > Reporter: S. M. > Priority: Minor > > The following exactly same code works fine when it is deployed outside > Netbeans or with an older Netbeans version. So I feel the following is a > Netbeans 12.2 Issue: > My JAAS custom security module is disclosed by the following code: > {code} > static > { URL jaasConfigURL = > LoginRMB.class.getClassLoader().getResource("my_jaas.config"); > System.setProperty("java.security.auth.login.config", > jaasConfigURL.toString()); } > {code} > my_jaas.config looks like: > {code} > MySecurityContext > { com.cortexsoft.jaas.myloginmodul.MyLoginModule required debug=true; }; > {code} > I deploy to Glassfish 4.1.2. or 5.0.1 When I try to establish the security > context by: > {code} > LoginContext lc = new LoginContext("MySecurityContext", myCallbackHandler); > {code} > ...the following error occurs: > > {code} > javax.security.auth.login.LoginException: No LoginModules configured for > MySecurityContext > at javax.security.auth.login.LoginContext.init(LoginContext.java:264) > at javax.security.auth.login.LoginContext.<init>(LoginContext.java:417) > at > com.cortexsoft.mypackage.web.mb.login.JaasLoginHelper.jaasLogin(JaasLoginHelper.java:49) > at com.cortexsoft.mypackage.web.mb.login.LoginRMB.login(LoginRMB.java:1131) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at com.sun.el.parser.AstValue.invoke(AstValue.java:289) > at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304) > at > org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) > at > org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) > at > com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) > at > javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) > at > com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) > at javax.faces.component.UICommand.broadcast(UICommand.java:315) > at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) > at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) > at > com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) > at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) > at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658) > at > org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) > at > org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:305) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) > at > org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) > at > org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) > at > com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) > at > com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) > at > org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) > at > org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) > at > org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) > at > org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) > at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) > at > org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) > at > org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) > at > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) > at > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) > at > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) > at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) > at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) > at java.lang.Thread.run(Thread.java:745) > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists