AnsweredAssumed Answered

Deploying .WARs to an existing Tomcat installation

Question asked by matt.bennett on Nov 18, 2010
Latest reply on Dec 3, 2010 by matt.bennett
Hello,

I have succeeded in installing a Alfresco Community 3.3 using the Linux and OS X installers, but I'm struggling to create a deployment into an existing Tomcat instance. There are several scant forum topics on the subject e.g. [1], and I'm new to Tomcat, but there does not seem to be a definitive guide on how to achieve this. I'm not sure what needs copying and to where.

I started with a clean Debian Lenny machine, and apt-get install'd sun-java6-jdk, tomcat5.5 and all the other dependencies. I compiled swftools-0.9.1 from source. We have a separate MySQL server which will be used for Alfresco's data.

Following the guide at [2], section "Installing the Alfresco WAR on any platform", I grabbed alfresco-community-war-3.3.tar.gz and duly copied the .war files into /var/lib/tomcat5.5/webapps. Upon restarting the server, Tomcat barfed an enormous mess into my syslog, beginning:

Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.security.AccessController.checkPermission(AccessController.java:546)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.Thread.setContextClassLoader(Thread.java:1351)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager$Cleaner.<init>(LogManager.java:206)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager$Cleaner.<init>(LogManager.java:200)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager.<init>(LogManager.java:237)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.juli.ClassLoaderLogManager.<init>(ClassLoaderLogManager.java:44)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.Class.newInstance0(Class.java:355)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.Class.newInstance(Class.java:308)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager$1.run(LogManager.java:166)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.security.AccessController.doPrivileged(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager.<clinit>(LogManager.java:158)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.Logger.getLogger(Logger.java:273)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.java:181)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.Jdk14Logger.<init>(Jdk14Logger.java:61)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.Class.newInstance0(Class.java:355)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.Class.newInstance(Class.java:308)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:139)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: Can't load log handler "1catalina.org.apache.juli.FileHandler"
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.security.AccessController.doPrivileged(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager$3.run(LogManager.java:359)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.security.AccessController.doPrivileged(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:346)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager.addLogger(LogManager.java:447)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager$1.run(LogManager.java:182)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.security.AccessController.doPrivileged(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.LogManager.<clinit>(LogManager.java:158)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.util.logging.Logger.getLogger(Logger.java:273)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.java:181)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.Jdk14Logger.<init>(Jdk14Logger.java:61)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.Class.newInstance0(Class.java:355)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at java.lang.Class.newInstance(Class.java:308)
Nov 18 17:50:24 alfresco01-ss-imn jsvc.exec[5026]: #011at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:139)

I didn't copy anything in to /var/lib/tomcat5.5/shared/classes/ or /var/lib/tomcat5.5/shared/lib/, nor do I have an alfresco-global.properties file yet. I figured if there was no MySQL connector the traceback would have been something along those line…

Have I done something fundamentally wrong? Is there any better documentation than [2] hiding somewhere?

Many thanks,
Matt.

[1] http://forums.alfresco.com/en/viewtopic.php?t=14703
[2] http://www2.alfresco.com/e/1234/4-2009-10-05-F2TF5-1234-43621-/MUSXR/315847155 (via http://www.alfresco.com/community/resources/documentation/)

Outcomes