We are all on a journey. Thanks for taking a peek into mine!
Blog
How to pass a JSON object to a Spring Boot request
Photo credit Just before the holidays, I was working on writing some more lesson content for a Spring Data Neo4j course. To save an entity to the database, I needed to pass a JSON object containing the entity’s properties to a Spring Boot controller method. Each time I wanted to test the code, I had to manually create the JSON object and pass it to the controller method on the command line.
read moreBlog
How to migrate Homebrew from Intel chip installation to Apple Silicon
Photo credit I have been using an Apple M1 laptop since autumn of 2021, but I just recently came across an issue that surprised me. It seems I hadn’t converted Homebrew (a package manager for macOS) for compatibility with Apple Silicon. I mostly use Homebrew to install packages I rarely use (such as Ruby or Python libraries), so perhaps that’s why I hadn’t noticed. However, this issue surfaced because I tried to install a Python package (Poetry) to work on a generative AI project, and it was looking for Python in the wrong place.
read moreBlog
JBang: How to script with Java for data import from an API
Photo credit It’s right in the middle of busy conference season, and I was prepping for an upcoming conference talk.
As I often do, I went to Neo4j Aura to spin up a free database and use Cypher with APOC to import data from an API, but this API requires a header, and the APOC procedure that adds headers to a request is blocked by security in Aura. Hm, I needed a new route.
read moreBlog
Verify Connectivity: How to Check the Neo4j Connection from a Spring Boot Application
Photo credit I have recently been working on a self-paced learning course for Spring Data Neo4j and wanted users to be able to test the database connection. Typically, in a Spring Boot application with Spring Data, you set the database credentials as properties in the application.properties file. You can run the application with just these details, but it only fails when the database URI has improper syntax. The application does not actually test the connection to see if it is valid and successfully connects.
read moreBlog
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 more