[Resolved] Spring boot JWT Filter called twice

[Resolved] Spring boot JWT Filter called twice: Recently when I was integrating JWT Filter and Simple CORS filter in my spring boot project, I observed that both the filters are called twice before actually reaching my servlet/rest controller.   After googling, I got this link, As per that, One invocation is by servlet container and the other is by Spring […]

240 total views, 3 views today

» Read more

org.springframework.web.HttpMediaTypeNotAcceptableException | Could not find acceptable representation

org.springframework.web.HttpMediaTypeNotAcceptableException | Could not find acceptable representation: Full Error details: {“timestamp”:1522250376646,”status”:406,”error”:”Not Acceptable”,”exception”:”org.springframework.web.HttpMediaTypeNotAcceptableException”,”message”:”Could not find acceptable representation”,”path”:”/category/deleteImage/google.png”}     As per this link, I found the solution for this issue:   Solution: @SpringBootApplication public class CouponzcornerBackendApplication { public static void main(String[] args) { SpringApplication.run(CouponzcornerBackendApplication.class, args); } @Configuration public static class PathMatchingConfigurationAdapter extends WebMvcConfigurerAdapter { @Override public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { configurer.favorPathExtension(false); […]

426 total views, no views today

» Read more

[Resolved] “org.springframework.web.HttpMediaTypeNotSupportedException” angular 5

Hi All,¬†Recently I came across this “org.springframework.web.HttpMediaTypeNotSupportedException” error while trying to hit my spring boot rest web services application from angular 5.   I am posting my experience because to help someone quickly. I almost cross checked all the places many times, but I could not find the below miss which I found at last and also do remember this […]

311 total views, 2 views today

» Read more

Understanding & Resolving “Too many connections” Exception

Understanding & Resolving “Too many connections” Exception:   Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: “Too many connections” Issue Fix: Close the open connections properly, because too many open connection error indicates too many connections are opened but not closed. Existing Code which has the issue:   In the below code, finally block still has the […]

298 total views, 1 views today

» Read more

[Solved] ReferenceError: KeyboardEvent is not defined

[Solved] ReferenceError: KeyboardEvent is not defined This error happens due to lot of reasons. In my case I was getting this error while making my angular site to angular universal site for server side rendering and better SEO. But when I was trying to convert to angular universal¬†I got this “ReferenceError: KeyboardEvent is not defined ” issue. In my case […]

786 total views, 4 views today

» Read more

[Solved] ERROR Error: No value accessor for form control with unspecified name attribute

[Solved] ERROR Error: No value accessor for form control with unspecified name attribute   This issue will occur due to lot of reasons, here I am writing my case to help someone, Issue: This issue happened with angular 4 cli + angular material 2 for me. I used mat-radio-button, mat-checkbox in my template page. But I missed to import the […]

1,281 total views, 5 views today

» Read more

[Solved] Cannot read property ‘getSourceFile’ of null

[Solved] Cannot read property ‘getSourceFile’ of null:   This error occurs due to lot of things, I just explained what happened in my case below, hope it helps some people. I generated a component named “store component” in two different places using the below comments by mistake, ng g c store one is under layout folder and other one is […]

684 total views, 1 views today

» Read more

[Solved] your global angular cli version is greater than your local version

[Solved] your global angular cli version is greater than your local version Root cause: If you have developed your angular-cli project in some version, say 1.0.3 in some machine and you are trying to build/compile in the other system which is having higher angular-cli version, say 1.4.2 then you will get this warning message “your global angular cli version is […]

1,635 total views, 6 views today

» Read more

[Solved] node sass could not find a binding for your current environment windows 64-bit with node.js 6.x

[Solved] node sass could not find a binding for your current environment windows 64-bit with node.js 6.x Root cause: This issue will happen if you have moved your angular cli project from 32bit to 64bit environment. Ensure you are rebuilding the node-sass to resolve this issue.   Command to rebuild: npm rebuild node-sass   Issue Screenshot:     Fixing using […]

827 total views, 3 views today

» Read more

[Resolved] java.util.LinkedHashMap cannot be cast to org.json.simple.JSONObject

[Resolved] java.util.LinkedHashMap cannot be cast to org.json.simple.JSONObject This issue may happen for various use cases, I have explianed my usecase with the explanation below, hope it helps someone. My JSON string / JSON response sample is: {“itemName”:”Amazon”,”id”:1}   Issue code: for(int i=0;i<selectedStoresJsonArray.size();i++){ JSONObject jsonObj = (JSONObject) selectedStoresJsonArray.get(i); if(null!=jsonObj.get(“itemName”) && !jsonObj.get(“itemName”).toString().isEmpty()){ tempSelectedStores.add(jsonObj.get(“itemName”).toString()); } }   Here JSONObject is not knowing the […]

1,894 total views, 3 views today

» Read more
1 2 3 11