Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3337

Narayana startup fails when empty system property is provided

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 5.10.6.Final
    • 5.10.5.Final
    • Common
    • None

      When Narayana starts with an empty property then it fails during startup.
      This is documented at the JBEAP issue https://issues.redhat.com/browse/JBEAP-19690.

      As the rchakrab pointed at the issue the error came from https://github.com/jbosstm/narayana/blob/5.10.5.Final/common/classes/com/arjuna/common/util/propertyservice/AbstractPropertiesFactory.java#L122-L124

      The error which can be observed is

      testGetWithEmptyPropertyWithStax(com.arjuna.common.tests.propertyservice.EmptyPropertiesFactoryTest)  Time elapsed: 0.023 s  <<< ERROR!
      java.lang.RuntimeException: unable to load properties from /home/ochaloup/Transactions/narayana/common/target/test-classes/properties-factory-test.xml
            at com.arjuna.common.util.propertyservice.AbstractPropertiesFactory.getPropertiesFromFile(AbstractPropertiesFactory.java:107)
         at com.arjuna.common.util.propertyservice.AbstractPropertiesFactory.initDefaultProperties(AbstractPropertiesFactory.java:196)
        at com.arjuna.common.util.propertyservice.AbstractPropertiesFactory.getDefaultProperties(AbstractPropertiesFactory.java:62)
        at com.arjuna.common.tests.propertyservice.EmptyPropertiesFactoryTest.testGetWithEmptyPropertyWithStax(EmptyPropertiesFactoryTest.java:57)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
       at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
       at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
            at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
         at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
            at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
       at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
            at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
           at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)
      Caused by: java.lang.IllegalArgumentException: key can't be empty
         at java.lang.System.checkKey(System.java:843)
        at java.lang.System.getProperty(System.java:716)
           at com.arjuna.common.util.propertyservice.AbstractPropertiesFactory.applySystemProperties(AbstractPropertiesFactory.java:125)
             at com.arjuna.common.util.propertyservice.AbstractPropertiesFactory.getPropertiesFromFile(AbstractPropertiesFactory.java:104)
         ... 28 more
      

              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: