ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Back to topics

Discuss Features

Error installing Centric CRM

You need to be logged in to post messages

Error installing Centric CRM

2/17/2008 3:16 PM EST

Hello,

I'm trying to install Centric CRM on a Tomcat Virtual Appliance from http://virtualappliances.net/ but I always get this errors on the log file

Feb 17, 2008 2:57:33 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive centric.war
Feb 17, 2008 2:57:39 PM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive centric.war
org.apache.commons.logging.LogConfigurationException: java.lang.ExceptionInInitializerError (Caused by java.lang.ExceptionInInitializerError)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:538)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:380)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4114)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:737)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:497)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1204)
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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1377)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:213)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
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.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:177)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ExceptionInInitializerError
at org.apache.log4j.Logger.getLogger(Logger.java:94)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:65)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 51 more
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /logs/CentricCRM.log write)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:962)
at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:273)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:156)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:152)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
... 59 more

I must confess that I don't know Java and all my searches on this forums and on Google havn't been sucessfully.

Any help would be apreciated.

Regards,

Adelino

1. 2/17/2008 10:48 PM EST
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

This boils down to a permission error:
java.io.FilePermission /logs/CentricCRM.log write

There is a default setting for where logs are written to and this setting doesn't work because the user in which Tomcat is running probably doesn't have a home directory.

In the log4j properties, the setting is:
$/logs/CentricCRM.log
Can someone propose a better default?

One other problem you will find with running without a home directory is the Java Preferences API will fail... there is a post about a fix for that too.

2. 2/18/2008 8:13 PM EST

Matt Rajkowski wrote:
This boils down to a permission error:
java.io.FilePermission /logs/CentricCRM.log write

There is a default setting for where logs are written to and this setting doesn't work because the user in which Tomcat is running probably doesn't have a home directory.

In the log4j properties, the setting is:
$/logs/CentricCRM.log
Can someone propose a better default?

One other problem you will find with running without a home directory is the Java Preferences API will fail... there is a post about a fix for that too.


Thanks for your quick response!

As far as I can see from the passwd file, Tomcat runs under the tomcat55 user that has the home directory in /usr/share/tomcat55 and with the logs subfolder in it.
In order to guarantee that tomcat could write the file I created a CentricCRM.log file with 777 permissions. I stoped Tomcat, removed the webapps/centric folder and restarted Tomcat.

Needless to say that I had no luck and I'm still stuck with this.

I'm already using the hosted version but I'm really interested in running this software locally. Could anyone help me a little further?

Thanks!

3. 2/19/2008 12:08 AM EST

/usr/share/tomcat55 is your catalina_home, similar to /usr/share/java is your java_home, but it's not a home directory of a linux user account on that system. Log4j is configured to write to a logs directory in the system user account that launched the process. In linux, user directories will be found in the /home folder, so check what users exist in there. The virtualappliances.net documentation may have more information about the user tomcat runs under.

Also the following reference has a good section on users and groups in unix type systems
http://neolectric.com/dxp/config/apache-tomcat-config.html

Hope this helps,

Lorraine

4. 2/19/2008 7:20 AM EST

Lorraine Bittner wrote:
/usr/share/tomcat55 is your catalina_home, similar to /usr/share/java is your java_home, but it's not a home directory of a linux user account on that system. Log4j is configured to write to a logs directory in the system user account that launched the process. In linux, user directories will be found in the /home folder, so check what users exist in there. The virtualappliances.net documentation may have more information about the user tomcat runs under.<snip/>


Stating that /usr/share/tomcat55 is definitely not tomcat's home dir is incorrect. Any user can have their "home" dir anywhere on the system. It is configured in /etc/passwd. There is no rule that home dirs should go under /home. In fact, only "real users" should have home directories in there. Apache for example, usually runs as the user "nobody" or "apache" and does not have a home directory at all or does it allow "logins".

FWIW my tomcat process has a home dir and it is under /var/lib/tomcat. That's my choice.

Also, the tomcat process usually runs as root, unless you start it with jsvc. Type ps -Af to see what user owns the tomcat process.

5. 2/19/2008 9:45 AM EST

Thanks for the correction Alan, but I don't think that tomcat is running as root though since the Log exception is being thrown. I would definitely try to find the owner of the process as Alan suggested, and if it is root we know that this is no longer a file permission problem since root can read/write anywhere on the system.

5 results found