yurem/jans-auth-server-test

Error after modifying oxauth.xml on runtime

Opened this issue · 0 comments

yurem commented

Describe the issue

After oxAuth is running, modifying /opt/gluu/jetty/oxauth/webapps/oxauth.xml file resulting in errors and crashing the application.

Steps To Reproduce

  1. Modify /opt/gluu/jetty/oxauth/webapps/oxauth.xml; or ...
  2. Run touch /opt/gluu/jetty/oxauth/webapps/oxauth.xml

Expected behavior

oxAuth is reloaded and no errors are thrown.

Actual behavior

oxAuth is crashed after throwing the errors (see logs below):

java.lang.RuntimeException: java.lang.ClassCastException: class org.bouncycastle.jce.provider.BouncyCastleProvider cannot be cast to class org.bouncyc
astle.jce.provider.BouncyCastleProvider (org.bouncycastle.jce.provider.BouncyCastleProvider is in unnamed module of loader org.eclipse.jetty.webapp.We
bAppClassLoader @4b8d604b; org.bouncycastle.jce.provider.BouncyCastleProvider is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoade
r @33a98e45)
        at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:69)            [94/1997]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:341)
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:513)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:154)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:190)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileChanged(WebAppProvider.java:406)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:72)
        at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:826)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:756)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:641)
        at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:558)
        at java.base/java.util.TimerThread.mainLoop(Unknown Source)
        at java.base/java.util.TimerThread.run(Unknown Source)
Caused by: 
java.lang.ClassCastException: class org.bouncycastle.jce.provider.BouncyCastleProvider cannot be cast to class org.bouncycastle.jce.provider.BouncyCas
tleProvider (org.bouncycastle.jce.provider.BouncyCastleProvider is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @4b8d604b; o
rg.bouncycastle.jce.provider.BouncyCastleProvider is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @33a98e45)
        at org.gluu.oxauth.model.util.SecurityProviderUtility.installBCProvider(SecurityProviderUtility.java:21)
        at org.gluu.oxauth.model.util.SecurityProviderUtility.installBCProvider(SecurityProviderUtility.java:37)
        at org.gluu.oxauth.service.AppInitializer.createApplicationComponents(AppInitializer.java:170)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:76)
        at org.jboss.weld.interceptor.proxy.WeldInvocationContextImpl.invokeNext(WeldInvocationContextImpl.java:94)
        at org.jboss.weld.interceptor.proxy.WeldInvocationContextImpl.proceed(WeldInvocationContextImpl.java:124)
        at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeLifecycleInterception(InterceptorMethodHandler.java:78)
        at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:74)
        at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:48)
        at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:8
4)
        at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:6
1)
        at org.gluu.oxauth.service.AppInitializer$Proxy$_$$_WeldSubclass.lifecycle_mixin_$$_postConstruct(Unknown Source)
        at org.jboss.weld.interceptor.util.InterceptionUtils.executePostConstruct(InterceptionUtils.java:44)
        at org.jboss.weld.interceptor.util.InterceptionUtils.executePostConstruct(InterceptionUtils.java:56)
        at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:64)
        at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:122)
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:174)
        at org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
        at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:67)
       at org.jboss.weld.event.ObserverMethodImpl.getReceiver(ObserverMethodImpl.java:360)                                                  [41/1997]
        at org.jboss.weld.event.ObserverMethodImpl.getReceiverIfExists(ObserverMethodImpl.java:347)
        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:305)
        at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
        at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)
        at org.jboss.weld.util.Observers.notify(Observers.java:166)
        at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)
        at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)
        at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)
        at org.jboss.weld.bootstrap.BeanDeploymentModule.fireEvent(BeanDeploymentModule.java:93)
        at org.jboss.weld.module.web.servlet.HttpContextLifecycle.fireEventForApplicationScope(HttpContextLifecycle.java:161)
        at org.jboss.weld.module.web.servlet.HttpContextLifecycle.contextInitialized(HttpContextLifecycle.java:147)
        at org.jboss.weld.module.web.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:99)
        at org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
        at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:66)
        at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:145)
        at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:64)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:341)
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:513)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:154)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:190)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileChanged(WebAppProvider.java:406)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:72)
        at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:826)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:756)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:641)
        at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:558)
        at java.base/java.util.TimerThread.mainLoop(Unknown Source)
        at java.base/java.util.TimerThread.run(Unknown Source)

Desktop (please complete the following information):

  • Gluu Server 4.2.0-SNAPSHOT; previous v4.x also affected.