We are all on a journey. Thanks for taking a peek into mine!
Blog
ServiceUnavailableException: Connection to the database terminated.
Photo credit I was working on a Spring Data Neo4j example application for a community user’s question, and I kept running into the error below when I defined bidirectional relationship in the domain classes.
2023-08-10T13:00:17.341-05:00 ERROR 98493 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.TransientDataAccessResourceException: Server at 408637a4.databases.neo4j.io:7687 is no longer available; Error code 'N/A'] with root cause org.
read moreBlog
How to Create a Spring Boot Application to Retrieve Data from Evernote
Photo credit I recently started work on a joint project with my colleague, Jason Koo. For this project, we want to import data from second brain apps (such as Obsidian, Notion, Evernote, etc) to Neo4j. Since I use Evernote, I was tasked with getting my notes out of Evernote. In this post, I will show you how to use the Evernote API and SDK in a Spring Boot application to retrieve data from Evernote.
read moreBlog
Spring Data Neo4j: How to update an entity
Photo credit As I was incorporating Kafka to my microservices project, I ran across some trouble updating an entity in Neo4j using Spring Data Neo4j.
My data set contains books, authors, book reviews, and users. Based on a new review getting entered into the system, I want to create that review, and then update the related Book entity with an incremented review count and calculate a new average rating. The new review entity was being created with no issues, but I was struggling to get the update to the related Book entity working.
read moreBlog
NoSuchBeanDefinitionException: No matching TransactionManager bean found for qualifier 'reactiveTransactionManager'
Photo credit I was working on a Spring Data Neo4j microservice application to add a write method for saving a new book review to the database, when I came across the error message below.
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'reactiveTransactionManager' available: No matching TransactionManager bean found for qualifier 'reactiveTransactionManager' - neither qualifier match nor bean name match! The stacktrace was long and ugly, and I had come across this error before…but I could not remember how I had solved it.
read moreBlog
Journeys in Java, Level 10: Service Discovery with Eureka
Photo credit Gaining complexity in a microservices system certainly isn’t for the faint of heart (though neither is complexity in monoliths!). When there are many services that need to communicate with one another, we might need to coordinate multiple services communicating with multiple other services. We also might code for varying environments such as local, development server, or the cloud.
How do services know where to find one another? How can we avoid problems when a service is unavailable?
read moreBlog
Journeys in Java, Level 9: Docker compose all the things
Photo credit Our microservices project contains quite a few pieces now. We have two databases, three API services, a user-view service for books, and a service to host our configuration. With so many pieces to manage, it would be nice to have something that orchestrates the individual services into a system, such as Docker Compose.
Back in our Level 5 rendition, we did exactly this for our smaller version of the project.
read moreBlog
Journeys in Java, Level 8: Add MongoDB to Spring Cloud Config
Photo credit In our last blog post, we used Spring Cloud Config to provide database credentials to a microservice application connecting to a cloud-hosted Neo4j database. This post will backport this concept to our existing MongoDB database instance and its related microservices.
We will add our MongoDB credentials to the config server, so that it will be the central place for both our Neo4j and MongoDB database access. However, each service only has access to the credentials that it needs to operate, which provides some level of security through "separation of concerns" (versus universal access).
read moreBlog
Journeys in Java, Level 7: Externalize Microservice Configuration
Photo credit Our decided next step for this project takes us in a new direction by adding externalized configuration for our applications. We already saw how to do something similar with MongoDB database credentials in Docker Compose to access a local database container, but what do we do when the database is hosted on public cloud or contains sensitive data? We probably don’t want to publish our credentials anywhere or even prevent accidental publishing.
read moreBlog
Journeys in Java, Level 6: Build a Microservice with Neo4j
Photo credit For our next adventure in Java microservices, we want to expand our system for book review data. While books and authors are well-suited for a document database such as MongoDB, once you add reviews to the mix, the importance of the relationships makes this project better suited for a graph database. This way, we can utilize relationships between the different entities to improve analysis based on the structure of the connections.
read more