[ 
https://issues.apache.org/jira/browse/FINERACT-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149690#comment-17149690
 ] 

Michael Vorburger commented on FINERACT-1064:
---------------------------------------------

This does somehow seem to be related to the PR... let me make this issue about 
that enhancement, not an existing bug - I need to fix this problem in the PR:

{noformat}java.lang.NullPointerException 
 at 
org.apache.fineract.infrastructure.accountnumberformat.data.AccountNumberFormatDataValidator.determineValidAccountNumberPrefixes(AccountNumberFormatDataValidator.java:108)
 
 at 
org.apache.fineract.infrastructure.accountnumberformat.data.AccountNumberFormatDataValidator.validateForCreate(AccountNumberFormatDataValidator.java:96)
 
 at 
org.apache.fineract.infrastructure.accountnumberformat.service.AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.createAccountNumberFormat(AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java:59)
 
 at 
org.apache.fineract.infrastructure.accountnumberformat.service.AccountNumberFormatWritePlatformServiceJpaRepositoryImpl$$FastClassBySpringCGLIB$$156704bc.invoke(<generated>)
 
 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) 
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
 
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
 
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
 
 at 
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
 
 at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
 
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
 
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
 
 at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
 
 at 
org.apache.fineract.infrastructure.accountnumberformat.service.AccountNumberFormatWritePlatformServiceJpaRepositoryImpl$$EnhancerBySpringCGLIB$$3e2b20f.createAccountNumberFormat(<generated>)
 
 at 
org.apache.fineract.infrastructure.accountnumberformat.handler.CreateAccountNumberFormatCommandHandler.processCommand(CreateAccountNumberFormatCommandHandler.java:44)
 
 at 
org.apache.fineract.infrastructure.accountnumberformat.handler.CreateAccountNumberFormatCommandHandler$$FastClassBySpringCGLIB$$9961abde.invoke(<generated>)
 
 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) 
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
 
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
 
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
 
 at 
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
 
 at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
 
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
 
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
 
 at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
 
 at 
org.apache.fineract.infrastructure.accountnumberformat.handler.CreateAccountNumberFormatCommandHandler$$EnhancerBySpringCGLIB$$ecdb2cb5.processCommand(<generated>)
 
 at 
org.apache.fineract.commands.service.SynchronousCommandProcessingService.processAndLogCommand(SynchronousCommandProcessingService.java:82)
 
 at 
org.apache.fineract.commands.service.SynchronousCommandProcessingService$$FastClassBySpringCGLIB$$ec92d53f.invoke(<generated>)
 
 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) 
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
 
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
 at 
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
 at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
 at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
 at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
 at 
org.apache.fineract.commands.service.SynchronousCommandProcessingService$$EnhancerBySpringCGLIB$$43df0d78.processAndLogCommand(<generated>)
 at 
org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformServiceImpl.logCommandSource(PortfolioCommandSourceWritePlatformServiceImpl.java:98)
 at 
org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformServiceImpl$$FastClassBySpringCGLIB$$31c15082.invoke(<generated>)
 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
 at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
 at 
org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformServiceImpl$$EnhancerBySpringCGLIB$$9c842121.logCommandSource(<generated>)
 at 
org.apache.fineract.infrastructure.accountnumberformat.api.AccountNumberFormatsApiResource.create(AccountNumberFormatsApiResource.java:168){noformat}

> AccountNumberPreferencesTest > testAccountNumberPreferences() Expected status 
> code <400> but was <500>
> ------------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-1064
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1064
>             Project: Apache Fineract
>          Issue Type: Bug
>            Reporter: Michael Vorburger
>            Assignee: Michael Vorburger
>            Priority: Major
>             Fix For: 1.4.0
>
>
> https://travis-ci.org/github/apache/fineract/builds/703530837 for 
> https://github.com/apache/fineract/pull/1127 failed with:
> {noformat}AccountNumberPreferencesTest > testAccountNumberPreferences() FAILED
>     java.lang.AssertionError: 1 expectation failed.
>     Expected status code <400> but was <500>.
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>  Method)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at 
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at 
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
>         at 
> org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
>         at 
> org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:59)
>         at 
> org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
>         at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
>         at 
> io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:493)
>         at 
> io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown
>  Source)
>         at 
> io.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1656)
>         at jdk.internal.reflect.GeneratedMethodAccessor86.invoke(Unknown 
> Source)
>         at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>         at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
>         at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1262)
>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1029)
>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:816)
>         at groovy.lang.GroovyObject.invokeMethod(GroovyObject.java:39)
>         at 
> org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:45)
>         at 
> org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:55)
>         at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:203)
>         at 
> io.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1661)
>         at jdk.internal.reflect.GeneratedMethodAccessor85.invoke(Unknown 
> Source)
>         at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>         at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
>         at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1262)
>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1029)
>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:816)
>         at groovy.lang.GroovyObject.invokeMethod(GroovyObject.java:39)
>         at 
> org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:45)
>         at 
> org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:55)
>         at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:203)
>         at 
> io.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy:175)
>         at 
> io.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy)
>         at 
> org.apache.fineract.integrationtests.common.Utils.performServerPost(Utils.java:155)
>         at 
> org.apache.fineract.integrationtests.common.system.AccountNumberPreferencesHelper.createAccountNumberPreferenceWithInvalidData(AccountNumberPreferencesHelper.java:98)
>         at 
> org.apache.fineract.integrationtests.AccountNumberPreferencesTest.createAccountNumberPreferenceInvalidData(AccountNumberPreferencesTest.java:230)
>         at 
> org.apache.fineract.integrationtests.AccountNumberPreferencesTest.createAccountNumberPreference(AccountNumberPreferencesTest.java:205)
>         at 
> org.apache.fineract.integrationtests.AccountNumberPreferencesTest.testAccountNumberPreferences(AccountNumberPreferencesTest.java:120){noformat}
> It's not clear from this what Server Side Error (HTTP 500) caused this.
> Could it be FINERACT-778 rearing it's ugly head again? Unlikely, probably.
> Or is it actually a change in that PR? If it's reproducible, perhaps this is 
> a good opportunity to try to improve error logging (server side send stack 
> trace to client, test should output it?)...
> I'll properly investigate it when I have some time.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to