<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Oluwatimilehin Awoniyi</title>
    <description>The latest articles on DEV Community by Oluwatimilehin Awoniyi (@oxtimilehin).</description>
    <link>https://dev.to/oxtimilehin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1052938%2F05198853-956d-4abb-b00c-423d053f6a7c.jpeg</url>
      <title>DEV Community: Oluwatimilehin Awoniyi</title>
      <link>https://dev.to/oxtimilehin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oxtimilehin"/>
    <language>en</language>
    <item>
      <title>The Surprising Reason Your JSON Data is Returning null in Spring Boot</title>
      <dc:creator>Oluwatimilehin Awoniyi</dc:creator>
      <pubDate>Wed, 19 Mar 2025 18:10:43 +0000</pubDate>
      <link>https://dev.to/oxtimilehin/the-surprising-reason-your-json-data-is-returning-null-in-spring-boot-15n3</link>
      <guid>https://dev.to/oxtimilehin/the-surprising-reason-your-json-data-is-returning-null-in-spring-boot-15n3</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Last week, I found myself in a debugging nightmare. My Spring Boot services were talking, but somehow, one of them was ghosting key data.&lt;/p&gt;

&lt;p&gt;The amount field came through fine, but the ID? Completely missing.&lt;/p&gt;

&lt;p&gt;It felt like my code was gaslighting me—until I found the culprit. And it was something so basic, yet so sneaky, that I had to share it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Problem: Why is JSON Returning &lt;code&gt;null&lt;/code&gt;?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I had two Spring Boot services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Service A (Client)&lt;/strong&gt; → Sends a &lt;code&gt;Payment&lt;/code&gt; object to another service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service B (Server)&lt;/strong&gt; → Receives and processes the &lt;code&gt;Payment&lt;/code&gt; object.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s what was sent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"requestId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"5ea2aa99-4020-4d9f-9d1f-1737d5df2a6e"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;15.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But Service B expected this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"5ea2aa99-4020-4d9f-9d1f-1737d5df2a6e"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;15.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The amount was fine, but the ID kept returning &lt;code&gt;null&lt;/code&gt;. Why?&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Jackson and Java Reflection: The Silent Saboteurs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Spring Boot uses &lt;strong&gt;Jackson&lt;/strong&gt; for JSON serialization and deserialization. But here’s something most people don’t realize:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Jackson doesn’t look at field names. It looks at method names—specifically getters.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is where &lt;strong&gt;Java reflection&lt;/strong&gt; comes in. Jackson scans your class for getter methods (methods that start with &lt;code&gt;get&lt;/code&gt;), removes the &lt;code&gt;get&lt;/code&gt; prefix, and converts the first letter to lowercase.&lt;/p&gt;

&lt;p&gt;And that’s exactly where my problem was hiding.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Naming Mismatch That Broke Everything&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let's look at the &lt;code&gt;Payment&lt;/code&gt; class in &lt;strong&gt;Service A (Client)&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Payment&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;getRequestId&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;  &lt;span class="c1"&gt;// This is the problem!&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setId&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Getters/Setters for amount...&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Wait… What’s Wrong Here?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;My &lt;strong&gt;field name&lt;/strong&gt; is &lt;code&gt;id&lt;/code&gt;, but my &lt;strong&gt;getter method&lt;/strong&gt; is &lt;code&gt;getRequestId()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jackson assumes the JSON key should be "requestId"&lt;/strong&gt;, not "id".&lt;/li&gt;
&lt;li&gt;But my receiving service (Service B) expects the key to be &lt;code&gt;"id"&lt;/code&gt;, not &lt;code&gt;"requestId"&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Meanwhile, in &lt;strong&gt;Service B (Server)&lt;/strong&gt;, the class looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Payment&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setId&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So Service B was looking for &lt;code&gt;"id"&lt;/code&gt; in the JSON… but it wasn’t there. Instead, the JSON had &lt;code&gt;"requestId"&lt;/code&gt;, which &lt;strong&gt;Service B didn’t recognize&lt;/strong&gt;, causing &lt;code&gt;id&lt;/code&gt; to be &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Boom. Naming mismatch = Bug.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Fix: How to Prevent This Issue&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Solution 1: Use Consistent Getter and Setter Names (Best Practice)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The cleanest fix is to &lt;strong&gt;follow JavaBean conventions&lt;/strong&gt; properly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;getId&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setId&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, Jackson will correctly map the &lt;code&gt;id&lt;/code&gt; field in JSON.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Solution 2: Use &lt;code&gt;@JsonProperty&lt;/code&gt; for Explicit Mapping (When You Can’t Rename)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If renaming isn’t an option (e.g., for backward compatibility), use &lt;code&gt;@JsonProperty&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.fasterxml.jackson.annotation.JsonProperty&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;@JsonProperty&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"id"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// Force JSON to use "id" instead of "requestId"&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;getRequestId&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells Jackson:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I don’t care what the method name is—just use 'id' as the field name in JSON."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Testing Your Fix (Trust, but Verify)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;After fixing the issue, I wrote a quick test to ensure it worked:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Test&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;testJsonSerialization&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Payment&lt;/span&gt; &lt;span class="n"&gt;payment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Payment&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;payment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setId&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"test-id"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;payment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setAmount&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;15.0&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="nc"&gt;ObjectMapper&lt;/span&gt; &lt;span class="n"&gt;mapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ObjectMapper&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mapper&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeValueAsString&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payment&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;assertTrue&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;contains&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"\"id\":\"test-id\""&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simple test &lt;strong&gt;saved me hours of potential headaches later&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Key Takeaways (Lessons Learned)&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Follow JavaBean Conventions&lt;/strong&gt; – Name your getters and setters &lt;strong&gt;exactly&lt;/strong&gt; like your fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jackson Maps Methods, Not Fields&lt;/strong&gt; – It uses &lt;strong&gt;getters, not variable names&lt;/strong&gt;, for JSON property names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;@JsonProperty&lt;/code&gt; When Necessary&lt;/strong&gt; – If you can’t rename, force Jackson to use the correct key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Your Serialization&lt;/strong&gt; – Always verify how your objects get converted to JSON.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion: One Tiny Naming Mistake, One Giant Bug&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Sometimes, the most frustrating bugs come from &lt;strong&gt;the simplest mistakes&lt;/strong&gt;. In my case, a &lt;strong&gt;getter name mismatch&lt;/strong&gt; silently broke JSON mapping between two services.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Moral of the story? Naming your getters and setters correctly is like giving your code a GPS—it actually knows where to find things.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So next time you see unexpected &lt;code&gt;null&lt;/code&gt; values when exchanging JSON between services, take a &lt;strong&gt;close&lt;/strong&gt; look at your getter and setter method names.&lt;/p&gt;

&lt;p&gt;The answer might be &lt;strong&gt;staring you right in the face.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>java</category>
      <category>jackson</category>
      <category>programming</category>
    </item>
    <item>
      <title>Paladin: a job application manager</title>
      <dc:creator>Oluwatimilehin Awoniyi</dc:creator>
      <pubDate>Tue, 27 Feb 2024 12:37:55 +0000</pubDate>
      <link>https://dev.to/oxtimilehin/paladin-2d7n</link>
      <guid>https://dev.to/oxtimilehin/paladin-2d7n</guid>
      <description>&lt;p&gt;Paladin helps job seekers manage their job applications and easily apply to vacancies that provide email addresses to where applications are to be made. Our team members are Ayomide ADETULE and myself. Our focus and interest were essentially in the frontend part of engineering, hence, we chose to utilise Supabase for the backend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb68zne0vqnl6mc7qiqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb68zne0vqnl6mc7qiqa.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The story behind Paladin mirrors the current reality of job searching, the wide array of skills that individuals possess and the need to have an interface/profile for these skills, all for the purpose of making the process of job applications easier and unified. For me, this will mean I can create an interface as a frontend engineer, brand identity designer and technical writer all under a profile and manage them accordingly!&lt;/p&gt;

&lt;p&gt;For the frontend, we chose to use Sveltekit, a JavaScript framework. We opted for this because it is one of the closest things to writing HTML5, CSS3 and JavaScript! We didn’t want to delve into the nuance and intricacies of a more technical framework like React. For the backend, we chose Supabase to handle the backend for us!&lt;/p&gt;

&lt;p&gt;We have achieved responsiveness of the web app, setup and integration with Supabase and we have set up a PostgreSQL database with the help of Supabase. We were going to simply authenticate users via email and passwords till we got notice of magic links, hence, we are currently migrating to adopting this feature!&lt;/p&gt;

&lt;p&gt;One of the most technical challenges I faced in this project was integrating SwiperJS to work with Sveltekit! This was not an issue of knowledge but that of conflicting documentation on the SwiperJS website. They were migrating to a version and recommended an approach to installing and using their features, but the recommended mode of installation was not compatible with the content of the documentation. The task was then to find a way to install, implement and successfully use the particular carousel feature we wanted. I went to the GitHub code of SwiperJS to understand the code and I also checked out some of the implementations of previous users on code sandboxes online but those didn’t help. In reading and studying the code on GitHub and going over the documentation, I was able to create a synergy and I crafted a way to add the feature! The result is currently the first feature in the feature section of our landing page: the carousel!&lt;/p&gt;

&lt;p&gt;This project taught me that beyond writing codes, understanding what is needed to be done is prior, hence, finishing the problem on paper before writing code is an important aspect of engineering. Going forward, I’ll always have a blueprint of my intended solution on paper before getting to code!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Jon-tim/paladin"&gt;Github link for the project&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://paladin-tau.vercel.app/"&gt;Link to deployed page&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How To Troubleshoot a Silent Webpage (A Docker Misadventure)</title>
      <dc:creator>Oluwatimilehin Awoniyi</dc:creator>
      <pubDate>Mon, 15 Jan 2024 10:35:56 +0000</pubDate>
      <link>https://dev.to/oxtimilehin/troubleshooting-a-silent-webpage-a-docker-misadventure-325h</link>
      <guid>https://dev.to/oxtimilehin/troubleshooting-a-silent-webpage-a-docker-misadventure-325h</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Ever faced a webpage that refuses to say a word? Join me in unraveling a recent hiccup in our Docker adventures, where an innocuous port-curling expedition turned into an unexpected outage. In this blog post, we'll navigate through the timelines, actions taken, and the crucial lessons learned from this episode.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Incident: A Webpage Goes Mute
&lt;/h2&gt;

&lt;p&gt;It all started on a regular &lt;code&gt;Monday morning at 10:47 AM (WAT)&lt;/code&gt;. Eager to check on the latest Docker container, I initiated a simple &lt;code&gt;curl&lt;/code&gt; command on port 8080 mapped to the container's port 80. To my surprise, instead of a cheerful page, I was greeted with the ominous message: "empty reply from server."&lt;/p&gt;

&lt;h2&gt;
  
  
  The Impact: Silent Users and Empty Pages
&lt;/h2&gt;

&lt;p&gt;The repercussions were swift. Our webpage turned into a mute spectator, rendering nothing but an empty response. Quick estimates suggested about 5% of our users were caught in this silent storm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Root Cause: The Vanishing Server Start
&lt;/h2&gt;

&lt;p&gt;The detective work began. The culprit? A server that mysteriously forgot to start after a recent operation. A simple oversight, yet one that sent ripples through our digital landscape.&lt;/p&gt;

&lt;h2&gt;
  
  
  Timeline: The Race Against Time
&lt;/h2&gt;

&lt;p&gt;At &lt;code&gt;10:47 AM&lt;/code&gt;, the silent alarm was raised, not by a user complaint, but by our vigilant monitoring alert. The race against time had begun.&lt;/p&gt;

&lt;h2&gt;
  
  
  Actions Taken: Unveiling the Silent Server
&lt;/h2&gt;

&lt;p&gt;The first move was to inspect the server's whereabouts. What port was it listening to? Was it even awake? A thorough check revealed the dormant state of our crucial server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resolution: Reviving the Silent Server
&lt;/h2&gt;

&lt;p&gt;With the issue laid bare, the solution was straightforward: start the server! However, to prevent such muteness in the future, a Puppet script was introduced. Now, every server update triggers an automatic start, silencing any potential disruptions.&lt;/p&gt;

&lt;p&gt;Initially using a bash script, this was used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash
# get Apache to run on the container and to return a page

service apache2 start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Puppet for automation, let's create a Puppet manifest file. Let's call it &lt;code&gt;apache_service.pp&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# File: apache_service.pp

# Define a class for managing the Apache service
class apache_service {
  service { 'apache2':
    ensure =&amp;gt; 'running',
    enable =&amp;gt; true,
    subscribe =&amp;gt; File['/etc/apache2/httpd.conf'], # Trigger the service restart when the Apache configuration file is updated
  }
}

# Apply the class to ensure it is included when Puppet runs
include apache_service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Root Cause and Resolution: Learning from the Silence
&lt;/h2&gt;

&lt;p&gt;The root cause was a temporarily faulty server, fixed but left in silence. The resolution? A proactive decision to script server starts, ensuring they speak up after every update.&lt;/p&gt;

&lt;h2&gt;
  
  
  Corrective and Preventative Measures: Scripts and Vigilance
&lt;/h2&gt;

&lt;p&gt;To fortify our defenses, every engineer is now armed with mandatory pre and post-server operation scripts. Additionally, the Quality Assurance team is on high alert, (re)educated on the nuances of our vigilant monitoring tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: Lessons from Silence
&lt;/h2&gt;

&lt;p&gt;In the ever-evolving landscape of Docker and servers, even a momentary silence can be deafening. This incident taught us the importance of vigilance, automation, and proactive measures. Let this be a reminder to all: in the realm of webpages, silence is not always golden.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>web</category>
      <category>devops</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
