title: Failed to create Blob container in Microsoft Azure
body: <p>I followed the tutorial of Azure Blob storage service <a href="https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-java" rel="nofollow noreferrer">here</a> and supplied the connection string from my storage account to create a container but it did not work as the container is not created and the application runs until I terminate it manually. I used azure-blob-storage API version 12.4.0. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>// Create a BlobServiceClient object which will be used to create a container client
  BlobServiceClient blobServiceClient = new BlobServiceClientBuilder().connectionString(connectStr).buildClient();
  
  //Create a unique name for the container
  String containerName = "quickstartblobs" + java.util.UUID.randomUUID();
  
  // Create the container and return a container client object
  BlobContainerClient containerClient = blobServiceClient.createBlobContainer(containerName);
  </code></pre>
  
  <p>Here is my pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;aaaa&lt;/groupId&gt;
      &lt;artifactId&gt;ddada&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;11&lt;/source&gt;
                      &lt;target&gt;11&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;aws-java-sdk&lt;/artifactId&gt;
              &lt;version&gt;1.11.327&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.8.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/commons-io/commons-io --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.google.cloud/google-cloud-storage --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;google-cloud-storage&lt;/artifactId&gt;
              &lt;version&gt;1.108.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/commons-io/commons-io --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;de.hpi.cloudraid&lt;/groupId&gt;
              &lt;artifactId&gt;erasure&lt;/artifactId&gt;
              &lt;version&gt;1.0.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.hiramsoft.commons&lt;/groupId&gt;
              &lt;artifactId&gt;jsalparser&lt;/artifactId&gt;
              &lt;version&gt;0.2-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-csv&lt;/artifactId&gt;
              &lt;version&gt;1.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.googlejavaformat&lt;/groupId&gt;
              &lt;artifactId&gt;google-java-format&lt;/artifactId&gt;
              &lt;version&gt;1.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.crypto.tink&lt;/groupId&gt;
              &lt;artifactId&gt;tink&lt;/artifactId&gt;
              &lt;version&gt;1.3.0-rc3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;dev.morphia.morphia&lt;/groupId&gt;
              &lt;artifactId&gt;core&lt;/artifactId&gt;
              &lt;version&gt;1.5.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.10&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.dataformat&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-dataformat-csv&lt;/artifactId&gt;
              &lt;version&gt;2.11.0.rc1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;2.11.0.rc1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.opencsv/opencsv --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.opencsv&lt;/groupId&gt;
              &lt;artifactId&gt;opencsv&lt;/artifactId&gt;
              &lt;version&gt;5.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.hierynomus&lt;/groupId&gt;
              &lt;artifactId&gt;sshj&lt;/artifactId&gt;
              &lt;version&gt;0.27.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.azure/azure-storage-blob --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.azure&lt;/groupId&gt;
              &lt;artifactId&gt;azure-storage-blob&lt;/artifactId&gt;
              &lt;version&gt;12.4.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>It also showed another error message like this:</p>
  
  <pre><code>May 29, 2020 3:39:49 PM io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught
  WARNING: An exception 'java.lang.NoSuchMethodError: 'java.lang.String io.netty.handler.codec.http.HttpUtil.formatHostnameForHttp(java.net.InetSocketAddress)'' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception:
  java.lang.NoSuchMethodError: 'java.lang.String io.netty.handler.codec.http.HttpUtil.formatHostnameForHttp(java.net.InetSocketAddress)'
      at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.resolveHostHeaderValue(HttpClientConnect.java:593)
      at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.requestWithBody(HttpClientConnect.java:552)
      at reactor.netty.http.client.HttpClientConnect$HttpIOHandlerObserver.lambda$onStateChange$0(HttpClientConnect.java:429)
      at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44)
      at reactor.netty.http.client.HttpClientConnect$HttpIOHandlerObserver.onStateChange(HttpClientConnect.java:430)
      at reactor.netty.ReactorNetty$CompositeConnectionObserver.onStateChange(ReactorNetty.java:473)
      at reactor.netty.resources.PooledConnectionProvider$DisposableAcquire.onStateChange(PooledConnectionProvider.java:525)
      at reactor.netty.resources.PooledConnectionProvider$PooledConnection.onStateChange(PooledConnectionProvider.java:434)
      at reactor.netty.channel.ChannelOperationsHandler.channelActive(ChannelOperationsHandler.java:62)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192)
      at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelActive(CombinedChannelDuplexHandler.java:414)
      at io.netty.channel.ChannelInboundHandlerAdapter.channelActive(ChannelInboundHandlerAdapter.java:64)
      at io.netty.channel.CombinedChannelDuplexHandler.channelActive(CombinedChannelDuplexHandler.java:213)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192)
      at reactor.netty.tcp.SslProvider$SslReadHandler.userEventTriggered(SslProvider.java:731)
      at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:329)
      at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:315)
      at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:307)
      at io.netty.handler.ssl.SslHandler.setHandshakeSuccess(SslHandler.java:1480)
      at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1318)
      at io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1170)
      at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1195)
      at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
      at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:138)
      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
      at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
      at java.base/java.lang.Thread.run(Thread.java:830)
  </code></pre>
  
  <p>Any reasons why it did not work?</p>