<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jaime Acevedo on Medium]]></title>
        <description><![CDATA[Stories by Jaime Acevedo on Medium]]></description>
        <link>https://medium.com/@jaime.acevedo?source=rss-3668e30749d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4wdseD9r8nqaB28Q</url>
            <title>Stories by Jaime Acevedo on Medium</title>
            <link>https://medium.com/@jaime.acevedo?source=rss-3668e30749d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:31:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jaime.acevedo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Apache James Listener with Kafka Message]]></title>
            <link>https://medium.com/@jaime.acevedo/apache-james-listener-with-kafka-message-3cb52ba3b552?source=rss-3668e30749d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cb52ba3b552</guid>
            <category><![CDATA[java-programming]]></category>
            <category><![CDATA[apache-james]]></category>
            <category><![CDATA[java8]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[Jaime Acevedo]]></dc:creator>
            <pubDate>Wed, 03 Jul 2024 14:42:47 GMT</pubDate>
            <atom:updated>2024-07-03T14:42:47.430Z</atom:updated>
            <content:encoded><![CDATA[<p>One of my last projects was to create a listener for an SMTP server called Apache James.<br>The project looked very easy about what the listener had to do, in simple words when an email was received the listener had to store the data in an S3 bucket and send a message to a Kafka stream.<br>Everything worked fine with compilation with no problem, but at execution time, it was impossible to send the message I got an error ClassNotFound, in execution time.</p><pre>org.apache.kafka.common.config.ConfigException: Invalid value io.confluent.kafka.serializers.KafkaAvroSerializer for configuration key.serializer: Class io.confluent.kafka.serializers.KafkaAvroSerializer could not be found.</pre><p>I tried every different approach to this problem, I included the class in the classpath, in the jar file, and I cleaned all code to be sure the problem wasn’t me.</p><p>One day I got a different error.</p><pre>org.apache.kafka.common.serialization.StringSerializer could not be found</pre><p>With that error I start pull the string and finally, I could catch the problem. It is the execution context for the Kafka producer and I found this in a <a href="https://stackoverflow.com/questions/37363119/kafka-producer-org-apache-kafka-common-serialization-stringserializer-could-no">stackoverflow </a>.</p><p>I needed to add this line before produce the message to Kafka Stream.</p><pre>Thread.currentThread().setContextClassLoader(null);</pre><p>I still don’t understand very well what caused the problem (maybe because my knowledge about how Apache James works is very poor) but all was solved if I set the context in null where the Kafaka producer runs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cb52ba3b552" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run Postgres docker from restored backup]]></title>
            <link>https://medium.com/@jaime.acevedo/how-to-postgres-docker-restoring-backup-2ebb7dc0c806?source=rss-3668e30749d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ebb7dc0c806</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[postgresql-replication]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Jaime Acevedo]]></dc:creator>
            <pubDate>Fri, 11 Nov 2022 14:33:40 GMT</pubDate>
            <atom:updated>2022-11-12T14:31:02.895Z</atom:updated>
            <content:encoded><![CDATA[<p>Some time ago, I started working with docker, but all the manuals tell the same things but no one give the complete solution to my problem.</p><p>To start I need a container with postgres and to restore a database into that container.</p><p>The first thing that I need is to get a postgres container running on my host. Start downloading the imagen:</p><pre>docker pull postgres:14.5</pre><p>This command download the imagen of a container with postgres version 14.5. You can find the complete list of versions of postgres images in the <a href="https://hub.docker.com/_/postgres">official site</a></p><p>After you have downloaded the imagen, you need to start a container with the downloaded image:</p><pre>docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:14.5</pre><p>This will run a container named “postgres” with a postgres version 14.5 engine, with <strong>user</strong> “postgres” and <strong>password</strong> “postgres” and database <strong>name</strong> “postgres”.</p><p>I suppose you will have a backup to make restore, then you have to copy this backup inside the container machine. In this example you backup file is named “backup.dmp”:</p><pre>docker cp backup.dmp postgres:/tmp/backup.dmp</pre><p>The command “docker cp” allow you copy from your local host into the container. Now you already have your backup inside the container, and now you can restore it with the following command</p><pre>docker exec -i postgres pg_restore --verbose --clean --no-acl --no-owner -U postgres -d postgres /tmp/backup.dmp</pre><p>This command is executed in interactive mode and the command come after the container name with all the its options. You must note the path that use in the commad to execute, is the path inside of container.</p><p>Now you already have a container with postgres running on your host with all the information restored from your backup.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ebb7dc0c806" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>