jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Lindstaedt" <Sebastian.Lindsta...@vaberlin.de>
Subject special Constraints on Node names ?
Date Mon, 10 Nov 2008 14:25:30 GMT
I'm created a naming scheme for my nodes that uses md5-file hashes of its attached file (jcr:data)
for the node name
Creating of the nodes, goes like this:

Node compoundNode = n.addNode(removeFileExtension(hashValue), "nt:unstructured");


compoundNode.setProperty("fileExtension", extension.toString());

compoundNode.setProperty("hashValue", hashValue);

compoundNode.setProperty("fileName", simpleFileName);

compoundNode.setProperty("valid", validFile);

compoundNode.setProperty("jcr:mimeType", mimeType);

compoundNode.setProperty("jcr:encoding", encoding);

File file = new File(filePath);

compoundNode.setProperty("jcr:data",new FileInputStream(file));

Calendar lastModified = Calendar.getInstance();






Given that creation scheme there are nodes with names that start with an number (e.g. 9428beec5dd65d1b54985661ca3eefca)

and there are nodes with names, that start with a character (e.g 	a980d10665f268b0ec6c13ebea43034f
). Using the same QueryString (except the different node names), it seems that those starting
with a number are not found and I get an Exception like this:

A 'javax.jcr.query.InvalidQueryException' has occured. Reason: Encountered "return" at line
1, column 71

The used XQuery String looks like this:

InfrastructureCategories/R/9428beec5dd65d1b54985661ca3eefca  <-- not working

InfrastructureCategories/R/a980d10665f268b0ec6c13ebea43034f  <-- working

Is something wrong wih my XQuery? Are Nodenames constrained to start with a letter?


Thanks and Greetings,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message