title: Jackrabbit ignored Credentials
body: <p>I'm trying to deploy this example</p>
  
  <pre><code>import javax.jcr.Repository; 
  import javax.jcr.Session; 
  import javax.jcr.SimpleCredentials; 
  import javax.jcr.Node; 
  import org.apache.jackrabbit.core.TransientRepository; 
  
  /** 
   * Second hop example. Stores, retrieves, and removes example content. 
   */ 
  public class Fish {
  
  static Repository repository;
  
  public static void main(String[] args) {
  
      Session session = null;
      try {
          repository = getRepositoryHandle();
          SimpleCredentials simpleCredentials = new SimpleCredentials(
                  "username", "password".toCharArray());
  
          session = repository.login(simpleCredentials);
  
          Node root = session.getRootNode();
          Node hello = root.addNode("Olá");
          Node world = hello.addNode("Mundo");
          world.setProperty("Message", "olá mundo");
          session.save();
  
          Node node = root.getNode("Olá/Mundo");
          System.out.println(node.getPath());
          System.out.println(node.getProperty("Message").toString());
  
          root.getNode("Olá").remove();
          session.save();
      } catch (Exception e) {
          throw new RuntimeException(e);
      } finally {
          if (session != null)
              session.logout();
      }
  }
  
  private static Repository getRepositoryHandle() {
      if (repository == null)
          repository = new TransientRepository();
      // "classpath:repository.xml", "target/repository");
      return repository;
  }
  
  }
  </code></pre>
  
  <p>adapted from <a href="https://jackrabbit.apache.org/" rel="nofollow">https://jackrabbit.apache.org/</a></p>
  
  <p>When I deploy it on eclipse, I get following errors and exceptions:</p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: javax.jcr.LoginException: LoginModule ignored Credentials
      at recipe.Fish.main(Fish.java:38)
  Caused by: javax.jcr.LoginException: LoginModule ignored Credentials
      at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1526)
      at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:381)
      at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:144)
      at recipe.Fish.main(Fish.java:22)
  Caused by: javax.security.auth.login.FailedLoginException: LoginModule ignored Credentials
      at org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:87)
      at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1498)
      ... 3 more
  </code></pre>
  
  <p>Can someone help me with this issue, please ?</p>
  
  <p>Thanks in advance.</p>