I analyzed that before I left the office. The root of the issue is
that the node is created in the startup thread but not saved (by
InstallContext.getModulesNode().
But the rest of the operations is done in a new thread. As threads
don't share jcr sessions anymore the formerly created node is not seen.
So I will change the getModulesNode() that it saves that node.
Philipp
Begin forwarded message:
From: [EMAIL PROTECTED]
Date: 15. November 2007 00:30:04 GMT+01:00
To: <[EMAIL PROTECTED]>
Subject: [magnolia-svn] [12552] well, if nobody creates the /
modules node, it' s not gonna be created by magic :-p
Reply-To: <[EMAIL PROTECTED]>
Revision12552AuthorgjosephDate2007-11-15 00:30:01 +0100 (Thu, 15
Nov 2007)Log Messagewell, if nobody creates the /modules node, it's
not gonna be created by magic :-p (was created before as a side-
effect of core bootstrapping a virtualUriMapping in the
admininterface module ... ! )Modified Paths
magnolia/trunk/magnolia-core/src/main/java/info/magnolia/module/
delta/AllModulesNodeOperation.java
magnolia/trunk/magnolia-core/src/main/java/info/magnolia/setup/
CoreModuleVersionHandler.java
Diff
Modified: magnolia/trunk/magnolia-core/src/main/java/info/magnolia/
module/delta/AllModulesNodeOperation.java (12551 => 12552)---
magnolia/trunk/magnolia-core/src/main/java/info/magnolia/module/
delta/AllModulesNodeOperation.java 2007-11-14 22:39:12 UTC (rev
12551) +++ magnolia/trunk/magnolia-core/src/main/java/info/magnolia/
module/delta/AllModulesNodeOperation.java 2007-11-14 23:30:01 UTC
(rev 12552)@@ -43,6 +43,9 @@ * An abstract that will perform an
operation on all modules node found in the configuration
repository. * @see #operateOnChildNode
(info.magnolia.cms.core.Content,info.magnolia.module.InstallContext)
*+ * Warning: tasks will fail if the modules node does not exist
yet. (As an incentive to force the explicit creation + * of this
node) + * * @author gjoseph * @version $Revision: $ ($Author:
$) */@@ -58,7 +61,7 @@ protected Content getParentNode
(InstallContext ctx) throws RepositoryException,
TaskExecutionException { if (!ctx.hasModulesNode())
{- throw new TaskExecutionException("Modules node does
not exist, can not proceed.");+ throw new
TaskExecutionException("The main /modules node does not exist in
the config repository, can not proceed."); } return
ctx.getModulesNode(); }
Modified: magnolia/trunk/magnolia-core/src/main/java/info/magnolia/
setup/CoreModuleVersionHandler.java (12551 => 12552)--- magnolia/
trunk/magnolia-core/src/main/java/info/magnolia/setup/
CoreModuleVersionHandler.java 2007-11-14 22:39:12 UTC (rev 12551) ++
+ magnolia/trunk/magnolia-core/src/main/java/info/magnolia/setup/
CoreModuleVersionHandler.java 2007-11-14 23:30:01 UTC (rev 12552)@@
-105,7 +105,7 @@ new BootstrapSingleResource("New
security configuration", "Install new configuration for security
managers", "/mgnl-bootstrap/core/
config.server.security.xml"), new
BootstrapSingleResource("New rendering strategy for links",
"Install new configuration for link resolving", "/mgnl-bootstrap/
core/config.server.rendering.linkResolver.xml"),-
+ new BootstrapConditionally("Install MIME mappings if
not already existent", "Add MIMEMappings to server config", "/mgnl-
bootstrap/core/config.server.MIMEMapping.xml"), new
BootstrapConditionally("Install URI2Repository mappings", "Install
new configuration of URI2Repository mappings", "/mgnl-bootstrap/
core/config.server.URI2RepositoryMapping.xml", new
UpdateURI2RepositoryMappings()), @@ -115,7 +115,7 @@ //
the two following tasks replace the config.server.xml bootstrap
file new CheckOrCreatePropertyTask("defaultExtension
property", "Checks that the defaultExtension property exists in
config:/server", "config", "/server", "defaultExtension",
"html"),- + new CheckOrCreatePropertyTask
("admin property", "Checks that the admin property exists in
config:/server", "config", "/server", "admin",
StringUtils.defaultIfEmpty(SystemProperty.getProperty
(BOOTSTRAP_AUTHOR_INSTANCE_PROPERTY), "true")), new
MoveAndRenamePropertyTask("basicRealm property", "/server",
"basicRealm", "magnolia 3.0", "/server/filters/uriSecurity/
clientCallback", "realmName", "Magnolia"), new
ArrayDelegateTask("defaultBaseUrl property",@@ -166,6 +166,8
@@ new RegisterModuleServletsTask(), // ---
system-wide tasks (impact all modules)+ new
NodeExistsDelegateTask("Modules node", "Creates the modules node in
the config repository if needed", ContentRepository.CONFIG, "/
modules", null, + new CreateNodeTask(null, null,
ContentRepository.CONFIG, "/", "modules",
ItemType.CONTENT.getSystemName())), new
RenamedRenderersToTemplateRenderers(), new
ReconfigureCommands(), new UpdateURIMappings(),
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------