Fedora 3.8.0 fails to start under Tomcat7

113 views
Skip to first unread message

David House

unread,
Feb 2, 2015, 3:54:05 PM2/2/15
to fedora-c...@googlegroups.com

Friends,


I've installed Ubuntu server 14.04, Tomcat7 (7.0.52) running Oracle JVM (1.7.0_75-b13), mySQL, etc., and have been trying to get Fedora (3.8.0 Spring Configuration) to start up following successfully installing it. I am innocent of any useful information about Java, new to Tomcat, and as yet uninitiated in Fedora, with which I hope to ultimately have Islandora running. I have searched for, found and implemented information on how to gain as much information as possible from the logs (further info on request), and catalina.out reports:

Feb 02, 2015 12:16:46 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14454 ms
Feb 02, 2015 12:20:19 PM org.apache.catalina.core.StandardContext listenerStart
FINE:  Configuring event listener class 'org.apache.catalina.deploy.ApplicationListener@6675f661'
Feb 02, 2015 12:20:19 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.fcrepo.server.utilities.LogSetupContextListener
java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:299)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
    at org.fcrepo.server.utilities.LogSetupContextListener.<clinit>(LogSetupContextListener.java:36)
        [...]
    at java.lang.Thread.run(Thread.java:745)

Feb 02, 2015 12:20:19 PM org.apache.catalina.core.StandardContext listenerStart
FINE:  Configuring event listener class 'org.apache.catalina.deploy.ApplicationListener@763d94d0'
Feb 02, 2015 12:20:19 PM org.apache.catalina.core.StandardContext listenerStart
FINE:  Configuring event listener class 'org.apache.catalina.deploy.ApplicationListener@3c78e593'
Feb 02, 2015 12:20:19 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Feb 02, 2015 12:20:19 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart



What is wrong? I would appreciate any help offered.


d.
--
David William House
"The Complete Biogas Handbook" www.completebiogas.com
Vahid Biogas, an alternative energy consultancy www.vahidbiogas.com

"Make no search for water.       But find thirst,
And water from the very ground will burst."
(Rumi, a Persian mystic poet, quoted in Delight of Hearts, p. 77)

http://bahai.us/

Benjamin Armintor

unread,
Feb 2, 2015, 4:34:02 PM2/2/15
to David House, fedora-c...@googlegroups.com
It looks like there's more than 1 copy of the slf4j API jar on your classpath. Are there any jar files in the form of slf4j-api-X.Y.Z.jar in your TOMCAT_HOME/lib directory?

- Ben

--
You received this message because you are subscribed to the Google Groups "Fedora Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fedora-communi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Benjamin Armintor

unread,
Feb 2, 2015, 7:50:42 PM2/2/15
to David House, fedora-c...@googlegroups.com
If you ran the installer, that file should exist in whatever directory your FEDORA_HOME was set to.

Looking at the locations of the JAR files you posted, I assume that FEDORA_HOME was /usr/share/fedora at installation, but it appears to be /opt/fedora at runtime. Can you confirm your environment?

- Ben

On Mon, Feb 2, 2015 at 7:40 PM, David House <da...@completebiogas.com> wrote:

Benjamin,

Thank you for your response.

On 2/2/2015 1:33 PM, Benjamin Armintor wrote:
It looks like there's more than 1 copy of the slf4j API jar on your classpath. Are there any jar files in the form of slf4j-api-X.Y.Z.jar in your TOMCAT_HOME/lib directory?

Apparently a number of such JARs exist (if that's the correct term), for three apps besides Fedora, along with one in the more generic folder under /usr/share/tomcat7 ($TOMCAT_HOME) references the API:

david$ [/] find -iname "slf4j*" 2>/dev/null [results edited]

./var/lib/tomcat7/webapps/fedora/WEB-INF/lib/slf4j-api-1.7.2.jar
./usr/share/fedora/client/lib/slf4j-api-1.7.2.jar
./usr/share/tomcat7/lib/slf4j-api-1.7.6.jar

Based on the inference of your question, I renamed the two apparently identical (based on name and size @26083) slf4j API files in the fedora-specific folders (perhaps ignorantly; because they were apparently a bit older @ 1.7.2 than 1.7.6), and tried again. Thus:

INFO: Starting service Catalina
Feb 02, 2015 4:21:29 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
[...]
Feb 02, 2015 4:21:30 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/fedora.xml
Feb 02, 2015 4:21:38 PM org.apache.catalina.core.StandardContext listenerStart
FINE:  Configuring event listener class 'org.apache.catalina.deploy.ApplicationListener@7b930449'
log4j:ERROR A "org.apache.log4j.PatternLayout" object is not assignable to a "org.apache.log4j.Layout" variable.
log4j:ERROR The class "org.apache.log4j.Layout" was loaded by
log4j:ERROR [org.apache.catalina.loader.StandardClassLoader@63350ff8] whereas object of type
log4j:ERROR "org.apache.log4j.PatternLayout" was loaded by [WebappClassLoader
  context: /fedora
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@63b55818
].
Feb 02, 2015 4:21:38 PM org.apache.catalina.core.StandardContext listenerStart
FINE:  Configuring event listener class 'org.apache.catalina.deploy.ApplicationListener@56111453'
Feb 02, 2015 4:21:38 PM org.apache.catalina.core.StandardContext listenerStart
FINE:  Configuring event listener class 'org.apache.catalina.deploy.ApplicationListener@4d9d109b'
Feb 02, 2015 4:21:38 PM org.apache.catalina.core.StandardContext listenerStart
FINE: Sending application start events
Feb 02, 2015 4:21:39 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.fcrepo.server.utilities.LogSetupContextListener
java.lang.NoClassDefFoundError: ch/qos/logback/classic/LoggerContext
    at org.fcrepo.server.utilities.LogSetupContextListener.contextInitialized(LogSetupContextListener.java:51)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
                    [...]
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.LoggerContext
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
    ... 14 more

Feb 02, 2015 4:21:39 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:ERROR No layout set for the appender named [stderr].
Feb 02, 2015 4:21:41 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: /opt/fedora/server/config/spring/web/web.properties (No such file or directory)
    at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
                    [...]
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: /opt/fedora/server/config/spring/web/web.properties (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at java.io.FileInputStream.<init>(FileInputStream.java:101)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:124)
    at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
    at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
    at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
    ... 19 more

Feb 02, 2015 4:21:41 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Feb 02, 2015 4:21:41 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/fedora] startup failed due to previous errors




d.
--
David William House
Reply all
Reply to author
Forward
0 new messages