Bug 1201924 - Gutterball fails to start with NoClassDefFoundError
Summary: Gutterball fails to start with NoClassDefFoundError
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: Nightly
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: Unspecified
Assignee: Alex Wood
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-13 20:21 UTC by Jesus M. Rodriguez
Modified: 2019-04-01 20:26 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:30:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
gutterball.log (5.12 KB, text/plain)
2015-03-13 20:21 UTC, Jesus M. Rodriguez
no flags Details
list of jar files (10.88 KB, text/plain)
2015-03-13 20:25 UTC, Jesus M. Rodriguez
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Jesus M. Rodriguez 2015-03-13 20:21:50 UTC
Created attachment 1001484 [details]
gutterball.log

Description of problem:
Installing Satellite 6.1 fails when the installer attempts to run wget on candlepin's admin/init. Initially I thought it was candlepin's fault, but the problem is Gutterball fails to start so tomcat didn't start any of the apps.

2015-03-13 07:18:04,550 [localhost-startStop-1] INFO  org.candlepin.gutterball.servlet.GutterballContextListener - Gutterball initializing context.
2015-03-13 07:18:04,552 [localhost-startStop-1] INFO  org.candlepin.gutterball.servlet.GutterballContextListener - Gutterball reading configuration.
2015-03-13 07:18:05,193 [localhost-startStop-1] ERROR org.candlepin.gutterball.servlet.GutterballGuiceResteasyBootstrap - Could not create Guice injector.
com.google.inject.internal.util.ComputationException: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
	at com.google.inject.internal.util.MapMaker$StrategyImpl.compute(MapMaker.java:553) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.util.MapMaker$StrategyImpl.compute(MapMaker.java:419) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.util.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.FailableCache.get(FailableCache.java:50) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:507) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:159) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:122) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at com.google.inject.Guice.createInjector(Guice.java:95) ~[guice-3.0-redhat-1-no_deps.jar:3.0-redhat-1]
	at org.candlepin.gutterball.servlet.GutterballContextListener.getInjector(GutterballContextListener.java:95) [GutterballContextListener.class:na]
	at org.candlepin.gutterball.servlet.GutterballGuiceResteasyBootstrap.contextInitialized(GutterballGuiceResteasyBootstrap.java:58) ~

Comment 1 RHEL Program Management 2015-03-13 20:23:17 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Jesus M. Rodriguez 2015-03-13 20:25:59 UTC
Created attachment 1001485 [details]
list of jar files

The jarfiles log file is a listing of the symlinks in /var/lib/tomcat/webapps/gutterball/WEB-INF/lib/

a side note, the -sources.jar should NOT be part of the rpm. A fix needs to be made to the rpm to ignore those during symlinking.

Comment 4 Jesus M. Rodriguez 2015-03-13 20:26:40 UTC
$ grep CallbackFilter *.jar
Binary file candlepin-guiceguice-3.0-redhat-1.jar matches
Binary file candlepin-guiceguice-3.0-redhat-1-no_deps.jar matches

Comment 5 Jesus M. Rodriguez 2015-03-13 20:27:24 UTC
$ unzip -v candlepin-guiceguice-3.0-redhat-1.jar | grep CallbackFilter
     239  Defl:N      180  25% 09-20-2011 15:25 d1fda76d  com/google/inject/internal/cglib/proxy/$CallbackFilter.class
    1980  Defl:N      943  52% 09-23-2011 18:58 64f0ee7b  com/google/inject/internal/ProxyFactory$IndicesCallbackFilter.class


Notice the class file in that jar. It is com.google.inject.internal.cglib.proxy.....

Comment 6 Jesus M. Rodriguez 2015-03-13 20:28:01 UTC
$ unzip -v candlepin-guiceguice-3.0-redhat-1-no_deps.jar | grep CallbackFilter
    1958  Defl:N      945  52% 09-23-2011 18:58 63927b92  com/google/inject/internal/ProxyFactory$IndicesCallbackFilter.class

Again also not the one being searched for.

Comment 8 Jesus M. Rodriguez 2015-03-13 20:30:44 UTC
candlepin-deps (gutterball-deps) repo has the correct jar file. So that means a git install of gutterball will work, and koji/community builds of gutterball will work. But brew doesn't use gutterball-deps.

$ pwd
/home/devel/jesusr/dev/candlepin-deps/repo/gutterball
$ unzip -v cglib-2.2.jar | grep CallbackFilter
     218  Defl:N      166  24% 05-25-2008 20:34 7e86b938  net/sf/cglib/proxy/CallbackFilter.class
$ unzip -v guice-3.0.jar | grep CallbackFilter
     239  Defl:N      180  25% 01-04-2011 13:12 5f0bcc07  com/google/inject/internal/cglib/proxy/$CallbackFilter.class
    1980  Defl:N      943  52% 03-25-2011 18:17 64f0ee7b  com/google/inject/internal/ProxyFactory$IndicesCallbackFilter.class

Comment 9 Jesus M. Rodriguez 2015-03-13 20:37:05 UTC
My best guess is you need a BuildRequires on cglib 
[vagrant@sat61fusor lib]$ ls ../../../candlepin/WEB-INF/lib/cglib.jar 
../../../candlepin/WEB-INF/lib/cglib.jar
[vagrant@sat61fusor lib]$ ls -l ../../../candlepin/WEB-INF/lib/cglib.jar 
lrwxrwxrwx. 1 tomcat tomcat 25 Mar 11 16:05 ../../../candlepin/WEB-INF/lib/cglib.jar -> /usr/share/java/cglib.jar
[vagrant@sat61fusor lib]$ rpm -q --whatprovides /usr/share/java/cglib.jar
cglib-2.2-18.el7.noarch

Gutterball requires

%if 0%{?rhel} >= 7
Requires: candlepin-guice >= 0:3.0
Requires: glassfish-jaxb
Requires: guava >= 0:13.0
Requires: mvn(org.apache.commons:commons-collections)
Requires: mvn(org.apache.commons:commons-io)
Requires: mvn(org.apache.commons:commons-lang)
Requires: mvn(org.slf4j:slf4j-api)  >= 0:1.7.4
Requires: mvn(org.slf4j:jcl-over-slf4j)  >= 0:1.7.4
Requires: mvn(ch.qos.logback:logback-classic)
Requires: mvn(net.sf.cglib:cglib)
Requires: mvn(asm:asm)
%endif

The box states that cglib provides mvn(...)

[vagrant@sat61fusor lib]$ rpm -q --whatprovides "mvn(net.sf.cglib:cglib)"
cglib-2.2-18.el7.noarch

I believe the el7.txt file in gutterball needs a cglib.
sisu-cglib/cglib is NOT enough.

Comment 10 Alex Wood 2015-03-17 14:39:16 UTC
commit 962b51399afdf85dfee84296f4bf7bcc9551dc94
Author: Alex Wood <awood>
Date:   Mon Mar 16 10:28:07 2015 -0400

    1201924: Add missing cglib dependency for gutterball in EL7.

Comment 14 Sachin Ghai 2015-07-09 12:45:31 UTC
Verified with sat6.1.1 snap11 C2.

The reported issue is no longer reproducible with snap11. 


[root@cloud-qe-2 ~]#  curl -k https://localhost:8443/gutterball/status
{
  "version" : "1.0.15.0",
  "release" : "1",
  "request_locale" : "en_US"
}
[root@cloud-qe-2 ~]#rpm -qa | grep gutterball
gutterball-certs-1.0-1.noarch
gutterball-1.0.15.0-1.el7.noarch
rubygem-hammer_cli_gutterball-0.0.1.3-1.el7sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch


No error in /var/log/gutterball/gutterball.log

Comment 16 errata-xmlrpc 2015-08-12 05:30:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592


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