Open hungdao-testing opened 3 years ago
If not use addNotification()
in BankAccountService -> there is no error, and for sure the response data return properly
Here is the github code for you guys review
Plz let me know if you need more information
Hi, which line is line 53 of BankAccountService where the error is occurring? It's a blank line on the cubano_issue branch currently.
@nigelcharman I accidentally format the file and therefore the order of lines in trace_log in original post is not correct Please refer to the full log below
While evaluating expression: getResultOfCreatingUserAccount(#name,#username,#password)
org.concordion.internal.InvalidExpressionException: NullPointerException
at org.concordion.slf4j.ext.FluentLogger.attachment (FluentLogger.java:181)
at org.concordion.slf4j.ext.FluentLogger.attachment (FluentLogger.java:169)
at com.rwa.services.BaseService.addNotification (BaseService.java:27)
at com.rwa.services.BankAccountService.createUserAccount (BankAccountService.java:55)
at com.rwa.specs.bankaccount.BankAccountFixture.getResultOfCreatingUserAccount (BankAccountFixture.java:12)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at ognl.OgnlRuntime.invokeMethodInsideSandbox (OgnlRuntime.java:1266)
at ognl.OgnlRuntime.invokeMethod (OgnlRuntime.java:1251)
at ognl.OgnlRuntime.callAppropriateMethod (OgnlRuntime.java:1969)
at ognl.ObjectMethodAccessor.callMethod (ObjectMethodAccessor.java:68)
at ognl.OgnlRuntime.callMethod (OgnlRuntime.java:2045)
at ognl.ASTMethod.getValueBody (ASTMethod.java:97)
at ognl.SimpleNode.evaluateGetValueBody (SimpleNode.java:212)
at ognl.SimpleNode.getValue (SimpleNode.java:258)
at ognl.Ognl.getValue (Ognl.java:537)
at ognl.Ognl.getValue (Ognl.java:639)
at ognl.Ognl.getValue (Ognl.java:609)
at org.concordion.internal.OgnlEvaluator.evaluate (OgnlEvaluator.java:25)
at org.concordion.internal.SimpleEvaluator.evaluate (SimpleEvaluator.java:14)
at org.concordion.internal.command.BooleanCommand.verify (BooleanCommand.java:33)
at org.concordion.api.AbstractCommandDecorator$3.run (AbstractCommandDecorator.java:33)
at org.concordion.internal.command.LocalTextDecorator.process (LocalTextDecorator.java:26)
at org.concordion.api.AbstractCommandDecorator.verify (AbstractCommandDecorator.java:31)
at org.concordion.api.AbstractCommandDecorator$3.run (AbstractCommandDecorator.java:33)
at org.concordion.internal.command.ThrowableCatchingDecorator.process (ThrowableCatchingDecorator.java:38)
at org.concordion.api.AbstractCommandDecorator.verify (AbstractCommandDecorator.java:31)
at org.concordion.api.CommandCall.verify (CommandCall.java:76)
at org.concordion.api.CommandCallList.processSequentially (CommandCallList.java:34)
at org.concordion.internal.command.ExampleCommand.execute (ExampleCommand.java:49)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.LocalTextDecorator.process (LocalTextDecorator.java:26)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.ThrowableCatchingDecorator.process (ThrowableCatchingDecorator.java:38)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.CommandCall.execute (CommandCall.java:72)
at org.concordion.internal.XMLSpecification.processNode (XMLSpecification.java:60)
at org.concordion.internal.XMLSpecification.processExample (XMLSpecification.java:76)
at org.concordion.Concordion.processExample (Concordion.java:92)
at org.concordion.internal.FixtureRunner.run (FixtureRunner.java:41)
at org.concordion.integration.junit4.ConcordionRunner.invoke (ConcordionRunner.java:207)
at org.concordion.integration.junit4.ConcordionRunner$1.invoke (ConcordionRunner.java:31)
at org.concordion.integration.junit4.ConcordionFrameworkMethod.invokeExplosively (ConcordionFrameworkMethod.java:58)
at org.junit.internal.runners.statements.InvokeMethod.evaluate (InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf (ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:78)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:191)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:23)
at org.junit.runners.ParentRunner$3.run (ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule (ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren (ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000 (ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate (ParentRunner.java:268)
at org.junit.runners.ParentRunner.run (ParentRunner.java:363)
at org.concordion.integration.junit4.ConcordionRunner.run (ConcordionRunner.java:150)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute (JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet (JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke (JUnit4Provider.java:104)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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)
java.lang.NullPointerException: null
at org.concordion.slf4j.ext.FluentLogger.attachment (FluentLogger.java:181)
at org.concordion.slf4j.ext.FluentLogger.attachment (FluentLogger.java:169)
at com.rwa.services.BaseService.addNotification (BaseService.java:27)
at com.rwa.services.BankAccountService.createUserAccount (BankAccountService.java:55)
at com.rwa.specs.bankaccount.BankAccountFixture.getResultOfCreatingUserAccount (BankAccountFixture.java:12)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at ognl.OgnlRuntime.invokeMethodInsideSandbox (OgnlRuntime.java:1266)
at ognl.OgnlRuntime.invokeMethod (OgnlRuntime.java:1251)
at ognl.OgnlRuntime.callAppropriateMethod (OgnlRuntime.java:1969)
at ognl.ObjectMethodAccessor.callMethod (ObjectMethodAccessor.java:68)
at ognl.OgnlRuntime.callMethod (OgnlRuntime.java:2045)
at ognl.ASTMethod.getValueBody (ASTMethod.java:97)
at ognl.SimpleNode.evaluateGetValueBody (SimpleNode.java:212)
at ognl.SimpleNode.getValue (SimpleNode.java:258)
at ognl.Ognl.getValue (Ognl.java:537)
at ognl.Ognl.getValue (Ognl.java:639)
at ognl.Ognl.getValue (Ognl.java:609)
at org.concordion.internal.OgnlEvaluator.evaluate (OgnlEvaluator.java:25)
at org.concordion.internal.SimpleEvaluator.evaluate (SimpleEvaluator.java:14)
at org.concordion.internal.command.BooleanCommand.verify (BooleanCommand.java:33)
at org.concordion.api.AbstractCommandDecorator$3.run (AbstractCommandDecorator.java:33)
at org.concordion.internal.command.LocalTextDecorator.process (LocalTextDecorator.java:26)
at org.concordion.api.AbstractCommandDecorator.verify (AbstractCommandDecorator.java:31)
at org.concordion.api.AbstractCommandDecorator$3.run (AbstractCommandDecorator.java:33)
at org.concordion.internal.command.ThrowableCatchingDecorator.process (ThrowableCatchingDecorator.java:38)
at org.concordion.api.AbstractCommandDecorator.verify (AbstractCommandDecorator.java:31)
at org.concordion.api.CommandCall.verify (CommandCall.java:76)
at org.concordion.api.CommandCallList.processSequentially (CommandCallList.java:34)
at org.concordion.internal.command.ExampleCommand.execute (ExampleCommand.java:49)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.LocalTextDecorator.process (LocalTextDecorator.java:26)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.ThrowableCatchingDecorator.process (ThrowableCatchingDecorator.java:38)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.CommandCall.execute (CommandCall.java:72)
at org.concordion.internal.XMLSpecification.processNode (XMLSpecification.java:60)
at org.concordion.internal.XMLSpecification.processExample (XMLSpecification.java:76)
at org.concordion.Concordion.processExample (Concordion.java:92)
at org.concordion.internal.FixtureRunner.run (FixtureRunner.java:41)
at org.concordion.integration.junit4.ConcordionRunner.invoke (ConcordionRunner.java:207)
at org.concordion.integration.junit4.ConcordionRunner$1.invoke (ConcordionRunner.java:31)
at org.concordion.integration.junit4.ConcordionFrameworkMethod.invokeExplosively (ConcordionFrameworkMethod.java:58)
at org.junit.internal.runners.statements.InvokeMethod.evaluate (InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf (ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:78)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:191)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:23)
at org.junit.runners.ParentRunner$3.run (ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule (ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren (ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000 (ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate (ParentRunner.java:268)
at org.junit.runners.ParentRunner.run (ParentRunner.java:363)
at org.concordion.integration.junit4.ConcordionRunner.run (ConcordionRunner.java:150)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute (JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet (JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke (JUnit4Provider.java:104)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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)
@jimmykemp @andrew-sumner any idea why testLoggerLogWriter.getRequest() would be null?
Precondition:
Setup
Fixture file
BankAccountFixture
Base Service
Step:
While evaluating expression: getResultOfCreatingUserAccount(#name,#username,#password)
org.concordion.internal.InvalidExpressionException: NullPointerException at org.concordion.slf4j.ext.FluentLogger.attachment (FluentLogger.java:181) at org.concordion.slf4j.ext.FluentLogger.attachment (FluentLogger.java:169) at com.rwa.services.BaseService.addNotification (BaseService.java:27) at com.rwa.services.BankAccountService.createUserAccount (BankAccountService.java:53) at com.rwa.specs.bankaccount.BankAccountFixture.getResultOfCreatingUserAccount (BankAccountFixture.java:12) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at ognl.OgnlRuntime.invokeMethodInsideSandbox (OgnlRuntime.java:1266) at ognl.OgnlRuntime.invokeMethod (OgnlRuntime.java:1251) at ognl.OgnlRuntime.callAppropriateMethod (OgnlRuntime.java:1969) at ognl.ObjectMethodAccessor.callMethod (ObjectMethodAccessor.java:68)