It looks like we require the property to be set but allow it to be blank (which is a bit confusing). I'm actually surprised that the application starts up with that exception.
On Thu, Feb 11, 2016 at 2:37 PM, Jonathan Labin <[email protected]> wrote: > I am attempting to make my web application deployable to multiple > environments and so scrubbing the configuration of fixed URLS (or at least > converting them to be set programatically). > the README for the https://github.com/Jasig/java-cas-client identifies a > argument to > https://github.com/Jasig/java-cas-client/blob/master/cas-client-core/src/main/java/org/jasig/cas/client/session/SingleSignOutFilter.java > called casServerUrlPrefix that is marked required. > > In my eagerness to strip fixed values from the configuration I removed > this argument and received the following exception: > > 2016-02-11T19:17:37.583+0000|Severe: > WebModule[/cas-sample-java-webapp]Exception starting filter CAS Single Sign > Out Filter > java.lang.InstantiationException > at > org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:135) > at > org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:5329) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:5943) > at com.sun.enterprise.web.WebModule.start(WebModule.java:691) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041) > at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024) > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747) > at > com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286) > at > com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932) > at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139) > at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122) > at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291) > at > org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352) > at > com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500) > at > com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) > at > org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:360) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:360) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846) > at > com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722) > at > org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253) > at > org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231) > at > org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275) > at > org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133) > 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:483) > at > org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) > at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151) > at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171) > at > org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152) > at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) > at > org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387) > at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) > at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103) > at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271) > at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) > at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) > at org.glassfish.jersey.internal.Errors.process(Errors.java:315) > at org.glassfish.jersey.internal.Errors.process(Errors.java:297) > at org.glassfish.jersey.internal.Errors.process(Errors.java:267) > at > org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) > at > org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) > at > org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028) > at > org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365) > at > org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316) > at > org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179) > 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:201) > at > org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) > 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:284) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) > at > org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) > at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) > at > org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) > at > org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) > at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) > at > org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) > at > org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) > at > org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) > 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:565) > at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.IllegalArgumentException: casServerUrlPrefix cannot > be null. > at org.jasig.cas.client.util.CommonUtils.assertNotNull(CommonUtils.java:86) > at > org.jasig.cas.client.session.SingleSignOutHandler.init(SingleSignOutHandler.java:140) > at > org.jasig.cas.client.session.SingleSignOutFilter.init(SingleSignOutFilter.java:55) > at > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) > at > org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:131) > ... 90 more > > > However, the application seems to continue to deploy and function as > expected. > > It appears this field is primarily used in > https://github.com/Jasig/java-cas-client/blob/master/cas-client-core/src/main/java/org/jasig/cas/client/session/SingleSignOutHandler.java > <https://github.com/Jasig/java-cas-client/blob/master/cas-client-core/src/main/java/org/jasig/cas/client/session/SingleSignOutHandler.java>for > supporting front-channel single log out. Since front-channel was > documented as experimental I have not relied on it (back-channel seems to > meet my needs as far as I can tell). > > I am tempted to ignore this exception rather than construct some > parameterization mechanism for web.xml (this is currently the only such > field in this file). However, since back-channel SLO has a tendency to > fail silently, wanted to confirm that I am safe in excluding this argument > from my web.xml file despite the exception. > > Is some yet unnoticed component failing to be configured due to the > exception above halting initialization? Will this argument potentially > become critical in the future for back-channel SLO? > > -- > You received this message because you are subscribed to the Google Groups > "CAS Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/ > . > -- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
