title: weblogic.socket.UnrecoverableConnectException
body: <p>I have an ejb deployed on weblogic. I am able to successfully get the remote reference via a simple java client. However when I hit the ejb via my web application it throws the below exception:</p>
  
  <pre><code>javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason: HTTP/1.1 404 Not Found]]
      at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
      at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:783)
      at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:367)
      at weblogic.jndi.Environment.getContext(Environment.java:315)
      at weblogic.jndi.Environment.getContext(Environment.java:285)
      at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
      at javax.naming.InitialContext.init(InitialContext.java:223)
      at javax.naming.InitialContext.&lt;init&gt;(InitialContext.java:197)
  </code></pre>
  
  <p>I am not sure why the protocol is HTTP, i am using t3. Here's my code:</p>
  
  <pre><code>Properties serverProperties = new Properties();
          serverProperties.put("java.naming.provider.url", "t3://localhost:3080");
          serverProperties.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
  
          InitialContext context = new InitialContext(serverProperties);
  </code></pre>