Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-7163

$OPENNMS_HOME/bin/system-report throws a ClassNotFoundException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 14.0.0
    • Fix Version/s: 14.0.1
    • Component/s: Command-Line Tools
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      Running the command line tool for the system report from demo.opennms.org

      Description

      [agalue@mephesto bin]$ ./system-report 
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      5.393: [GC [PSYoungGen: 64512K->7650K(75264K)] 64512K->7658K(246272K), 1.2923660 secs] [Times: user=0.03 sys=0.00, real=1.29 secs] 
      9.442: [GC [PSYoungGen: 72162K->7233K(139776K)] 72170K->7313K(310784K), 0.0409480 secs] [Times: user=0.05 sys=0.01, real=0.04 secs] 
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.opennms.bootstrap.Bootstrap$3.run(Bootstrap.java:366)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [META-INF/opennms/applicationContext-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to get the default Bean Validation factory
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:615)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
      	at org.opennms.systemreport.SystemReport.initializeSpring(SystemReport.java:262)
      	at org.opennms.systemreport.SystemReport.writePluginData(SystemReport.java:154)
      	at org.opennms.systemreport.SystemReport.report(SystemReport.java:137)
      	... 6 more
      Caused by: org.hibernate.HibernateException: Unable to get the default Bean Validation factory
      	at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:127)
      	at org.hibernate.cfg.Configuration.applyBeanValidationConstraintsOnDDL(Configuration.java:1704)
      	at org.hibernate.cfg.Configuration.applyConstraintsToDDL(Configuration.java:1654)
      	at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1445)
      	at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1375)
      	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:720)
      	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
      	... 20 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:118)
      	... 28 more
      Caused by: java.lang.NoClassDefFoundError: javax/validation/Validation
      	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:380)
      	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:109)
      	... 33 more
      Caused by: java.lang.ClassNotFoundException: javax.validation.Validation
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	... 35 more
      Heap
       PSYoungGen      total 139776K, used 129849K [0x00000007ac680000, 0x00000007b5980000, 0x0000000800000000)
        eden space 129024K, 95% used [0x00000007ac680000,0x00000007b3e3e198,0x00000007b4480000)
        from space 10752K, 67% used [0x00000007b4f00000,0x00000007b5610510,0x00000007b5980000)
        to   space 10752K, 0% used [0x00000007b4480000,0x00000007b4480000,0x00000007b4f00000)
       ParOldGen       total 171008K, used 80K [0x0000000705400000, 0x000000070fb00000, 0x00000007ac680000)
        object space 171008K, 0% used [0x0000000705400000,0x0000000705414010,0x000000070fb00000)
       PSPermGen       total 21504K, used 21140K [0x00000006e5400000, 0x00000006e6900000, 0x0000000705400000)
        object space 21504K, 98% used [0x00000006e5400000,0x00000006e68a5140,0x00000006e6900000)
      

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: