Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 95574 invoked from network); 28 Jul 2005 11:50:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jul 2005 11:50:04 -0000 Received: (qmail 27719 invoked by uid 500); 28 Jul 2005 11:50:02 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 27706 invoked by uid 99); 28 Jul 2005 11:50:02 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2005 04:49:41 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 4AC20F4 for ; Thu, 28 Jul 2005 13:49:27 +0200 (CEST) Message-ID: <1357945590.1122551367304.JavaMail.jira@ajax.apache.org> Date: Thu, 28 Jul 2005 13:49:27 +0200 (CEST) From: "Torsten Schlabach (JIRA)" To: jackrabbit-dev@incubator.apache.org Subject: [jira] Commented: (JCR-176) JCRTest.java (First Steps example code): to few parameters in session.importXML In-Reply-To: <52257400.1122551365064.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JCR-176?page=comments#action_12317067 ] Torsten Schlabach commented on JCR-176: --------------------------------------- Sorry, I cannot edit the isse for whatever reason, so the description is nonsense. What I was trying to report is that in the code on the First Steps page: if (!rn.hasNode("importxml")) { System.out.println("importing xml"); Node n=rn.addNode("importxml", "nt:unstructured"); session.importXML("/importxml", new FileInputStream("repotest/test.xml")); session.save(); } The importXML needs a third parameter, compare to: http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Session.html This prevents the code from the First Steps page from compiling. > JCRTest.java (First Steps example code): to few parameters in session.importXML > ------------------------------------------------------------------------------- > > Key: JCR-176 > URL: http://issues.apache.org/jira/browse/JCR-176 > Project: Jackrabbit > Type: Bug > Components: docs > Reporter: Torsten Schlabach > Assignee: Marcel Reutegger > Priority: Minor > > The JCRTest.java file described in the First Steps document (http://incubator.apache.org/jackrabbit/firststeps.html) on the jackrabbit incubator website contains a line that attempts to create a StringValue using new, rather than using the ValueFactory interface. This causes the code to fail to compile - perhaps an initiative test, but could be off-putting... > Simple fix is to swap the line: > n.setProperty("testprop", new StringValue("Hello, World.")); > to > n.setProperty("testprop", session.getValueFactory().createValue("Hello, World.")); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira