Don’t deploy Magnolia: deploy your project.

In the previous episodes of this series of posts, we have built a Magnolia CMS-based project, and learnt about how to make it self-configurable. It’s deployable as-is, in your container of choice, but it is not production-ready: for example, you probably want to use an external database instead of the built-in Derby. In this article, we will see how to make this possible, without having to configure anything manually before each deployment.

A little side note, first: you might notice that this article has the same title as the previous. Well, I renamed the previous article, since the title wasn’t really matching its content. It’s always a little confusing though, as there are really two (mostly independent) configuration mechanisms in Magnolia. On one hand, there’s everything you configure via the repository (covered in the previous article), on the other there’s everything you configure in magnolia.properties files (covered in this article).

The big plan

What we’ll try to achieve with this article, is a what I’ll call a “1-file deployment”. Ideally, an update on the production server should not mean more than copying one file over. We’ll see that there will be a couple more steps in general, but nothing dramatic.

How will we do this ? We will use a technique sometimes referred to as one .war multiple configurations. If you’ve read the documentation article, the below might be a little redundant, but hang on, and we might uncover a few unexpected tricks.

Typically, one will want to change a few things before putting a Magnolia project in production:

  • The location of the repository (outside the webapp!)
  • The Jackrabbit configuration (i.e use MySQL instead of Derby)
  • Whether the instance should automatically apply updates
  • Whether the instance should run in “development mode” (no it shouldn’t)
  • Whether samples should be bootstrapped (no it shouldn’t)

Custom magnolia.properties locations and files

All the above configuration can be done by modifying the magnolia.properties file. We want to avoid having to do these modifications when deploying; not once, not ever.

Magnolia ships with a few magnolia.properties files, among which WEB-INF/config/default/magnolia.properties, config/magnoliaAuthor/magnolia.properties and config/magnoliaPublic/magnolia.properties. It might be tempting to modify those, but you’ll see that it’s not exactly the preferred approach.

By default, Magnolia finds magnolia.properties files using the “webapp name” and the “server name” substitution variables. The former really only corresponds to the folder name into which the Magnolia instance was deployed, so I would recommend not relying on it1. The “server name” property might be of interest if you have several instances sharing most of their configuration: it corresponds to the resolved name of the current host.

There are other, perhaps lesser known, substitution variables which can be used, namely context parameters and context attributes. To make use of these, we’ll need a custom web.xml; so far, we’ve relied on the one shipped with magnolia-empty-webapp. Because of this, you might have to modify that web.xml when upgrading to newer Magnolia versions – if necessary, such changes will be mentioned in the release notes, so don’t worry.

Let’s go ahead and create our custom web.xml; we’ll simply copy it from our working copy, since Maven already pulled it from magnolia-empty-webapp:

cp ./acme-project-webapp/target/war/work/info.magnolia/magnolia-empty-webapp/WEB-INF/web.xml ./acme-project-webapp/src/main/webapp/WEB-INF/

Open it in your editor, uncomment the following section and replace its <param-value> as below:

<context-param>
  <param-name>magnolia.initialization.file</param-name>
  <param-value>
    WEB-INF/config/${servername}-${contextParam/magnoliaInstance}-magnolia.properties,
    WEB-INF/config/${servername}-magnolia.properties,
    WEB-INF/config/${contextParam/magnoliaInstance}-magnolia.properties,
    WEB-INF/config/default-magnolia.properties
  </param-value>
</context-param>

Notice the difference with the default value: essentially, we have replaced ${webapp} with ${contextParam/magnoliaInstance}. The ${contextParam/XXX} placeholder will be substituted with a context parameter of the same name. magnoliaInstance is an arbitrary context parameter which we will declare in our container. This could be shipped with the default web.xml of Magnolia, since they won’t get substituted if the value does not exist. If you find a good, legible, meaningful and unequivocal name for this parameter, we’d love to include it in the default web.xml. Share your idea in the comments or on our Jira !

As from Magnolia 4.5, the contextPath will also be available as a substitution variable, as well as system properties (${systemProperty/xxx}) and environment variables (${env/xxx}). Unfortunately, we can’t really ship a default web.xml that would use the ${contextPath} variable, as a deployment in the root context would result in it being substituted with an empty string, thus changing the order in which the properties files are loaded. 2

You’ll also notice we replaced a bunch of /s with -s: nothing mandates the use of magnolia.properties as a file name, and I personally find it more convenient to keep these files in one single directory.

Upon startup, Magnolia will substitute these ${...} placeholders with the appropriate values, and load any file it finds matching the resulting paths. It will then overlay the files in reverse order. What this means is that the last value (WEB-INF/config/default-magnolia.properties) should contain all your most generic and common configuration values, while the first values should contain the more specific values.

For now, we’ll settle with 4 imaginary values for our magnoliaInstance context parameter: prodAuthor, prodPublic, testAuthor and testPublic. I suppose you’re starting to see how one could use this value to differentiate different instances, where the configuration only varies slightly. Let’s create the corresponding configuration files.

Since we also replaced the value of default/magnolia.properties by default-magnolia.properties, we will recreate the file. We’ll use this opportunity to introduce a custom magnolia.home property3. Let’s create this file in acme-project-webapp/src/main/webapp/WEB-INF/config and name it default-magnolia.properties:

magnolia.home=${magnolia.app.rootdir}

magnolia.logs.dir=${magnolia.home}/logs
magnolia.cache.startdir=${magnolia.home}/cache
magnolia.upload.tmpdir=${magnolia.home}/tmp
magnolia.exchange.history=${magnolia.home}/history
magnolia.repositories.home=${magnolia.home}/repositories
magnolia.repositories.config=WEB-INF/config/default/repositories.xml
magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-conf/jackrabbit-bundle-derby-search.xml
magnolia.connection.jcr.userId = admin
magnolia.connection.jcr.password = admin
log4j.config=WEB-INF/config/default/log4j.xml
magnolia.bootstrap.dir=WEB-INF/bootstrap/author WEB-INF/bootstrap/common
magnolia.bootstrap.authorInstance=true
magnolia.bootstrap.samples=true
magnolia.update.auto=false
magnolia.develop=true

This is a cleaned up copy of the default magnolia.properties file shipped with Magnolia. Notice the new magnolia.home property, and how it’s referenced by many other properties below ? This is how we’ll be able to locate our repository, cache, log and temporary files outside the web application’s own folder, by changing the value of a single property. Keep in mind Magnolia substitutes the variables after it has loaded all configuration files. The value of ${magnolia.app.rootdir} corresponds to the root of the webapp’s deployment directory, so it’s a “good enough” default value while developing.

Now all we have to do is create our “specialized” properties files:
testAuthor-magnolia.properties:

magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-conf/jackrabbit-memory-search.xml
magnolia.bootstrap.authorInstance=true

testPublic-magnolia.properties:

magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-conf/jackrabbit-memory-search.xml
magnolia.bootstrap.authorInstance=false

prodAuthor-magnolia.properties:

magnolia.home=/opt/acme-project/data/author/
magnolia.repositories.jackrabbit.config=WEB-INF/config/jackrabbit-acme-prod.xml
magnolia.bootstrap.authorInstance=true
magnolia.bootstrap.dir=WEB-INF/bootstrap/author WEB-INF/bootstrap/common
magnolia.bootstrap.samples=false
magnolia.develop=false
magnolia.update.auto=false

prodPublic-magnolia.properties:

magnolia.home=/opt/acme-project/data/public/
magnolia.repositories.jackrabbit.config=WEB-INF/config/jackrabbit-acme-prod.xml
magnolia.bootstrap.authorInstance=false
magnolia.bootstrap.dir=WEB-INF/bootstrap/public WEB-INF/bootstrap/common
magnolia.bootstrap.samples=false
magnolia.develop=false
magnolia.update.auto=true

So what do we have here ? The “test” instances use one of the jackrabbit configuration files that are shipped with Magnolia by default, which configures JackRabbit so as to store its data in memory. This allows fast startup time, but also means no data is kept between restarts. One could even use this in the default file, but I like my dev or local instance using Derby, so I can still stop/restart my IDE instance without losing all data. They also set the magnolia.bootstrap.authorInstance property, to indicate to Magnolia whether they should be considered an author or public instance when first installing. They “inherit” all other properties from the default configuration file.

In addition, the “prod” configuration files do the following:

  • Set magnolia.home to /opt/acme-project/data/<author-or-public>. This value will of course need to be adapted to your deployment scheme, and its value will need to be set in accordance with your system engineers. As a result, all files created by Magnolia (with the exception of JSP files, which need to reside in the webapp’s folder, per spec) will reside in this directory. Note: one could think about using the ${contextParam/magnoliaInstance} variable substitution in the properties file. Not a bad idea, but currently a limitation of the Magnolia 4.4.x branch: the ${contextParam} substitutions are only available when resolving the value of the magnolia.initialization.file parameter set in the web.xml file.
  • Set the Jackrabbit configuration file to a custom file which we will get to in detail later.
  • Set the magnolia.bootstrap.samples flag to false: we don’t need samples on the production sites.
  • Set the magnolia.develop flag to false, which improves the performance somewhat.
  • Set the magnolia.update.auto flag to true on the public instance, so that “Magnolia install/update” screens don’t show up, even accidentally, on a public instance.

I have sometimes been tempted to push this even further, and introduce several files and corresponding context parameter: one for the instance “type” (dev, prod, …, which would control properties such as the Jackrabbit configuration) and one for the instance “role” (author or public, which would control the magnolia.bootstrap.authorInstance, magnolia.bootstrap.dir and magnolia.update.auto properties). Tempting, but might make finding the missing or wrong property a little more hairy. What do you think ?

Note: we have seen some folks take another approach: instead of defining a custom magnolia.initialization.file in their web.xml and use several files overriding certain properties of other magnolia.properties files, they chose to define the value of magnolia.initialization.file directly in the container configuration (similarly to how we will declare our magnoliaInstance below), giving it the value of an absolute path outside the webapp, and thus have the one magnolia.properties outside the webapp. This solution is quite clever, and gives maximum flexibility to system engineers (they’ll set these property themselves as they please, without having to report changes back to developers for inclusion in further releases), but however has the slight disadvantage that all properties need to be redeclared.
A middle-ground approach might be to set the web.xml value to something like /opt/${contextParam/magnolia.home}/magnolia.properties, WEB-INF/config/magnolia-default.properties which should provide the best of both worlds (defaults in webapp, overrides outside). Let me know in comments if you’ve used this or any other approach !

Custom Jackrabbit configuration file

Now, we’ve referred to a Jackrabbit configuration file above, so let’s just finish that. Hang on, it will all make sense in a moment.

Create a file in acme-project-webapp/src/main/webapp/WEB-INF/config/, name it jackrabbit-acme-prod.xml, copy the content from this gist:

The only difference with the regular Jackrabbit configuration files shipped with Magnolia is the driver and url parameters of the <PersistenceManager> elements; this is how Jackrabbit knows to use a JNDI DataSource instead of a regular JDBC driver.

Using a datasource has a couple of advantages:

  • No username, password, or even database URL in the Jackrabbit configuration file.
  • The same file can be re-used on several instances, since the url, username and password are defined outside the webapp.

Tying it all together – container configuration

… and finally, we can make sense of all the above configuration. For this example, we’re going to use Tomcat and MySQL. Feel free to adapt for your container and database of choice.

We’re going to pretend we’re installing a production server … and do that on our development machine. Oh well. In this example, we’ll be deploying both author and public instances on the same Tomcat instance. In a real production environment, you’ll want a different server altogether, and you’ll probably want a second public instance, but let’s put that aside for now.

Start off by extracting a fresh Tomcat instance in a location of your choice… wait, no. Remember how we set the magnolia.home properties to /opt/acme-project/data/<author or public>/ earlier ? Why don’t we use this same location for our Tomcat ? 4

sudo mkdir /opt/acme-project
sudo chown $USER /opt/acme-project/
tar xfvz ~/Downloads/apache-tomcat-6.0.33.tar.gz
# delete sample Tomcat webapps
rm -rf tomcat/webapps/ROOT/ tomcat/webapps/docs/ tomcat/webapps/examples/
# this directory is not there before the first start. The `Catalina` folder name corresponds to the `<Service>` name from `server.xml`
mkdir -pv tomcat/conf/Catalina/localhost
ln -s apache-tomcat-6.0.33 tomcat
cd tomcat/bin/ && curl -O http://svn.magnolia-cms.com/svn/community/bundle/trunk/magnolia-tomcat-bundle/src/release/tomcat/bin/setenv.sh && cd -
mkdir wars
mkdir data

So we installed our Tomcat in there. We removed the sample Tomcat applications (allowing us to deploy in ROOT, btw), created a missing configuration directory (so we can configure our contexts before the first startup), we created a data directory, which will host our instances’ magnolia.home contents, and a wars directory, where we’ll drop our .war files. We also grabbed a setenv.sh from Magnolia’s svn server, which just sets a few JAVA_OPTS options.

Next up, we’ll create our contexts. Create the following files:

tomcat/conf/Catalina/localhost/author.xml:

tomcat/conf/Catalina/localhost/ROOT.xml:

So we finally declared and gave a value to our magnoliaInstance context parameter (which we referred to in the web.xml above). We also declared a datasource which is not quite like the examples in Tomcat’s documentation. Instead, it uses the MySQL classes directly, which gives us better control on pooling (or lack thereof, in this case). Tip of the hat to Richard Hunger for letting me know about this trick. 5

We have declared two contexts: "" (aka ROOT, aka “empty context path) and /author, for the public and author instance, respectively. In a production system, these would most likely be declared in a different Tomcat instance, possibly using virtual hosts (thus each instance could be deployed in the ROOT context). In our scenario, it is the context’s filename that determines the contextPath. See the Tomcat Configuration Reference for more info.

You’ll also notice that we refer directly to our .war file (via the docBase attribute), and that both contexts refer to the exact same file. This will greatly facilitate updates, as you’ll see below.

The last missing link …

Hopefully, you have MySQL on your machine6; if not, you can still edit the datasource definitions urls above to point to some other server. Let’s create the appropriate (empty) databases: 7

mysql -u root -p
mysql> CREATE DATABASE acme_repo_author CHARACTER SET utf8;
mysql> CREATE DATABASE acme_repo_public CHARACTER SET utf8;
mysql> CREATE USER 'acme_magnolia'@'localhost' IDENTIFIED BY 'secret';
mysql> GRANT ALL ON acme_repo_author.* TO 'acme_magnolia'@'localhost';
mysql> GRANT ALL ON acme_repo_public.* TO 'acme_magnolia'@'localhost';

Lastly, let’s get the MySQL driver and push it in Tomcat’s shared lib folder: 8

cd tomcat/lib && curl -O http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar && cd -

Finally !

We are now ready to deploy and start our app. Let’s do this !

Go back to the folder where the sources of the project are, and build it. (Just imagine the last step (‘cp’) is done by your sysadmin, by downloading the .war from your company’s repository, for example)

cd ~/tmp/blog/acme-project
mvn clean install
cp acme-project-webapp/target/acme-project-webapp-1.0-SNAPSHOT.war /opt/acme-project/wars/

Well that’s it ! We can start !

tomcat/bin/startup.sh && tail -f tomcat/logs/catalina.out

The above command should start Tomcat, and 2 instances of our Magnolia project. If successful, it will immediately start tailing the logs, so you should keep your eyes peeled for the following bits:

2011-10-25 19:30:38,896 DEBUG o.magnolia.cms.servlets.MgnlServletContextListener: magnolia.initialization.file value in web.xml is :'WEB-INF/config/${servername}-${contextParam/magnoliaInstance}-magnolia.properties,
      WEB-INF/config/${contextParam/magnoliaInstance}-magnolia.properties,
      WEB-INF/config/${servername}-magnolia.properties,
      WEB-INF/config/default-magnolia.properties'
2011-10-25 19:30:40,215 INFO  fo.magnolia.cms.beans.config.PropertiesInitializer: Loading configuration at /opt/acme-project/tomcat/webapps/acmeAuthor/WEB-INF/config/default-magnolia.properties
2011-10-25 19:30:40,216 INFO  fo.magnolia.cms.beans.config.PropertiesInitializer: Loading configuration at /opt/acme-project/tomcat/webapps/acmeAuthor/WEB-INF/config/prodAuthor-magnolia.properties

This confirms two things: one, our custom web.xml was indeed loaded, and, more importantly, the properties files we have been working on since the beginning of this article are loaded, and in the expected order.

This will occur twice, as the second instance gets deployed, you’ll notice it loads the public configuration files.

Try to hit your author instance, where you should get the Magnolia installation screens. Start the installation. Try to hit your public instance: the installation should haven go through immediately, so you should see.. a 404 error page. Yeah, we don’t have any content yet, do we ? To be sure, try to hit the public instance’s AdminCentral.

You’ll notice you can’t activate pages between those two instances. That’s because the default Magnolia configuration sets up one subscriber (the public instance to which an author activates) at http://localhost:8080/magnoliaPublic. You’ll need to configure that (to http://localhost:8080, simply). And yes, you should do this via your version handler, as per the previous article. I’ll leave that as an exercise for the reader.

Another exercise, to make sure you’ve understood everything that was going on: how would you deploy the project on a test server ?

A note on updates

If you’ve made a mistake, or want to try something new in the webapp, simply rebuild the webapp and replace the war file in /opt/acme-project/wars. Stop Tomcat, delete the corresponding webapp directory in Tomcat: rm -rf tomcat/webapps/acme* and restart Tomcat. Since we’ve used a magnolia.home outside the webapp, you will not lose any data !

In case of a real, non-snapshot, update, you’ll want to keep your 1.0 .war file, and get the new 1.0.1 release next to it. You’ll need to update the context file to point to the new .war, delete the extracted webapps and restart Tomcat.

Anything else ?

I hope you’ve picked up a few things along the (admittedly long and dense) way of these three articles. We now have a project based on Magnolia which:

  • Builds upon Magnolia with minimal duplication, and is deployable as-is for both development and production,
  • Installs itself and configures Magnolia without human intervention,
  • Provides one single artifact for deployment of several instances and different servers,
  • Can easily be updated, by deploying a new .war file.

Some parts of this dense article might be unclear. Try it out, and let me know what you think. I’ll also be happy to extend or cover areas I haven’t yet.

I’m a sucker for good ideas, so there are probably things that can be improved in Magnolia, or in our build chain, to make this whole process easier. And surely, there are ideas, tools and processes out there that could help as well. Looking forward to your comments !


  1. If the webapp is deployed as a .war file, the container might extract it in a folder whose name is outside your control. 
  2. Well, you could argue that it could be substituted with ROOT, since that’s how Tomcat names it. Or _ROOT_ ? What do you think ? 
  3. This property could be in the default magnolia.properties file shipped with future version. Watch MAGNOLIA-3840 and share your opinion! 
  4. If you run into permission issues, you can of course use a different location; just remember to change the .properties files accordingly. 
  5. http://wiki.magnolia-cms.com/display/WIKI/Database-Only+Repositories+with+JNDI+Datasources 
  6. If not, go get it. (pro tip: when asked for a user account, find a discreet link below the login form that says “No thanks, just take me to the downloads” ;) 
  7. On a production system, you’ll need to make sure your MySQL server is set to use InnoDB by default. Repository tables are created by Jackrabbit on startup without specifying an engine. To do so, add default-storage-engine=innodb to your my.cnf file in the [mysqld] section. For more details, see http://dev.mysql.com/doc/refman/5.5/en/innodb-default-se.html
  8. If that fails, just grab it manually from that URL or from the MySQL website, and move the .jar to tomcat/lib

69 thoughts on “Don’t deploy Magnolia: deploy your project.

  1. Instead of downloading the MySQL driver manually and putting it in the Tomcat lib directory, you *could* also just add it as a runtime dependency to your WAR project’s POM. Of course this is only a good idea if you use the same database for all your instances, but I guess that for most people that is the case.

    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.18</version>
    <scope>runtime</scope>
    </dependency>

    • I always thought the jdbc drivers had to be in the shared folder (ie parent classloader of the webapp’s) when using a Datasource ? Granted, this might have changed since the few years and looked it up and tried …

      Edit: I just tried, and indeed that works ! Well that’s great news, thanks

      And even if you use a different db for certain instances, I don’t suppose the jar’s presence would hurt ? You could probably just have all the necessary drivers in there.

  2. Hi Greg,

    I’m interested in the JNDI config for the datasource suggested by Richard. Do you think there would be any issues changing these on an already installed repository that had been using the pooled connection properties (i.e. javax.sql.DataSource)?

    Cheers,
    Matt

    • I don’t see why that’d be an issue no. It might change how the connection itself behaves, and it’d be interesting to compare both, but I’m pretty sure the end result is a more stable connection, since Jackrabbit can handle it directly, rather than having a pooling middleman that seems to have erratic behavior, depending on the exact version of dbcp in use.

  3. Pingback: Don’t build Magnolia: build your projects. | Greg’s ramblings

  4. Hi Greg,

    Thanks for the reply.

    One more question I have regarding the contexts examples for author and ROOT there are both user and username attributes, I’m assuming only the user attribute is required. Is this correct?

    Cheers,
    Matt

    • You mean the datasources. Yeah, only “user” is required for THIS datasource impl. Tomcat’s/DBCP uses “username” while MySQL uses “user”. Or the way around, I can never remember. Which is why I keep both, and avoid surprises if I switch from one to the other.

  5. Great post, really useful!

    There’s only one caveat: Using this recipe doesn’t work with Tomcat 7 – when using configuration files pointing to the external war-file in Tomcat, Magnolia complains about a null context path and startup fails early.

    • Hmm, I’m not sure what you’re referring to. Got any stracktraces or details ? This *should* work with TC7 (and if it doesn’t, I want to fix it!;))

  6. I’ve got it working with the latest Tomcat 6. The same setup fails with the latest Tomcat 7. The error is:

    java.lang.RuntimeException: Magnolia is not configured properly and therefore unable to start: real path can’t be obtained [ctx real path:null]

    I’l send you the stacktrace via email…

    • Hmm interesting. It looks like the messages we had with WebSphere/Logic, I’ll have to try it out. Perhaps TC7 doesn’t extract war files by default anymore, or it extracts them in a different folder/path… ?

  7. Hi Greg,

    I think the example code for the testAuthor-magnolia.properties and testPublic-magnolia.properties need to be swapped. Currently, the testAuthor example has magnolia.bootstrap.authorInstance=false and the testPublic example has magnolia.bootstrap.authorInstance=true.

    Cheers,
    Matt

  8. Hi Gregory, Nice tutorial. Detailed and clear although I’m having problems deploying. I start tomcat and go to localhost:8080 and am greeted with the magnolia homepage. When I try to access either public or author pages I am greeted with this error :

    java.lang.IllegalStateException: This implementation of ModuleManagerUI is only meant to be used at startup.
    info.magnolia.module.ui.ModuleManagerNullUI.execute(ModuleManagerNullUI.java:83)
    info.magnolia.cms.filters.InstallFilter.doFilter(InstallFilter.java:100)
    info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
    info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
    info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:85)
    info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:67)
    info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
    info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:108)
    info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:67)
    info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:108)
    info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:94)

    Any ideas why I might be seeing this error? Any assistance you can provide me would be much appreciated.

    Kind regards,

    Dave

    • Hmm, that’s odd. What Tomcat version are you using ? Perhaps there’s another error in your log file(s) earlier ? Can you check for that ? Feel free to send them my way, and/or a service list pastie.org.

      • Hey, this is Magnolia 4.5 it seems. I wrote this blog with 4.4 in mind; I suspect a property is missing in my examples for it to work with 4.5 … But to be sure, I’d need the actual Magnolia logs.. Ha, Tomcat has this tendency to spread logs in different files, and it’s not always easy to figure out which one you want to look at, depending on your platform. On a Mac, catalina.out usually contains the stuff we need. Otherwise, a magnolia.log file should exist in whatever directory ${magnolia.logs.dir} points to; could you paste that one ?

        • Gregory,
          You are right. I’ve identified the error to be :

          the mandatory property ‘magnolia.author.key.location’ is missing

          Easy fix or should I migrate to 4.4?

          • I’ve added the property to default-magnolia.properties file and am still encountering the same error.

          • Hey Dave, I’m finally trying this out, and seem to be having some trouble too. Will come back to you asap.

          • Hey Dave, my problems were solved once I updated all dependencies; I didn’t have the exact same error you saw though, so I’m still interested in trying to reproduce that exact one. (This implementation of ModuleManagerUI is only meant to be used at startup.)

            So to get this out of the way (perhaps it’s the same problem that manifested itself differently in your case), make sure you update all dependencies:

            * Change the magnoliaVersion property to 4.5.1 (or 4.5.2 soon)
            * Update the dependency to magnolia-module-standard-templating-kit to 2.0.1
            * Update the dependency to magnolia-module-dms to 1.6.1

            Let me know if that helps !

  9. I tried setting this up (how you’ve got it outlined in the last three posts) and everything works except that I get the following error on the public context:

    2012-05-03 13:33:55,152 ERROR info.magnolia.cms.filters.FilterManagerImpl : Error initializing filters
    javax.servlet.ServletException: No filters configured at /server/filters
    at info.magnolia.cms.filters.FilterManagerImpl.createConfiguredFilters(FilterManagerImpl.java:190)

    I’m running Magnolia 4.5.2, Tomcat 7.0.27, Mac OS X 10.6.8. Any suggestions?

    • Hey Mark,

      Sorry for the slow reply. The articles were written with 4.4 in mind. There are a couple quirks that come from using 4.5.x instead, as has been also noted by another commenter above; I suspect there must be other warnings/errors in your log file, before the one you see, which might give a better hint about what’s wrong. Feel free to post the complete log file somewhere, I could have a look, if you don’t see anything obvious.

  10. Hi Gregory.

    I installed magnolia (4.5.3) according to your great articles. Very good work.

    But I get one warning:
    2012-07-10 14:50:03,826 WARN info.magnolia.module.InstallContextImpl : > Workspace definition in workspace ….author\repositories\magnolia\workspaces\website\workspace.xml references indexer which has changed; pleas
    e remove the parameter ‘textFilterClasses’.

    This seems to be related to the SearchIndex entry in your jackrabbit config. Is there any upgrade for the search index or should we delete the SearchIndex entry?

    • I don’t know by heart, but those have been replaced by newer equivalents in JackRabbit 2.x, that’s why. Checkout the default configuration that comes with 4.5! (it should be somewhere in your project, since it’s shipped with magnolia-empty-webapp)
      Thanks !

  11. Hi Gregory.

    I’m sorry to ask more questions, but your great install guide brings up more desires.

    First: Is it possible to change the superuser password during install? Because if not, this would still be a manual step to do on all new installed instances.

    Second: The default install always warn about setting server/defaultBaseUrl and /modules/mail/config/smtp. We added both to the VersionHandler which works well. But the code is not system dependent. Is there any possibility to use values from magnolia.properties in the VersionHandler?

    Thanks for any help.
    Horst

  12. Hi

    I need configure a context param into tomcat context.xml that configure a magnolia.home property…
    I was trying to configure

    magnolia.home=${contextParam/magnoliaBase}

    and

    Any idea?

    (please forget my english)

    • Francisco,

      For this to work, you’d need to add a info.magnolia.init.PropertySource implementation that goes and look up properties in the servlet context. You’d then need a custom implementation of info.magnolia.init.MagnoliaConfigurationProperties or info.magnolia.init.MagnoliaPropertiesResolver to add that source to the default ones. While I’m pretty clear on the implementation of both components, I don’t recall by heart how to register those. It kinda sounds like it could be a good default behavior though, so I’ll talk to the team and see if that’d be a possible improvement in a future version.

      If that doesn’t work, or if you’re using a version before 4.5, you’ll unfortunately need to have one magnolia.properties file per value of “magnoliaBase”. It would only redefine the magnolia.home properties, and all other properties could be inherited from other chained files.

      Let me know if that helps !

  13. Hi
    This problem was delayed because I have another problem that complicate a use of magnolia and I can’t resolve.

    We develop an application Spring MVC that have a lot of static resources that we want move to magnolia. The idea is put all static content in first version and create a blossom template in a second phase to migrate very slowly… but we can’t . Any example that use spring+ spring security and allow to do this? the problem is that i don’t know if BlossomModuleSupport ingore a non template mapping controllers…

    I’m lost

    forgive my english,
    thanks

    • Hey Francisco,

      I don’t have much experience with Spring and Blossom myself, but I’m sure your question has been discussed on the forums, or will be if you ask ! Go to http://forum.magnolia-cms.com – I’ll make sure someone looks into it soon enough.

  14. Hi Greg,
    Great set of articles. I have mag 4.5.4. and I’m experiencing the same problem Dave was having:
    INFO: Server startup in 65312 ms
    Oct 9, 2012 8:09:29 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet default threw exception
    java.lang.IllegalStateException: This implementation of ModuleManagerUI is only meant to be used at startup.
    at info.magnolia.module.ui.ModuleManagerNullUI.execute(ModuleManagerNullUI.java:83)
    at info.magnolia.cms.filters.InstallFilter.doFilter(InstallFilter.java:100)
    at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
    at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
    at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:85)
    at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:67)
    at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
    at info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:108)
    at info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:67)
    at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:108)
    at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:94)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    at java.lang.Thread.run(Thread.java:662)
    Oct 9, 2012 8:09:42 PM org.apache.catalina.core.StandardWrapperValve invoke

    I added the author.key.location at the end of the default-magnolia.properties.
    magnolia.home=${magnolia.app.rootdir}

    magnolia.logs.dir=${magnolia.home}/logs
    magnolia.cache.startdir=${magnolia.home}/cache
    magnolia.upload.tmpdir=${magnolia.home}/tmp
    magnolia.exchange.history=${magnolia.home}/history
    magnolia.repositories.home=${magnolia.home}/repositories
    magnolia.repositories.config=WEB-INF/config/default/repositories.xml
    magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-conf/jackrabbit-bundle-derby-search.xml
    magnolia.connection.jcr.userId = admin
    magnolia.connection.jcr.password = admin
    log4j.config=WEB-INF/config/default/log4j.xml
    magnolia.bootstrap.dir=WEB-INF/bootstrap/author WEB-INF/bootstrap/common
    magnolia.bootstrap.authorInstance=true
    magnolia.bootstrap.samples=true
    magnolia.update.auto=false
    magnolia.develop=true
    magnolia.author.key.location=${magnolia.home}/magnolia-activation-keypair.properties

    As far as updating my dependencies this is what I have:

    info.magnolia
    magnolia-empty-webapp
    pom

    info.magnolia
    magnolia-empty-webapp
    war

    info.magnolia
    magnolia-module-standard-templating-kit
    2.0.4

    info.magnolia
    magnolia-module-dms
    1.6.1

    info.magnolia.themes.blue
    magnolia-theme-blue
    1.0.0-SNAPSHOT

    info.magnolia
    magnolia-core
    ${magnoliaVersion}
    test-jar
    test

    I’m going for extra credit as I’m deploying it to AWS linux.

    I didn’t see any other log files that might shed any light on this.

    I’m sooo close. Please have a look and see what I’m not doing.

    Thanks,

    Andrew

    • Have a look at magnolia.home/logs/magnolia-debug.log, and tomcat.home/logs/catalina.out and tomcat.home/logs/catalina.TIMESTAMP – if it’s a dependency problem, it should be logged. Because of MAGNOLIA-3545, you’re probably gonna have to explicitly define more dependencies. Try removing the dependency to theme-blue to start, because it might still be referring to older versions.

      • Thanks for the quick reply. It means a lot.

        I went looking for the logs and they help. It is complaining about the jackrabbit config.
        /opt/bitnami/apache-tomcat/webapps/ROOT/WEB-INF/config/jackrabbit-acme-prod.xml

        The thing is I’m not trying to deploy acme-prod I’m using

        I am installing in /opt/ which I created like you showed us and it has data/ and wars/ directories.

        But for some reason there is an /opt/acme-project. I think that it might be set to magnolia.home Where does that get set? I’ve searched my sources for “acme” in intellij and with grep -r on the box but I don’t see where acme is being introduced.

        I’m going to delete it and restart. It was co

        • Greg,
          I removed the dependency to theme blue in the pom.xml and have redeployed. Now I see this error:
          ModuleDependencyException: Module myApp: webapp (version 0.1.0-SNAPSHOT) is dependent on theme-blue version 1.0/*, which was not found.

          It looks like the theme dependency is defined some where besides the pom.xml

          Any suggestions?

          Thanks,

          Andrew

          • Greg,
            I found where theme blue was being referenced:
            src/main/resources/META-INF/magnolia/myApp.xml and I commented that out. I also commented the one in the pom.xml

            looking in /opt/myApp/data/author/logs it seems like we didn’t have any errors. Here is the last bit:

            INFO info.magnolia.context.LifeTimeJCRSessionUtil 11.10.2012 23:54:05 — Will handle lifetime sessions because the system context is of type interface info.magnolia.context.ThreadDependentSystemContext
            INFO info.magnolia.module.webapp.WebappVersionHandler 11.10.2012 23:54:07 — Content was not found in the repository, will bootstrap web-app.
            INFO info.magnolia.module.ui.ModuleManagerWebUI 11.10.2012 23:54:07 —
            *********************************************************************************************************
            * *
            * Magnolia needs module updates or installs, point your browser to your Magnolia instance and confirm ! *
            * *
            *********************************************************************************************************
            INFO info.magnolia.cms.i18n.DefaultMessagesManager 11.10.2012 23:54:07 — Loading i18n configuration – /server/i18n/system
            WARN info.magnolia.cms.i18n.DefaultMessagesManager 11.10.2012 23:54:07 — /server/i18n/system does not exist yet; skipping.
            INFO info.magnolia.cms.i18n.DefaultMessagesManager 11.10.2012 23:54:07 — Registering event listener for i18n
            INFO info.magnolia.cms.beans.config.MIMEMapping 11.10.2012 23:54:07 — Initializing MIMEMapping from /server/MIMEMapping
            WARN info.magnolia.cms.beans.config.MIMEMapping 11.10.2012 23:54:07 — No MIMEMapping info configured at /server/MIMEMapping
            INFO info.magnolia.cms.beans.config.MIMEMapping 11.10.2012 23:54:07 — Registering event listener for MIMEMapping
            INFO info.magnolia.cms.beans.config.ConfigLoader 11.10.2012 23:54:07 — Configuration loaded (took 20 seconds)
            INFO info.magnolia.cms.filters.FilterManagerImpl 11.10.2012 23:54:07 — Initializing filters
            INFO info.magnolia.cms.filters.CompositeFilter 11.10.2012 23:54:07 — Initializing filter [Wrapper for ClasspathSpool Servlet servlet]
            INFO info.magnolia.cms.filters.CompositeFilter 11.10.2012 23:54:07 — Initializing filter [install]

            It looks like it loaded with out error. When I hit the URL it did need /author just / gives a 500 error code.

            We are getting closer.

            So with /author I’m able to get to the install screen. When I hit install I get this:

            Magnolia can’t be used until you fix the following :

            Messages

            Magnolia Core Module (version 4.5.4)
            Workspace definition in workspace /opt/SocialChoringUI/data/author/repositories/magnolia/workspaces/userroles/workspace.xml references indexer which has changed; please remove the parameter ‘textFilterClasses’.

            Is this something I should change locally before deploying or is it on the server?

            Thanks for your help,

            Andrew

          • This looks like a remnant of a previous repository installed with 4.4; since you seem to just be installing a new instance, you can simply drop the whole /repository folder (or even the magnolia.home/data) – if not, you’ll have to manually edit the workspace.xml file for each workspace. I hope that’s covered in the 4.5 migration notes.
            This is because this post was written against 4.4; as such the jackrabbit-acme-prod.xml file I gave as an example has some configuration items which aren’t valid with 4.5 anymore (remember 4.5 updates Jackrabbit from 1.6 to 2.4) Have a look at the jackrabbit-* files shipped with 4.5, and hopefully you should be able to figure out the differences. Didn’t someone else in the comments have the same issue ?

            I’ll update the post at some point, or write an addendum.

  15. Hurray!! I removed the references to textFilterClasses in the workspaces.xml files and that got me through the install screen. I can login as superuser so it looks like I’m good for now.

    I’ll look at the jackrabbit files as you suggest.

    Thanks for all the help. Now I just have to go read all your posts.

    Andrew

  16. Hi Greg,
    I was able to get the author/ deployed installed and I went through the first templating tutorial. At the end of that we activate our WebSite pages. Following the advice above doesn’t seem to setup the public (ROOT) magnolia.

    So I went and removed all the textFilterClass references that were a problem.

    I got a bit tired of doing it one at a time so I just copied /opt/myApp/data/author/* to /opt/myApp/data/public/ Is that ok? I had put a few things in the repository doing the templating tutorial.

    My problem now is that I can’t get the public to load. I’m getting 404 when I hit / (ROOT) or /.magnolia/installer

    I can still load author and login to AdminCentral.

    The only problem I see is it can’t find a class for the Rss Aggregator but it cant do that for author either and it still works.

    Here is catalina.out:
    ———————————————
    MAGNOLIA LICENSE
    ———————————————
    Version number : 4.5.4
    Build : 27. July 2012 (rev. 7ca5cf3563d784f678ee23068c6aef0ab4cf1eee)
    Edition : Community Edition
    Provider : Magnolia International Ltd. (info@magnolia-cms.com)
    2012-10-19 15:41:53,626 INFO info.magnolia.cms.beans.config.ConfigLoader : Initializing content repositories
    2012-10-19 15:41:53,627 INFO info.magnolia.repository.DefaultRepositoryManager : Loading JCR
    2012-10-19 15:41:53,639 INFO info.magnolia.repository.DefaultRepositoryManager : Loading JCR magnolia
    2012-10-19 15:41:53,659 INFO info.magnolia.jackrabbit.ProviderImpl : Loading repository at /opt/SocialChoringUI/data/author/repositories/magnolia (config file: /opt/bitnami/apache-tomcat/webapps/author/WEB-INF/config/jackrabbit-SocialChoringUI-prod.xml) – cluster id: “”
    2012-10-19 15:42:13,767 INFO info.magnolia.context.LifeTimeJCRSessionUtil : Will handle lifetime sessions because the system context is of type interface info.magnolia.context.ThreadDependentSystemContext
    2012-10-19 15:42:15,894 INFO info.magnolia.module.webapp.WebappVersionHandler : Content was found in the repository, will not bootstrap web-app.
    2012-10-19 15:42:15,894 INFO info.magnolia.repository.DefaultRepositoryManager : Loading workspace imaging
    2012-10-19 15:42:15,915 WARN rg.apache.jackrabbit.core.query.lucene.SearchIndex: The textFilterClasses configuration parameter has been deprecated, and the configured value will be ignored: org.apache.jackrabbit.extractor.MsWordTextExtractor, org.apache.jackrabbit.extractor.MsExcelTextExtractor, org.apache.jackrabbit.extractor.MsPowerPointTextExtractor, org.apache.jackrabbit.extractor.PdfTextExtractor, org.apache.jackrabbit.extractor.OpenOfficeTextExtractor, org.apache.jackrabbit.extractor.RTFTextExtractor, org.apache.jackrabbit.extractor.HTMLTextExtractor, org.apache.jackrabbit.extractor.PlainTextExtractor, org.apache.jackrabbit.extractor.XMLTextExtractor
    2012-10-19 15:42:16,151 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-module-data-nodetypes.xml
    2012-10-19 15:42:16,153 INFO info.magnolia.repository.DefaultRepositoryManager : Loading workspace data
    2012-10-19 15:42:16,283 WARN rg.apache.jackrabbit.core.query.lucene.SearchIndex: The textFilterClasses configuration parameter has been deprecated, and the configured value will be ignored: org.apache.jackrabbit.extractor.MsWordTextExtractor, org.apache.jackrabbit.extractor.MsExcelTextExtractor, org.apache.jackrabbit.extractor.MsPowerPointTextExtractor, org.apache.jackrabbit.extractor.PdfTextExtractor, org.apache.jackrabbit.extractor.OpenOfficeTextExtractor, org.apache.jackrabbit.extractor.RTFTextExtractor, org.apache.jackrabbit.extractor.HTMLTextExtractor, org.apache.jackrabbit.extractor.PlainTextExtractor, org.apache.jackrabbit.extractor.XMLTextExtractor
    2012-10-19 15:42:16,647 INFO info.magnolia.repository.DefaultRepositoryManager : Loading workspace dms
    2012-10-19 15:42:16,736 WARN rg.apache.jackrabbit.core.query.lucene.SearchIndex: The textFilterClasses configuration parameter has been deprecated, and the configured value will be ignored: org.apache.jackrabbit.extractor.MsWordTextExtractor, org.apache.jackrabbit.extractor.MsExcelTextExtractor, org.apache.jackrabbit.extractor.MsPowerPointTextExtractor, org.apache.jackrabbit.extractor.PdfTextExtractor, org.apache.jackrabbit.extractor.OpenOfficeTextExtractor, org.apache.jackrabbit.extractor.RTFTextExtractor, org.apache.jackrabbit.extractor.HTMLTextExtractor, org.apache.jackrabbit.extractor.PlainTextExtractor, org.apache.jackrabbit.extractor.XMLTextExtractor
    2012-10-19 15:42:16,873 INFO info.magnolia.repository.DefaultRepositoryManager : Loading workspace templates
    2012-10-19 15:42:16,953 WARN rg.apache.jackrabbit.core.query.lucene.SearchIndex: The textFilterClasses configuration parameter has been deprecated, and the configured value will be ignored: org.apache.jackrabbit.extractor.MsWordTextExtractor, org.apache.jackrabbit.extractor.MsExcelTextExtractor, org.apache.jackrabbit.extractor.MsPowerPointTextExtractor, org.apache.jackrabbit.extractor.PdfTextExtractor, org.apache.jackrabbit.extractor.OpenOfficeTextExtractor, org.apache.jackrabbit.extractor.RTFTextExtractor, org.apache.jackrabbit.extractor.HTMLTextExtractor, org.apache.jackrabbit.extractor.PlainTextExtractor, org.apache.jackrabbit.extractor.XMLTextExtractor
    2012-10-19 15:42:17,119 INFO info.magnolia.repository.DefaultRepositoryManager : Loading workspace resources
    2012-10-19 15:42:17,223 WARN rg.apache.jackrabbit.core.query.lucene.SearchIndex: The textFilterClasses configuration parameter has been deprecated, and the configured value will be ignored: org.apache.jackrabbit.extractor.MsWordTextExtractor, org.apache.jackrabbit.extractor.MsExcelTextExtractor, org.apache.jackrabbit.extractor.MsPowerPointTextExtractor, org.apache.jackrabbit.extractor.PdfTextExtractor, org.apache.jackrabbit.extractor.OpenOfficeTextExtractor, org.apache.jackrabbit.extractor.RTFTextExtractor, org.apache.jackrabbit.extractor.HTMLTextExtractor, org.apache.jackrabbit.extractor.PlainTextExtractor, org.apache.jackrabbit.extractor.XMLTextExtractor
    2012-10-19 15:42:17,450 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-forum-nodetypes.xml
    2012-10-19 15:42:17,459 INFO info.magnolia.repository.DefaultRepositoryManager : Loading workspace forum
    2012-10-19 15:42:17,480 WARN rg.apache.jackrabbit.core.query.lucene.SearchIndex: The textFilterClasses configuration parameter has been deprecated, and the configured value will be ignored: org.apache.jackrabbit.extractor.MsWordTextExtractor, org.apache.jackrabbit.extractor.MsExcelTextExtractor, org.apache.jackrabbit.extractor.MsPowerPointTextExtractor, org.apache.jackrabbit.extractor.PdfTextExtractor, org.apache.jackrabbit.extractor.OpenOfficeTextExtractor, org.apache.jackrabbit.extractor.RTFTextExtractor, org.apache.jackrabbit.extractor.HTMLTextExtractor, org.apache.jackrabbit.extractor.PlainTextExtractor, org.apache.jackrabbit.extractor.XMLTextExtractor
    2012-10-19 15:42:18,305 INFO info.magnolia.module.ModuleManagerImpl : Initializing module core
    2012-10-19 15:42:18,312 INFO info.magnolia.module.ModuleManagerImpl : Starting module core
    2012-10-19 15:42:18,313 INFO info.magnolia.module.ModuleManagerImpl : Initializing module device-detection
    2012-10-19 15:42:18,350 INFO info.magnolia.module.ModuleManagerImpl : Starting module device-detection
    2012-10-19 15:42:18,350 INFO info.magnolia.module.ModuleManagerImpl : Initializing module rendering
    2012-10-19 15:42:18,358 INFO info.magnolia.module.ModuleManagerImpl : Starting module rendering
    2012-10-19 15:42:36,677 INFO info.magnolia.module.ModuleManagerImpl : Initializing module adminInterface
    2012-10-19 15:42:38,955 INFO info.magnolia.module.ModuleManagerImpl : Starting module adminInterface
    2012-10-19 15:42:46,151 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/pages] is of type content.
    2012-10-19 15:42:46,151 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/controls] is of type content.
    2012-10-19 15:42:46,152 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/teasers] is of type content.
    2012-10-19 15:42:46,289 INFO info.magnolia.module.ModuleManagerImpl : Initializing module templating
    2012-10-19 15:42:46,289 INFO info.magnolia.module.ModuleManagerImpl : Initializing module exchange-simple
    2012-10-19 15:42:46,293 INFO info.magnolia.module.ModuleManagerImpl : Initializing module fckEditor
    2012-10-19 15:42:46,400 INFO info.magnolia.module.ModuleManagerImpl : Initializing module magnolia-templating-editor
    2012-10-19 15:42:46,400 INFO info.magnolia.module.ModuleManagerImpl : Initializing module mail
    2012-10-19 15:42:46,745 INFO info.magnolia.module.ModuleManagerImpl : Starting module mail
    2012-10-19 15:42:46,745 INFO info.magnolia.module.ModuleManagerImpl : Initializing module scheduler
    2012-10-19 15:42:46,749 INFO info.magnolia.module.ModuleManagerImpl : Starting module scheduler
    2012-10-19 15:42:46,876 INFO info.magnolia.module.ModuleManagerImpl : Initializing module store-client
    2012-10-19 15:42:46,891 INFO info.magnolia.module.ModuleManagerImpl : Initializing module templating-jsp
    2012-10-19 15:42:46,891 INFO info.magnolia.module.ModuleManagerImpl : Initializing module cache
    2012-10-19 15:42:49,278 INFO info.magnolia.module.ModuleManagerImpl : Starting module cache
    2012-10-19 15:42:49,282 WARN net.sf.ehcache.config.ConfigurationFactory : No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/opt/bitnami/apache-tomcat/webapps/author/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml
    2012-10-19 15:42:49,404 INFO info.magnolia.module.ModuleManagerImpl : Initializing module form
    2012-10-19 15:42:49,640 INFO info.magnolia.module.ModuleManagerImpl : Initializing module imaging
    2012-10-19 15:42:49,768 INFO info.magnolia.module.ModuleManagerImpl : Initializing module data
    Could not find fetcher.properties on classpath
    2012-10-19 15:42:50,109 INFO info.magnolia.module.ModuleManagerImpl : Starting module data
    2012-10-19 15:42:50,378 INFO info.magnolia.module.ModuleManagerImpl : Initializing module dms
    2012-10-19 15:42:50,434 INFO info.magnolia.module.ModuleManagerImpl : Initializing module inplace-templating
    2012-10-19 15:42:50,527 INFO info.magnolia.module.ModuleManagerImpl : Initializing module public-user-registration
    2012-10-19 15:42:50,714 INFO info.magnolia.module.ModuleManagerImpl : Initializing module resources
    2012-10-19 15:42:50,717 INFO info.magnolia.module.ModuleManagerImpl : Initializing module forum
    2012-10-19 15:42:50,925 INFO info.magnolia.module.ModuleManagerImpl : Initializing module rssaggregator
    2012-10-19 15:42:50,974 WARN gnolia.content2bean.impl.Content2BeanProcessorImpl: can’t resolve class for node /modules/rssaggregator/config/feedGenerators/category
    java.lang.ClassNotFoundException: info.magnolia.module.categorization.syndication.CategorySyndicator
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at info.magnolia.objectfactory.DefaultClassFactory.forName(DefaultClassFactory.java:55)
    at info.magnolia.content2bean.impl.Content2BeanTransformerImpl.resolveType(Content2BeanTransformerImpl.java:128)
    at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:91)
    at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toMap(Content2BeanProcessorImpl.java:196)
    at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:108)
    at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toMap(Content2BeanProcessorImpl.java:196)
    at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.setProperties(Content2BeanProcessorImpl.java:165)
    at info.magnolia.content2bean.Content2BeanUtil.setProperties(Content2BeanUtil.java:281)
    at info.magnolia.content2bean.Content2BeanUtil.setProperties(Content2BeanUtil.java:273)
    at info.magnolia.content2bean.Content2BeanUtil.setProperties(Content2BeanUtil.java:250)
    at info.magnolia.module.ModuleManagerImpl.populateModuleInstance(ModuleManagerImpl.java:449)
    at info.magnolia.module.ModuleManagerImpl.startModules(ModuleManagerImpl.java:334)
    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:246)
    at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:443)
    at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:440)
    at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:403)
    at info.magnolia.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:243)
    at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:169)
    at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:126)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2012-10-19 15:42:51,283 INFO info.magnolia.module.ModuleManagerImpl : Initializing module standard-templating-kit
    2012-10-19 15:42:55,380 INFO info.magnolia.module.ModuleManagerImpl : Stopping module adminInterface
    2012-10-19 15:42:55,990 INFO info.magnolia.module.ModuleManagerImpl : Starting module adminInterface
    2012-10-19 15:42:56,962 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/pages] is of type content.
    2012-10-19 15:42:56,963 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/controls] is of type content.
    2012-10-19 15:42:56,966 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/teasers] is of type content.
    2012-10-19 15:42:57,921 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/pages] is of type content.
    2012-10-19 15:42:57,930 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/controls] is of type content.
    2012-10-19 15:42:57,930 WARN dule.admininterface.ConfiguredDialogHandlerManager: Dialog definitions should be of type contentNode but [/modules/standard-templating-kit/dialogs/generic/teasers] is of type content.
    2012-10-19 15:43:01,651 INFO info.magnolia.module.ModuleManagerImpl : Initializing module SocialChoringUI
    2012-10-19 15:43:01,653 INFO info.magnolia.module.ModuleManagerImpl : Initializing module webapp
    2012-10-19 15:43:01,762 INFO info.magnolia.cms.beans.config.VirtualURIManager : Loading VirtualURIMapping from /modules/adminInterface/virtualURIMapping
    2012-10-19 15:43:01,984 INFO info.magnolia.cms.beans.config.VirtualURIManager : Loading VirtualURIMapping from /modules/exchange-simple/virtualURIMapping
    2012-10-19 15:43:02,119 INFO info.magnolia.cms.beans.config.VirtualURIManager : Loading VirtualURIMapping from /modules/cache/virtualURIMapping
    2012-10-19 15:43:03,713 INFO info.magnolia.cms.gui.dialog.ControlsManager : Loading dialog controls configuration from /modules/adminInterface/controls
    2012-10-19 15:43:03,944 INFO info.magnolia.cms.gui.dialog.ControlsManager : Loading dialog controls configuration from /modules/fckEditor/controls
    2012-10-19 15:43:03,955 INFO info.magnolia.cms.gui.dialog.ControlsManager : Loading dialog controls configuration from /modules/data/controls
    2012-10-19 15:43:04,045 INFO info.magnolia.cms.gui.dialog.ControlsManager : Loading dialog controls configuration from /modules/dms/controls
    2012-10-19 15:43:04,071 INFO info.magnolia.cms.gui.dialog.ControlsManager : Loading dialog controls configuration from /modules/standard-templating-kit/controls
    2012-10-19 15:43:04,558 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler users
    2012-10-19 15:43:04,559 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler config
    2012-10-19 15:43:04,560 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler website
    2012-10-19 15:43:04,561 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler userroles
    2012-10-19 15:43:04,561 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler usergroups
    2012-10-19 15:43:04,561 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler usersAdmin
    2012-10-19 15:43:04,562 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler usersSystem
    2012-10-19 15:43:04,562 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler website-jcr
    2012-10-19 15:43:04,632 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler imaging
    2012-10-19 15:43:04,656 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler data
    2012-10-19 15:43:04,657 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler dataType
    2012-10-19 15:43:04,662 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler RssAggregator
    2012-10-19 15:43:04,663 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler Contact
    2012-10-19 15:43:04,673 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler dms
    2012-10-19 15:43:04,682 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler templates
    2012-10-19 15:43:04,752 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler usersPublic
    2012-10-19 15:43:04,763 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler resources
    2012-10-19 15:43:04,773 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler forum
    2012-10-19 15:43:04,875 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler stkSite
    2012-10-19 15:43:04,876 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler stkThemes
    2012-10-19 15:43:04,882 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler stkDialogs
    2012-10-19 15:43:04,882 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler stkChannels
    2012-10-19 15:43:04,882 INFO .magnolia.module.admininterface.TreeHandlerManager: Registering tree handler stkTemplateDefs
    2012-10-19 15:43:04,882 INFO info.magnolia.cms.i18n.DefaultMessagesManager : Loading i18n configuration – /server/i18n/system
    2012-10-19 15:43:05,240 INFO info.magnolia.cms.i18n.DefaultMessagesManager : Registering event listener for i18n
    2012-10-19 15:43:05,242 INFO info.magnolia.cms.beans.config.MIMEMapping : Initializing MIMEMapping from /server/MIMEMapping
    2012-10-19 15:43:07,863 INFO info.magnolia.cms.beans.config.MIMEMapping : Registering event listener for MIMEMapping
    2012-10-19 15:43:07,864 INFO info.magnolia.cms.beans.config.ConfigLoader : Configuration loaded (took 74 seconds)
    2012-10-19 15:43:11,247 INFO info.magnolia.cms.filters.FilterManagerImpl : Initializing filters
    2012-10-19 15:43:11,248 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [context]
    2012-10-19 15:43:11,250 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [contentType]
    2012-10-19 15:43:11,250 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [deviceDetection]
    2012-10-19 15:43:11,250 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [multipartRequest]
    2012-10-19 15:43:11,250 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [unicodeNormalization]
    2012-10-19 15:43:11,251 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [login]
    2012-10-19 15:43:11,251 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [activation]
    2012-10-19 15:43:11,251 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [gzip]
    2012-10-19 15:43:11,251 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [channel]
    2012-10-19 15:43:11,251 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [siteMerge]
    2012-10-19 15:43:11,251 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [logout]
    2012-10-19 15:43:11,252 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [securityCallback]
    2012-10-19 15:43:11,252 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [uriSecurity]
    2012-10-19 15:43:11,252 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [range]
    2012-10-19 15:43:11,252 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [i18n]
    2012-10-19 15:43:11,252 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [cache]
    2012-10-19 15:43:11,253 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [virtualURI]
    2012-10-19 15:43:11,253 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [servlets]
    2012-10-19 15:43:11,253 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for ClasspathSpoolServlet servlet]
    2012-10-19 15:43:11,255 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for log4j servlet]
    2012-10-19 15:43:11,257 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for AdminTreeServlet servlet]
    2012-10-19 15:43:11,259 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for DialogServlet servlet]
    2012-10-19 15:43:11,259 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for PageServlet servlet]
    2012-10-19 15:43:11,260 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for FCKEditorSimpleUploadServlet servlet]
    2012-10-19 15:43:11,262 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for PageEditorServlet servlet]
    2012-10-19 15:43:11,263 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for ImagingServlet servlet]
    2012-10-19 15:43:11,265 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for DMSDownloadServlet servlet]
    2012-10-19 15:43:11,266 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [Wrapper for FeedSyndicationServlet servlet]
    2012-10-19 15:43:11,269 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [cms]
    2012-10-19 15:43:11,269 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [repositoryMapping]
    2012-10-19 15:43:11,269 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [contentSecurity]
    2012-10-19 15:43:11,269 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [aggregator]
    2012-10-19 15:43:11,270 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [intercept]
    2012-10-19 15:43:11,270 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [modelExecution]
    2012-10-19 15:43:11,270 INFO info.magnolia.cms.filters.CompositeFilter : Initializing filter [rendering]
    Oct 19, 2012 3:43:11 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    Oct 19, 2012 3:43:11 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/110 config=null
    Oct 19, 2012 3:43:11 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 192051 ms

    I’m not sure what that config=null 3 lines from the end means. It looks like it loaded correctly to my untrained eye.

    The only logs I know of are:
    1) tomcat/logs
    2) /opt/myApp/data/author/logs
    3) /opt/myApp/data/public/logs

    Should I be trying to fix the WARNS?

    Any help would be greatly appreciated. I’m closing in on a week with out being able to register any Users to the app.

    Thanks for all your help,

    Andrew

  17. Hi Greg,
    If we build our project like this does that mean instead of installing modules we just add the dependency to our “inner” pom.xml? And then build the module into our war file. I hope that is correct.

    If that is the case do you have a wiki page that has the maven dependencies listed?
    Open mind labs does a nice job of providing the maven dependency on the quick links:
    http://www.openmindlab.com/lab/products/controls.html

    Cheers,

    Andrew

  18. It seems that jackrabbit-memory-search.xml doesn’t work with a magnolia.home different than ${magnolia.app.rootdir}. The error is that somehow jackrabbit doesn’t recognice the repository so it says: Magnolia needs module updates or installs when magnolia is restarted (and indeed the repository data gets wiped).
    Actually the behaviour is quite strange:
    Case 1:
    - empty data dir
    - jackrabbit-memory-search.xml
    - result: error
    Case 2:
    - after case1 modifying the magnolia.repositories.jackrabbit.config only to jackrabbit-bundle-derby-search.xml
    - result: error
    Case 3:
    - empty data dir
    - jackrabbit-bundle-derby-search.xml
    - result: no error
    Case 4:
    - after Case 3 modifying the magnolia.repositories.jackrabbit.config only to jackrabbit-memory-search.xml
    - result: no error

    • Peter, the whole point of the in-memory PersistenceManager is that it is .. in memory It won’t persist data across server restarts, so yes, Magnolia will claim it needs installs-or-updates

      • Thanks for the answer. Actually I thought that only search indexes are kept in memory. Still strange that choosing in-memory ever, prevents changing to derby afterwards unless deleting the application home directory. I hope this info will save some debugging hours in case someone else also meets the problem.

    • Hmm I think so, but I’ve never tried recently, tbh. You can select artifacts to deploy… in the “deployment”, I think ?

  19. hi,

    I have a magnolia (4.4.5 on tomcat 6) site running which has been setup following your instructions. so far it seems like everything is running fine, however, the problem is, when I try to update.

    I tried the following:
    1. stop tomcat and replace the .war file. delete the unpacked folders in webapps directory. restart tomcat. this leads to the error message:
    WARNING: A docBase C:\code\test-tomcats\apache-tomcat-6.0.37\webapps\rf\data\ch\ch-website-webapp-1.0.war inside the host appBase has be
    en specified, and will be ignored
    sep 12, 2013 4:05:47 PM org.apache.catalina.core.StandardContext resourcesStart
    SEVERE: Error starting static Resources
    java.lang.IllegalArgumentException: Document base C:\code\test-tomcats\apache-to
    mcat-6.0.37\webapps\author does not exist or is not a readable directory

    the same happens for the public instance.

    2. stop tomcat and replace .war, but do not remove unpacked dirs. restart tomcat. in this case, I get this warning (again) and the new .war file is simply ignored:
    WARNING: A docBase C:\code\test-tomcats\apache-tomcat-6.0.37\webapps\rf\data\ch\ch-website-webapp-1.0.war inside the host appBase has be
    en specified, and will be ignored

    Could you help me out, please? Thanks!

      • Magnolia configuration module fails on servletContext.getRealPath

        If you read JavaDocs for getRealPath it clearly states that it could return null. So it is obvious that your code is not ready for this condition and just assumes that there will be no null.

        I found this issue when I downloaded the latest Magnolia WAR file and deployed it into OpenShift Tomcat 7 without any modification.

      • Instead of getRealPath you can use getResourceAsStream and you will be able to read all your config files with no issues even if WAR file is not expanded.

  20. @Viacheslav: I don’t think this is the problem as our module doesn’t write anything and should just simply be deployed by tomcat.

    @Grégory: Do you have any hints regarding my issue? I should mention that I’m running on Windows and that permissions to the folder are set correctly…

  21. it turned out to be a windows issue, ‘c:’ was missing in front of all paths. however, I finally got my linux box running, so this issue is gone now.

  22. Thank you so much for these three posts, I have finally got my own two instances of magnolia (public and author) running in localhost. I had some problems becouse I’m using version 5.0.4 of Magnolia, but finally I have fixed all the problems. This is my environment:
    - Ubuntu
    - IDE Eclipse Juno (with maven plugin)
    - MySQL DB

  23. Can you tell me how magnolia pom.xml generates two war file one for author and one for public. Or it is generating only one war file ?

    I am asking in terms of war file generation. how they differ from each other ?

    My question may be irrelavent, kindly execuse me for this.

    Thank you.

    • Hi Vinit

      Indeed it generates only one war file. They’re the same, that’s the point of this article. I suppose it’s not clear Magnolia will pickup the correct configuration file at runtime based on the environment it’s running in, but all your deployments should deploy the same war file. (ideally)

      • Thank you for quick and comprehensive response. you cleared my all doubts, it is same and based on context name, reading from respective database(using jackrabbit mysql datasource).

  24. Hi,

    I want to connect Magnolia project with Mongo DB . I am not sure if it is possible at all . If yes, Would the process be the same for Mongo DB or I need to make some other changes .

    Thanks,
    Nadeem

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>