Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Microsoft Teams Certification Problem when sending from Docker Container .- Java App

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my java application I am trying to send a msg to Microsoft teams

When run from my mac works perfect

When I run from a Docker Container I am receiving a certificate error msg


error:
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


Any Ideas ?

Docker Image:

FROM alpine:3.10.3 ARG sha=‘HEAD’ LABEL vcs-ref=$sha

ENV APP_USER=“app”

RUN adduser -H -S -D “${APP_USER}”

WORKDIR /app

RUN apk update && apk add --no-cache openjdk11-jdk python3 py3-pip py3-setuptools py3-six jq curl bash && pip3 install --upgrade pip==19.3.1 && pip install --upgrade awscli boto3 && rm -rf /root/.cache && apk del py3-pip py3-setuptools build-base linux-headers pcre-dev openssl-dev && rm -rf /var/cache/apk/*

ENV JAVA_HOME=/usr/lib/jvm/default-jvm ENV PATH="{JAVA_HOME}/bin:{PATH}"

Code: List configsMsTeams = configMsTeamsRepository.findAll(); String url = “”;

   if (configsMsTeams.size() <= 0) {
       return;
   }

   url = configsMsTeams.get(0).getUrl();

   String message = notification.getMessage();

   Card card = new Card("Card \"Test card\"", "0078D7",
       "Cargo ID: " + notification.getData().get("cargoId"));

   card.setText(message);

   new TeamsClient(url).sendMessage(card);
} catch (Exception e) {
   LOG.error("Error while sending notification to teams: ", e.getMessage());
}
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!