Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-383

Improve error reporting in PropertiesBasedConfigurationBuilder

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 1.1.3.Final, 1.2.0.Beta1
    • 1.1.2.Final
    • None
    • None

      From time to time I am observing the following error in jenkins:

      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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
      	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
      	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
      	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
      Caused by: java.lang.IllegalStateException: Unable to get configuration
      	at org.jboss.cdi.tck.impl.ConfigurationFactory.get(ConfigurationFactory.java:43)
      	at org.jboss.cdi.tck.impl.ConfigurationFactory.get(ConfigurationFactory.java:53)
      	at org.jboss.cdi.tck.impl.testng.ConfigurationLoggingListener.onStart(ConfigurationLoggingListener.java:49)
      	at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:197)
      	at org.testng.SuiteRunner.run(SuiteRunner.java:238)
      	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1137)
      	at org.testng.TestNG.runSuitesLocally(TestNG.java:1062)
      	at org.testng.TestNG.run(TestNG.java:974)
      	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:122)
      	at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
      	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:101)
      	... 9 more
      Caused by: java.lang.IllegalArgumentException: Implementation class not found
      	at org.jboss.cdi.tck.impl.PropertiesBasedConfigurationBuilder.getClassValue(PropertiesBasedConfigurationBuilder.java:236)
      	at org.jboss.cdi.tck.impl.PropertiesBasedConfigurationBuilder.getInstanceValue(PropertiesBasedConfigurationBuilder.java:200)
      	at org.jboss.cdi.tck.impl.PropertiesBasedConfigurationBuilder.init(PropertiesBasedConfigurationBuilder.java:65)
      	at org.jboss.cdi.tck.impl.ConfigurationFactory.get(ConfigurationFactory.java:41)
      	... 21 more
      

      This could be improved:

      • the className should be part of the error message
      • CNFE should be part of the exception chain
      • the classloader used in the classloading attempt should be also part of the error message

            mbriskar_jira Matej Briskar (Inactive)
            rhn-engineering-jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: