Hari Sekhon created AMBARI-18429:
------------------------------------

             Summary: Class typo eclipse PersistenceWweaed instead of 
PersistenceWeaved
                 Key: AMBARI-18429
                 URL: https://issues.apache.org/jira/browse/AMBARI-18429
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.4.1
         Environment: HDP 2.3
            Reporter: Hari Sekhon
            Priority: Blocker


After upgrading Ambari to 2.4.1 I've just hit the following which appears to be 
a class typo bug when running ambari-server upgrade:

{code}
2016-09-21 10:38:02,284  INFO - ******************************* Check database 
started *******************************
2016-09-21 10:38:02,543 ERROR - Unexpected error, database check failed
java.lang.NoClassDefFoundError: 
org/eclipse/persistence/internal/weaving/PersistenceWweaed
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetPublicMethods(Class.java:2902)
        at java.lang.Class.getMethods(Class.java:1615)
        at 
com.google.inject.assistedinject.FactoryProvider2.<init>(FactoryProvider2.java:207)
        at 
com.google.inject.assistedinject.FactoryModuleBuilder$1.configure(FactoryModuleBuilder.java:334)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
        at 
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
        at com.google.inject.AbstractModule.install(AbstractModule.java:118)
        at 
org.apache.ambari.server.controller.ControllerModule.installFactories(ControllerModule.java:456)
        at 
org.apache.ambari.server.controller.ControllerModule.configure(ControllerModule.java:291)
        at 
org.apache.ambari.server.checks.DatabaseConsistencyChecker$CheckHelperControllerModule.configure(DatabaseConsistencyChecker.java:66)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
        at 
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
        at com.google.inject.spi.Elements.getElements(Elements.java:101)
        at 
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
        at 
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
        at com.google.inject.Guice.createInjector(Guice.java:95)
        at com.google.inject.Guice.createInjector(Guice.java:72)
        at com.google.inject.Guice.createInjector(Guice.java:62)
        at 
org.apache.ambari.server.checks.DatabaseConsistencyChecker.main(DatabaseConsistencyChecker.java:102)
Caused by: java.lang.ClassNotFoundException: 
org.eclipse.persistence.internal.weaving.PersistenceWweaed
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 33 more
{code}

I've checked the jar contents and there is 
org/eclipse/persistence/internal/weaving/PersistenceWeaved.class in 
/usr/lib/ambari-server/eclipselink-2.6.2.jar so it looks like this is a typo in 
the class name.

Not sure how this wasn't caught by the compiler, is this specified in some 
embedded ini file in the jar and loaded with reflection or something? I grepped 
/etc/ambari-server and it's not present in any config file there.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to