Uploaded image for project: 'Magnolia Resources Module'
  1. Magnolia Resources Module
  2. MGNLRES-142

Using the InstallTextResourcesTask(String pattern, String template) constructor results in InvalidItemStateException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3.8, 2.4.5
    • 2.3.7, 2.4.4
    • None
    • Basel 35
    • 2

      We have a version handler that tries to install some CSS text resources like this:

      setInstallOrUpdateTask(new InstallTextResourcesTask("/vpro/module/vprotemplatingkit/.*\\.css", ResourceTypes.CSS));
      

      However, running this version handler results in the following error:

      2015-04-28 17:00:36,177 ERROR info.magnolia.module.InstallContextImpl           : > Could not install or update vpro-templating-kit module. Task 'Install text resources' failed. (InvalidItemStateException: Item does not exist anymore: 77c448aa-6817-453b-8afe-b48af1647ca7/{}modelClass)
      info.magnolia.module.delta.TaskExecutionException: Can't install resource [/vpro/module/vprotemplatingkit/css/reset.css]
      	at info.magnolia.module.resources.setup.InstallTextResourceTask.execute(InstallTextResourceTask.java:116)
      	at info.magnolia.module.resources.setup.InstallTextResourcesTask.doExecute(InstallTextResourcesTask.java:109)
      	at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:57)
      	at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:514)
      	at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:496)
      	at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:274)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:414)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:411)
      	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385)
      	at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:268)
      	at info.magnolia.module.ui.ModuleManagerNullUI.onStartup(ModuleManagerNullUI.java:66)
      	at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:149)
      	at info.magnolia.init.MagnoliaServletContextListener$1.doExec(MagnoliaServletContextListener.java:248)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:414)
      	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:411)
      	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385)
      	at info.magnolia.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:245)
      	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:171)
      	at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:125)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
      	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:632)
      	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1740)
      	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 org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
      	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
      	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 org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)
      	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
      	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)
      	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)
      	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)
      	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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
      	at sun.rmi.transport.Transport$1.run(Transport.java:200)
      	at sun.rmi.transport.Transport$1.run(Transport.java:197)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
      	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/1630123354.run(Unknown Source)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.jcr.InvalidItemStateException: Item does not exist anymore: 77c448aa-6817-453b-8afe-b48af1647ca7/{}modelClass
      	at org.apache.jackrabbit.core.ItemImpl.itemSanityCheck(ItemImpl.java:116)
      	at org.apache.jackrabbit.core.ItemImpl.sanityCheck(ItemImpl.java:104)
      	at org.apache.jackrabbit.core.PropertyImpl.getName(PropertyImpl.java:892)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getName(DelegatePropertyWrapper.java:241)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getName(DelegatePropertyWrapper.java:241)
      	at info.magnolia.jcr.wrapper.MgnlPropertySettingContentDecorator$LastUpdatePropertyWrapper.updateLastModifiedProperty(MgnlPropertySettingContentDecorator.java:393)
      	at info.magnolia.jcr.wrapper.MgnlPropertySettingContentDecorator$LastUpdatePropertyWrapper.setValue(MgnlPropertySettingContentDecorator.java:360)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.setValue(DelegatePropertyWrapper.java:101)
      	at info.magnolia.audit.MgnlAuditLoggingContentDecoratorPropertyWrapper.setValue(MgnlAuditLoggingContentDecoratorPropertyWrapper.java:79)
      	at info.magnolia.module.resources.setup.AbstractInstallResourceTask.setProperty(AbstractInstallResourceTask.java:134)
      	at info.magnolia.module.resources.setup.InstallTextResourceTask.execute(InstallTextResourceTask.java:105)
      	... 64 more
      

        Acceptance criteria

              ilgun Ilgun Ilgun
              breun Nils Breunese
              Nucleus
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - 3h Original Estimate - 3h
                    3h
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 3d 1.5h
                    3d 1.5h