OpenEngSB
  1. OpenEngSB
  2. OPENENGSB-3031

ui-admin does not unregister wicket-application when stopped

    Details

      Description

      Reproduce:

      • start openengsb
      • restart only ui-admin-bundle
      • get exception when accessing the web-interface

        Caused by: java.lang.IllegalStateException: Application with name 'openengsb' already exists.'

        Gliffy Diagrams

        1. full-trace.txt
          11 kB
          Christoph Gritschenberger
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          Christoph Gritschenberger added a comment -

          I'm pretty sure this is related to the requestCycle-null-issue as it causes the bundle to shutdown incompletely.

          This Exception is thrown once for every mounted page.

          ERROR: Bundle org.ops4j.pax.wicket.service [202] EventDispatcher: Error during dispatch. (java.lang.IllegalArgumentException: Argument 'requestCycle' may not be null.)
          java.lang.IllegalArgumentException: Argument 'requestCycle' may not be null.
          	at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
          	at org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1524)
          	at org.openengsb.ui.admin.WicketApplication$$EnhancerByCGLIB$$116d0750.CGLIB$fetchCreateAndSetSession$32(<generated>)
          	at org.openengsb.ui.admin.WicketApplication$$EnhancerByCGLIB$$116d0750$$FastClassByCGLIB$$99c19893.invoke(<generated>)
          	at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)
          	at org.ops4j.pax.wicket.internal.PaxWicketApplicationFactory$WebApplicationWrapper.intercept(PaxWicketApplicationFactory.java:130)
          	at org.openengsb.ui.admin.WicketApplication$$EnhancerByCGLIB$$116d0750.fetchCreateAndSetSession(<generated>)
          	at org.apache.wicket.Session.get(Session.java:156)
          	at org.apache.wicket.RestartResponseAtInterceptPageException$InterceptData.get(RestartResponseAtInterceptPageException.java:146)
          	at org.apache.wicket.RestartResponseAtInterceptPageException$1.matchedData(RestartResponseAtInterceptPageException.java:210)
          	at org.apache.wicket.RestartResponseAtInterceptPageException$1.mapRequest(RestartResponseAtInterceptPageException.java:190)
          	at org.apache.wicket.request.mapper.CompoundRequestMapper.unmount(CompoundRequestMapper.java:195)
          	at org.apache.wicket.protocol.http.WebApplication.unmount(WebApplication.java:377)
          	at org.ops4j.pax.wicket.internal.PageMounterTracker.removedService(PageMounterTracker.java:100)
          	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1006)
          	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:906)
          	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:352)
          	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:949)
          	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)
          	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
          	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
          	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4260)
          	at org.apache.felix.framework.Felix.access$000(Felix.java:74)
          	at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390)
          	at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:148)
          	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:127)
          	at org.ops4j.pax.wicket.util.DefaultPageMounter.dispose(DefaultPageMounter.java:81)
          	at org.ops4j.pax.wicket.internal.injection.BundleScanningMountPointProviderDecorator.stop(BundleScanningMountPointProviderDecorator.java:82)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:601)
          	at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:238)
          	at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:954)
          	at org.apache.aries.blueprint.container.BeanRecipe.destroy(BeanRecipe.java:859)
          	at org.apache.aries.blueprint.container.BlueprintRepository.destroy(BlueprintRepository.java:320)
          	at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroyComponents(BlueprintContainerImpl.java:689)
          	at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:840)
          	at org.apache.aries.blueprint.container.BlueprintExtender.destroyContext(BlueprintExtender.java:246)
          	at org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:238)
          	at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:434)
          	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:198)
          	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:128)
          	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:468)
          	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:161)
          	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:117)
          	at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1099)
          	at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)
          	at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)
          	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)
          	at org.apache.felix.framework.Felix.stopBundle(Felix.java:2351)
          	at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:980)
          	at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:967)
          	at org.apache.karaf.bundle.command.Stop.executeOnBundle(Stop.java:31)
          	at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:53)
          	at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:50)
          	at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:41)
          	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
          	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
          	at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:601)
          	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
          	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
          	at org.apache.karaf.shell.console.commands.$BlueprintCommand1593104763.execute(Unknown Source)
          	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
          	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
          	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
          	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
          	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
          	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
          	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
          	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:169)
          	at java.lang.Thread.run(Thread.java:722)
          	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:87)
          	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:78)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at javax.security.auth.Subject.doAs(Subject.java:356)
          	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:76)
           

          Show
          Christoph Gritschenberger added a comment - I'm pretty sure this is related to the requestCycle-null-issue as it causes the bundle to shutdown incompletely. This Exception is thrown once for every mounted page. ERROR: Bundle org.ops4j.pax.wicket.service [202] EventDispatcher: Error during dispatch. (java.lang.IllegalArgumentException: Argument 'requestCycle' may not be null.) java.lang.IllegalArgumentException: Argument 'requestCycle' may not be null. at org.apache.wicket.util.lang.Args.notNull(Args.java:41) at org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1524) at org.openengsb.ui.admin.WicketApplication$$EnhancerByCGLIB$$116d0750.CGLIB$fetchCreateAndSetSession$32(<generated>) at org.openengsb.ui.admin.WicketApplication$$EnhancerByCGLIB$$116d0750$$FastClassByCGLIB$$99c19893.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167) at org.ops4j.pax.wicket.internal.PaxWicketApplicationFactory$WebApplicationWrapper.intercept(PaxWicketApplicationFactory.java:130) at org.openengsb.ui.admin.WicketApplication$$EnhancerByCGLIB$$116d0750.fetchCreateAndSetSession(<generated>) at org.apache.wicket.Session.get(Session.java:156) at org.apache.wicket.RestartResponseAtInterceptPageException$InterceptData.get(RestartResponseAtInterceptPageException.java:146) at org.apache.wicket.RestartResponseAtInterceptPageException$1.matchedData(RestartResponseAtInterceptPageException.java:210) at org.apache.wicket.RestartResponseAtInterceptPageException$1.mapRequest(RestartResponseAtInterceptPageException.java:190) at org.apache.wicket.request.mapper.CompoundRequestMapper.unmount(CompoundRequestMapper.java:195) at org.apache.wicket.protocol.http.WebApplication.unmount(WebApplication.java:377) at org.ops4j.pax.wicket.internal.PageMounterTracker.removedService(PageMounterTracker.java:100) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1006) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:906) at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:352) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:949) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4260) at org.apache.felix.framework.Felix.access$000(Felix.java:74) at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390) at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:148) at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:127) at org.ops4j.pax.wicket.util.DefaultPageMounter.dispose(DefaultPageMounter.java:81) at org.ops4j.pax.wicket.internal.injection.BundleScanningMountPointProviderDecorator.stop(BundleScanningMountPointProviderDecorator.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:238) at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:954) at org.apache.aries.blueprint.container.BeanRecipe.destroy(BeanRecipe.java:859) at org.apache.aries.blueprint.container.BlueprintRepository.destroy(BlueprintRepository.java:320) at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroyComponents(BlueprintContainerImpl.java:689) at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:840) at org.apache.aries.blueprint.container.BlueprintExtender.destroyContext(BlueprintExtender.java:246) at org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:238) at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:434) at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:198) at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:128) at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:468) at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:161) at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:117) at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1099) at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695) at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244) at org.apache.felix.framework.Felix.stopBundle(Felix.java:2351) at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:980) at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:967) at org.apache.karaf.bundle.command.Stop.executeOnBundle(Stop.java:31) at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:53) at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:50) at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:41) at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33) at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39) at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54) at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119) at org.apache.karaf.shell.console.commands.$BlueprintCommand1593104763.execute(Unknown Source) at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78) at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403) at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89) at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:169) at java.lang.Thread.run(Thread.java:722) at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:87) at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:78) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:76)  
          Hide
          Christoph Gritschenberger added a comment -

          The issue is in a change introduced in wicket-1.5.6. I think the responsible changeset is this:

          diff --git a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
          index 75c04c2..89be577 100644
          --- a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
          +++ b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
          @@ -143,14 +143,7 @@ public class RestartResponseAtInterceptPageException extends ResetResponseExcept
           
           		public static InterceptData get()
           		{
          -			if (Session.exists())
          -			{
          -				return Session.get().getMetaData(key);
          -			}
          -			else
          -			{
          -				return null;
          -			}
          +			return Session.get().getMetaData(key);
           		}
           
           		public static void clear()

          I think this issue concerns pax-wicket itself. I'll raise an issue there once I'm sure.

          Show
          Christoph Gritschenberger added a comment - The issue is in a change introduced in wicket-1.5.6. I think the responsible changeset is this: diff --git a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java index 75c04c2..89be577 100644 --- a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java +++ b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java @@ -143,14 +143,7 @@ public class RestartResponseAtInterceptPageException extends ResetResponseExcept public static InterceptData get() { - if (Session.exists()) - { - return Session.get().getMetaData(key); - } - else - { - return null; - } + return Session.get().getMetaData(key); } public static void clear() I think this issue concerns pax-wicket itself. I'll raise an issue there once I'm sure.
          Hide
          Christoph Gritschenberger added a comment -

          fix committed to pax-wicket

          Show
          Christoph Gritschenberger added a comment - fix committed to pax-wicket
          Hide
          Christoph Gritschenberger added a comment -

          fixed in pax-wicket 1.0.1-SNAPSHOT

          Show
          Christoph Gritschenberger added a comment - fixed in pax-wicket 1.0.1-SNAPSHOT

            People

            • Assignee:
              Christoph Gritschenberger
              Reporter:
              Christoph Gritschenberger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: