Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1353999 - CNFE when running thermostat web-storage-service with jetty 9.4.0.M0
Summary: CNFE when running thermostat web-storage-service with jetty 9.4.0.M0
Alias: None
Product: Fedora
Classification: Fedora
Component: thermostat
Version: 25
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Severin Gehwolf
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-07-08 16:32 UTC by Severin Gehwolf
Modified: 2016-10-09 02:54 UTC (History)
8 users (show)

Fixed In Version: thermostat-1.6.4-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-10-09 02:54:24 UTC

Attachments (Terms of Use)
Proposed fix which works for us. (deleted)
2016-07-08 16:32 UTC, Severin Gehwolf
no flags Details | Diff

System ID Priority Status Summary Last Updated
Icedtea Bugzilla 3125 None None None Never

Description Severin Gehwolf 2016-07-08 16:32:45 UTC
Created attachment 1177703 [details]
Proposed fix which works for us.

Description of problem:
This is an upstream bug in upcoming jetty 9.4.0. Caused by this refactoring:

Version-Release number of selected component (if applicable):
$ rpm -q jetty-server
$ rpm -q thermostat

How reproducible:

Steps to Reproduce:
1. dnf install thermostat-webapp (A mock setup will do too)
2. echo -e 'yes\nm\nm\nm\nc\nc\nc\na\na\na' | thermostat setup -c
3. thermostat web-storage-service

Actual results:
starting storage server...
server listening on ip: mongodb://
log file is here: /root/.thermostat-1.6/logs/db.log
pid: 8285
2016-07-08 15:01:52.035:INFO::Thread-3: Logging initialized @1374ms
2016-07-08 15:01:52.083:INFO:oejs.Server:Thread-3: jetty-9.4.0.M0
2016-07-08 15:01:52.083:WARN:oejs.Server:Thread-3: THIS IS NOT A STABLE RELEASE! DO NOT USE IN PRODUCTION!
2016-07-08 15:01:52.083:WARN:oejs.Server:Thread-3: Download a stable release from
2016-07-08 15:01:52.092:WARN:oejw.WebAppContext:Thread-3: Failed startup of context o.e.j.w.WebAppContext@6cdce5ed{/thermostat/storage,null,null}{/usr/share/thermostat/webapp}
java.lang.ClassNotFoundException: org.eclipse.jetty.webapp.WebInfConfiguration
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at org.eclipse.jetty.util.Loader.loadClass(
        at org.eclipse.jetty.webapp.WebAppContext.loadConfigurations(
        at org.eclipse.jetty.webapp.WebAppContext.preConfigure(
        at org.eclipse.jetty.webapp.WebAppContext.doStart(
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(
        at org.eclipse.jetty.server.Server.start(
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(
        at org.eclipse.jetty.server.Server.doStart(
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
        at com.redhat.thermostat.web.endpoint.internal.JettyContainerLauncher.doStartContainerAndDeployWar(
        at com.redhat.thermostat.web.endpoint.internal.JettyContainerLauncher.startContainerAndDeployWar(
        at com.redhat.thermostat.web.endpoint.internal.JettyContainerLauncher.access$000(
        at com.redhat.thermostat.web.endpoint.internal.JettyContainerLauncher$
server shutdown complete: /root/.thermostat-1.6/data/db
log file is here: /root/.thermostat-1.6/logs/db.log
Failed to start embedded jetty instance

Expected results:
No ClassNotFoundException and successful startup.

Additional info:
This is likely only reproducible when jetty is being started within an OSGi environment. Such is the case for "thermostat web-storage-service".

Note that the code in Loader around line 65 looks like this:

    public static Class loadClass(String name)
        throws ClassNotFoundException
        ClassLoader loader=Thread.currentThread().getContextClassLoader();
        return (loader==null ) ? Class.forName(name) : loader.loadClass(name);

loader in this context points to the app class loader which booted up the OSGi framework. However, the OSGi bundle jetty-webapp was loaded as a bundle and thus, classes inside it will get loaded with the bundles class loader. Then TCCL won't see the relevant config classes in the webapp bundle whereas the bundle class loader would see it.

Comment 1 Severin Gehwolf 2016-07-08 16:54:00 UTC
Upstream issue:

Comment 2 Severin Gehwolf 2016-07-14 12:12:29 UTC
We've worked around this in thermostat-1.6.0-2.fc25

Comment 3 Jan Kurik 2016-07-26 04:46:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 4 Severin Gehwolf 2016-08-03 13:53:57 UTC
Upstream discussion convinced me that there is likely not much to be done on the jetty side. Re-assigning to thermostat component.

Comment 5 Fedora Update System 2016-09-19 16:33:44 UTC
thermostat-1.6.4-2.fc25 jgraphx- has been submitted as an update to Fedora 25.

Comment 6 Fedora Update System 2016-09-20 19:57:36 UTC
jgraphx-, thermostat-1.6.4-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See for
instructions on how to install test updates.
You can provide feedback for this update here:

Comment 7 Fedora Update System 2016-10-09 02:54:24 UTC
jgraphx-, thermostat-1.6.4-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.