kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
62 stars 63 forks source link

3.0.0-beta.1: Exception at startup #1986

Closed funkyfuture closed 4 years ago

funkyfuture commented 5 years ago

the following is logged when a Production instance is started:

12-Nov-2018 12:30:51.718 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.34
12-Nov-2018 12:30:51.731 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/kitodo]
12-Nov-2018 12:31:08.471 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
ClassLoaderLeakPreventorListener: Settings for se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorListener (CL: 0x74109a96):
ClassLoaderLeakPreventorListener:   stopThreads = true
ClassLoaderLeakPreventorListener:   stopTimerThreads = true
ClassLoaderLeakPreventorListener:   executeShutdownHooks = true
ClassLoaderLeakPreventorListener:   threadWaitMs = 5000 ms
ClassLoaderLeakPreventorListener:   shutdownHookWaitMs = 10000 ms
12-Nov-2018 12:31:09.304 INFO [localhost-startStop-1] se.jiderhamn.classloader.leak.prevention.JULLogger.info Initializing by loading some known offenders with leak safe classloader
12-Nov-2018 12:31:09.738 SEVERE [localhost-startStop-1] se.jiderhamn.classloader.leak.prevention.JULLogger.error null
 java.lang.NullPointerException
    at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
    at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
    at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
    at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
    at sun.font.SunFontManager$2.run(SunFontManager.java:431)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.SunFontManager.<init>(SunFontManager.java:376)
    at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
    at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
    at sun.font.SunFontManager.getInstance(SunFontManager.java:250)
    at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
    at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1107)
    at javax.swing.JComponent.getFontMetrics(JComponent.java:1617)
    at javax.swing.text.WrappedPlainView.updateMetrics(WrappedPlainView.java:318)
    at javax.swing.text.WrappedPlainView.updateChildren(WrappedPlainView.java:297)
    at javax.swing.text.WrappedPlainView.insertUpdate(WrappedPlainView.java:463)
    at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1610)
    at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1869)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
    at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
    at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
    at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
    at javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:273)
    at javax.swing.JEditorPane.setText(JEditorPane.java:1416)
    at javax.swing.JEditorPane.<init>(JEditorPane.java:290)
    at se.jiderhamn.classloader.leak.prevention.preinit.SunAwtAppContextInitiator.doOutsideClassLoader(SunAwtAppContextInitiator.java:21)
    at se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor$1.run(ClassLoaderLeakPreventor.java:97)
    at se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor$2.run(ClassLoaderLeakPreventor.java:123)
    at java.security.AccessController.doPrivileged(Native Method)
    at se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor.doInLeakSafeClassLoader(ClassLoaderLeakPreventor.java:120)
    at se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor.runPreClassLoaderInitiators(ClassLoaderLeakPreventor.java:93)
    at se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorListener.contextInitialized(ClassLoaderLeakPreventorListener.java:224)
    at se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventionContainerInitializer.onStartup(ClassLoaderLeakPreventionContainerInitializer.java:20)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
mproduction_1     |
12-Nov-2018 12:31:09.743 WARNING [localhost-startStop-1] se.jiderhamn.classloader.leak.prevention.JULLogger.warn Consider adding -Djava.awt.headless=true to your JVM parameters

the setting that is mentioned in the last line is set with JAVA_OPTS and CATALINA_OPTS. i don't know whether this error has any effects.

Kathrin-Huber commented 5 years ago

I can not reproduce this error, is it still a problem?

matthias-ronge commented 4 years ago

As I see it, it's because the Tomcat's JVM is not running in headless mode. Please adjust your Tomcat start settings and add -Djava.awt.headless=true to the JVM arguments. (I read that, alternatively, you can install the package libfontconfig1 using apt-get, which can also fix this.)

funkyfuture commented 4 years ago

i stopped evaluation kitodo a while ago. and i don't remember how i deployed it and how the docs could be improved in this regard.