Hi Ross,

        Thank you very much Ross. I removed all the jar files except
jackrabbit-standalone-2.0.1.jar.  Now my application is working.
Actually my application is at location "C:\eclipse-workspace\Web" in my
machine. So  repository is created in the same location. But the nodes
are not added.  Where the nodes will get added. How to view the nodes.
Do you have any idea how to add the txt files to repository using
jackrabbit. 

 

public static void main(String[] args) throws Exception {

        Repository repository = new TransientRepository();

       Session session = repository.login(new
SimpleCredentials("username", "password".toCharArray()));

        try {

            Node root = session.getRootNode();

            // Store content

            Node sampleNode = root.addNode("sampleNode");

Node childNode = sampleNode.addNode("childNode");

            sampleNode.setProperty("message", "Hello jackrabbit world");

            session.save();

            System.out.println("rootnode:"+session.getRootNode()+":");

            // Retrieve content

            Node node = root.getNode("sampleNode");

            System.out.println(node.getPath());

            System.out.println(node.getProperty("message").getString());

 

            // Remove content

            //root.getNode("hello").remove();

            session.save();

       

        } catch (Exception e) {

            e.printStackTrace();

            //session.logout();

        }

Thanks,

Jenni

 

From: [email protected]
[mailto:[email protected]] 
Sent: Wednesday, May 05, 2010 10:47 AM
To: [email protected]
Subject: RE: Getting noSuchMethodError in jackrabbit session.login()
method [SEC=UNCLASSIFIED]

 

Jenni 

I think you need to look again at your classpath and the instructions in
the First Hops example. 

The only jar file you need in your path is
jackrabbit-standalone-2.x.x.jar, it contains unjarred classes from all
of the dependent libraries. 


Give that a shot and see how it goes. 


Ross. 


--------------------------------------------------------------------------------------------

This message, including any attachments, contains confidential information 
intended for a specific individual and purpose, and is intended for the 
addressee only. Any unauthorized disclosure, use, dissemination, copying, or 
distribution of 
this message or any of its attachments or the information contained in this 
e-mail, or the taking of any action based on it, is strictly prohibited. If you 
are not the intended recipient, please notify the sender immediately by return 
e-mail and delete this message.

--------------------------------------------------------------------------------------------

Reply via email to