Issue Type: Bug Bug
Assignee: Espen Jervidalo
Created: 22/May/14 9:33 AM
Description:

When using a the BootstrapConditionally Task (in Magnolia 5.2.3) with this constructor

    public BootstrapConditionally(String taskName, String resourceToBootstrap) 

one gets a NPE when the task ist excuted (see below).
This constructor also has no javadoc and delegates to

    public BootstrapConditionally(String taskName, String taskDescription, String repositoryName, String pathToCheck, String resourceToBootstrap, Task ifNodeExists) 

but I think because the javadoc of the class says "A Task which bootstraps if the node targeted by the bootstrap file does not exist." it should better delegate to

public BootstrapConditionally(String taskName, String taskDescription, String resourceToBootstrap)

Workaround is to use this constructor directly.

 ERROR info.magnolia.module.InstallContextImpl  - > Error while installing or updating XXXX module. Task 'YYYYY' failed. (NullPointerException: )
java.lang.NullPointerException
        at info.magnolia.importexport.BootstrapUtil.getFilenameFromResource(BootstrapUtil.java:182)
        at info.magnolia.importexport.BootstrapUtil.bootstrap(BootstrapUtil.java:75)
        at info.magnolia.module.delta.BootstrapResourcesTask.execute(BootstrapResourcesTask.java:72)
        at info.magnolia.module.delta.ConditionalDelegateTask.execute(ConditionalDelegateTask.java:61)
        at info.magnolia.module.delta.ConditionalDelegateTask.execute(ConditionalDelegateTask.java:61)
        at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:509)
        at info.magnolia.module.ModuleManagerImpl$3.doExec(ModuleManagerImpl.java:389)
        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.executeStartupTasks(ModuleManagerImpl.java:382)
        at info.magnolia.module.ModuleManagerImpl.startModules(ModuleManagerImpl.java:297)
        at info.magnolia.module.ui.ModuleManagerNullUI.onStartup(ModuleManagerNullUI.java:74)
        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.deployDirectory(HostConfig.java:1229)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
2014-05-21 13:20:25,369 [localhost-startStop-1] ERROR info.magnolia.cms.beans.config.ConfigLoader  - An unspecified error occurred during initialization: null
java.lang.NullPointerException
        at info.magnolia.importexport.BootstrapUtil.getFilenameFromResource(BootstrapUtil.java:182)
        at info.magnolia.importexport.BootstrapUtil.bootstrap(BootstrapUtil.java:75)
        at info.magnolia.module.delta.BootstrapResourcesTask.execute(BootstrapResourcesTask.java:72)
        at info.magnolia.module.delta.ConditionalDelegateTask.execute(ConditionalDelegateTask.java:61)
        at info.magnolia.module.delta.ConditionalDelegateTask.execute(ConditionalDelegateTask.java:61)
        at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:509)

Project: Task Management
Priority: Neutral Neutral
Reporter: Moritz Siuts
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to