title: Saving Data in JCR Node, what am I doing wrong?
body: <p>I have created and deployed a bundle(Servlet) successfully that accepts username and password from user, now I want to save it in JCR Repository under /content/mydata/
  I am getting Exception</p>
  
  <pre><code>java.lang.IllegalArgumentException: relPath is not a relative path: {}  {}oliver
  </code></pre>
  
  <p>Here is my code</p>
  
  <pre><code>  public class CustomerJCRAccessImp implements CustomerService {
          @Reference
          protected SlingRepository repository;
  
      protected static final Logger log = LoggerFactory.getLogger(CustomerJCRAccessImp.class);
  
      public void insertData(String username, String password) throws Exception {
  
          log.error("Username ::"+username+" Password ::"+password);
          log.error("XXX:: Inside the Service Method");
          Session session=    repository.loginAdministrative(null);
          Node node= session.getRootNode();
          Node contentNode = node.getNode("content");
          //node.i
          Node  myAppNode = contentNode.getNode("myApp");
          log.error("THE VALUE OF myApp NODE ::"+myAppNode);
  
  
          Node user = myAppNode.addNode("/"+username);
          user.setProperty("Roll No", "1");
          user.setProperty("Age", "10");
          user.setPrimaryType("nt:unstructured");
  
          session.save();
          session.logout();
  
  
  
  
      }
      protected void bindRepository(SlingRepository repository) {
          this.repository = repository; 
      }
  }
  </code></pre>
  
  <p>I have done this by referring this link
  <a href="http://helpx.adobe.com/experience-manager/using/persisting-cq-data-java-content.html" rel="nofollow">http://helpx.adobe.com/experience-manager/using/persisting-cq-data-java-content.html</a>
  Thanks in Advance.</p>