title: Quarkus with Azure Text to Speech issue - Cognitive Services
body: <p>I'm using Microsoft Cognitive Services within a Quarkus application. Everything works fine locally... including in a local Docker environment.
  However when I deploy this thing to AKS... it logs the following error:</p>
  <pre><code>    f506c46e-0234-4dc6-a3c8-27d6949cd4b1-1: org.jboss.resteasy.spi.UnhandledException: java.lang.UnsatisfiedLinkError: 'void com.microsoft.cognitiveservices.speech.SpeechConfig.setTempDirectory(java.lang.String)'
      at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:106)
      at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:372)
      at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:218)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:519)
      at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
      at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
      at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
      at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
      at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
      at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:138)
      at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:93)
      at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:503)
      at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2442)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1476)
      at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
      at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
      at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      at java.base/java.lang.Thread.run(Thread.java:834)
  Caused by: java.lang.UnsatisfiedLinkError: 'void com.microsoft.cognitiveservices.speech.SpeechConfig.setTempDirectory(java.lang.String)'
      at com.microsoft.cognitiveservices.speech.SpeechConfig.setTempDirectory(Native Method)
      at com.microsoft.cognitiveservices.speech.SpeechConfig.&lt;clinit&gt;(SpeechConfig.java:77)
  </code></pre>
  <p>I have checked the content of the tmp directory within the pod... and the files are created there... could this be due to the standard OS image that is added as part of a Quarkus container image?
  For reference:</p>
  <pre><code>FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
  
  ARG JAVA_PACKAGE=java-11-openjdk-headless
  </code></pre>
  <p>Content of PODs tmp:</p>
  <pre><code>/work # ls -ltr /tmp
  total 84
  drwxr-xr-x    2 root     root          4096 Aug  3 12:10 hsperfdata_root
  drwxrwxrwx    3 root     root          4096 Aug  3 12:10 vertx-cache
  -rw-r--r--    1 root     root          3839 Aug  3 12:20 m4j3821112471677595333.tmp
  -rw-r--r--    1 root     root         68372 Aug  3 12:20 m4j3337239382403748465.tmp
  drwx------    2 root     root          4096 Aug  3 12:20 speech-sdk-native-15500065335689334576
  </code></pre>
  <p>Azure dependency:</p>
  <pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;com.microsoft.cognitiveservices.speech&lt;/groupId&gt;
        &lt;artifactId&gt;client-sdk&lt;/artifactId&gt;
        &lt;version&gt;1.18.0&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>Not sure what is causing this error. Did anyone experience this behaviour before?</p>