Category: Programming Language
-
Java + HTTPS: Unable to Find Valid Certification Path to Requested Target
PROBLEM When invoking a HTTPS URL from Java, for example… …the following exception is thrown… SOLUTION 1: Disable SSL Validation – NOT RECOMMENDED One way is to simply disable the SSL validation by configuring SSLContext to trust all X.509 certificates before invoking the intended HTTPS URL. Unless you are writing test cases or implementing non-production Read More…
-
Java + HTTPS: Handling ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY
PROBLEM When accessing HTTPS links from a local application server, the modern browser throws the following error message(s):- SOLUTIONS There are multiple solutions to this problem. SOLUTION 1: Disable browser check One way is to completely disable this check on the browser. For example, in Firefox, go to about:config and set security.ssl3.dhe_rsa_aes_128_sha and security.ssl3.dhe_rsa_aes_256_sha to Read More…
-
Rest Template: Could Not Extract Response – No Suitable HttpMessageConverter Found for Response Type [X] and Content Type [application/json;charset=UTF-8]
PROBLEM When invoking a web service using RestTemplate:- … the following exception occurs:- SOLUTION If the content type is JSON, add the following dependency:- Read More…
-
Spring Data JPA: Requested bean is currently in creation: Is there an unresolvable circular reference?
PROBLEM Let’s assume we have the following Spring Data JPA repository… … this repository has some custom implementation… … this custom implementation depends on the original repository to reuse existing APIs… When we run the code, we get the following exception:- SOLUTION To fix the circular reference problem, instead of auto-wiring ProjectRepository using the constructor, Read More…
-
Akka: Spring Integration
PROBLEM To create Spring-managed prototype-scoped actors. SOLUTION The key to this solution is to create a custom implementation of IndirectActorProducer. From the documentation:- “…This interface defines a class of actor creation strategies deviating from the usual default of just reflectively instantiating the Actor subclass. It can be used to allow a dependency injection framework to Read More…
-
Neo4j: WHERE Clause vs Curly Braces in MATCH Clause
PROBLEM With Cypher Query Language, you can write similar queries that yield the same result. For example:- … AND … … returns the same result. So, which one is better in terms of performance? SOLUTION Neo4j provides a very helpful command called EXPLAIN that allows us to do some investigation ourselves. The EXPLAIN command displays Read More…