You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Torsten Schlabach (JIRA)" <ji...@apache.org> on 2005/07/28 13:49:25 UTC
[jira] Created: (JCR-176) JCRTest.java (First Steps example code): to few parameters in session.importXML
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
Assigned to: 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
[jira] Updated: (JCR-176) JCRTest.java (First Steps example code): to few parameters in session.importXML
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-176?page=all ]
Marcel Reutegger updated JCR-176:
---------------------------------
Description:
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.
was:
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."));
Environment:
> 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
>
> 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.
--
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
[jira] Resolved: (JCR-176) JCRTest.java (First Steps example code): to few parameters in session.importXML
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-176?page=all ]
Marcel Reutegger resolved JCR-176:
----------------------------------
Resolution: Fixed
Fixed in revision: 230780
Changes will be published when the site is generated the next time.
> 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
>
> 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.
--
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
[jira] Closed: (JCR-176) JCRTest.java (First Steps example code): to few parameters in session.importXML
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-176?page=all ]
Marcel Reutegger closed JCR-176:
--------------------------------
> 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
>
> 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.
--
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
[jira] Commented: (JCR-176) JCRTest.java (First Steps example code): to few parameters in session.importXML
Posted by "Torsten Schlabach (JIRA)" <ji...@apache.org>.
[ 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