[MGNLOBS-18] Observation module is 5.0 incompatible Created: 02/Jul/13  Updated: 06/Nov/13  Resolved: 10/Oct/13

Status: Closed
Project: Observation
Component/s: None
Affects Version/s: 1.3.1
Fix Version/s: 2.0

Type: Bug Priority: Major
Reporter: Milan Divilek Assignee: Federico Grilli
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
supersession
is superseded by MGNLOBS-19 Make module 5.0 ready Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: 5.2-beta1

 Description   

1. IllegalArgumentException in event listeners

2013-07-02 15:20:44,997 ERROR gnolia.jcr.node2bean.impl.Node2BeanTransformerImpl: Can't set property [command] to value [info.magnolia.module.mail.commands.MailCommand@7c1f3eec] in bean [info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener] for node /modules/observation/config/listenerConfigurations/sendMailOnPageChanges/listener due to java.lang.IllegalArgumentException: Cannot invoke info.magnolia.module.observation.commands.CommandEventListener.setCommand on bean class 'class info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener' - argument type mismatch - had objects of type "info.magnolia.module.mail.commands.MailCommand" but expected signature "org.apache.commons.chain.Command"
2013-07-02 15:20:45,024 ERROR gnolia.jcr.node2bean.impl.Node2BeanTransformerImpl: Can't set property [command] to value [info.magnolia.commands.DelegateCommand@47788a76] in bean [info.magnolia.module.observation.commands.SpecifiedNodeTypeOnlyEventListener] for node /modules/observation/config/listenerConfigurations/versionResourceOnChange/listener due to java.lang.IllegalArgumentException: Cannot invoke info.magnolia.module.observation.commands.CommandEventListener.setCommand on bean class 'class info.magnolia.module.observation.commands.SpecifiedNodeTypeOnlyEventListener' - argument type mismatch - had objects of type "info.magnolia.commands.DelegateCommand" but expected signature "org.apache.commons.chain.Command"
2013-07-02 15:20:45,027 ERROR gnolia.jcr.node2bean.impl.Node2BeanTransformerImpl: Can't set property [command] to value [info.magnolia.commands.DelegateCommand@1886ad24] in bean [info.magnolia.module.observation.commands.SpecifiedNodeTypeOnlyEventListener] for node /modules/observation/config/listenerConfigurations/versionResourcesOnChange/listener due to java.lang.IllegalArgumentException: Cannot invoke info.magnolia.module.observation.commands.CommandEventListener.setCommand on bean class 'class info.magnolia.module.observation.commands.SpecifiedNodeTypeOnlyEventListener' - argument type mismatch - had objects of type "info.magnolia.commands.DelegateCommand" but expected signature "org.apache.commons.chain.Command"
2013-07-02 15:20:45,036 ERROR gnolia.jcr.node2bean.impl.Node2BeanTransformerImpl: Can't set property [command] to value [info.magnolia.module.mail.commands.MailCommand@67792c41] in bean [info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener] for node /modules/observation/config/listenerConfigurations/sendMailOnPageComments/listener due to java.lang.IllegalArgumentException: Cannot invoke info.magnolia.module.observation.commands.CommandEventListener.setCommand on bean class 'class info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener' - argument type mismatch - had objects of type "info.magnolia.module.mail.commands.MailCommand" but expected signature "org.apache.commons.chain.Command"
2013-07-02 15:20:45,046 ERROR gnolia.jcr.node2bean.impl.Node2BeanTransformerImpl: Can't set property [command] to value [info.magnolia.module.categorization.commands.CategoryGeneratorCommand@28d5d68f] in bean [info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener] for node /modules/observation/config/listenerConfigurations/generateCategories/listener due to java.lang.IllegalArgumentException: Cannot invoke info.magnolia.module.observation.commands.CommandEventListener.setCommand on bean class 'class info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener' - argument type mismatch - had objects of type "info.magnolia.module.categorization.commands.CategoryGeneratorCommand" but expected signature "org.apache.commons.chain.Command"

2. Wrong package name for ActivationCommand which is used in activateAddedPages event listener
It should be info.magnolia.module.activation.commands.ActivationCommand instead of info.magnolia.module.admininterface.commands.ActivationCommand

2013-07-02 15:20:45,006 WARN  magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl: can't resolve class for node /modules/observation/config/listenerConfigurations/activateAddedPages/listener/command
java.lang.ClassNotFoundException: info.magnolia.module.admininterface.commands.ActivationCommand
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:564)
	at info.magnolia.module.groovy.support.classes.GroovyClassFactory.forName(GroovyClassFactory.java:95)
	at info.magnolia.jcr.node2bean.impl.Node2BeanTransformerImpl.resolveType(Node2BeanTransformerImpl.java:151)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:117)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toMap(Node2BeanProcessorImpl.java:228)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:132)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toMap(Node2BeanProcessorImpl.java:228)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:132)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toMap(Node2BeanProcessorImpl.java:228)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:132)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toMap(Node2BeanProcessorImpl.java:228)
	at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.setProperties(Node2BeanProcessorImpl.java:184)
	at info.magnolia.module.ModuleManagerImpl.populateModuleInstance(ModuleManagerImpl.java:461)
	at info.magnolia.module.ModuleManagerImpl.startModules(ModuleManagerImpl.java:345)
	at info.magnolia.module.ui.ModuleManagerWebUI.onStartup(ModuleManagerWebUI.java:82)
	at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:151)
	at info.magnolia.init.MagnoliaServletContextListener$1.doExec(MagnoliaServletContextListener.java:253)
	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:411)
	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:408)
	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:382)
	at info.magnolia.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:250)
	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:176)
	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:126)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

3. When event listener is trigger then NPE occure. This is most likely caused by issues above

Exception in thread "Thread-68" java.lang.NullPointerException
	at info.magnolia.module.observation.commands.CommandEventListener.onEvent(CommandEventListener.java:73)
	at info.magnolia.module.observation.util.ObservationUtil$ObservationBasedDelayedExecutor$1.run(ObservationUtil.java:373)
	at info.magnolia.cms.util.DelayedExecutor$RunnableWrapper.run(DelayedExecutor.java:105)
	at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:662)


 Comments   
Comment by Philip Mundt [ 29/Aug/13 ]

This should be solved with MGNLOBS-19.

Generated at Mon Feb 12 10:23:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.