Open guptasuresh2004 opened 6 years ago
when trying to create a node with double byte space in name,following error is thrown Exception in thread "main" javax.jcr.RepositoryException: Failed to resolve path 2byte space.jpg relative to node / at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:65) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:1) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:1814) at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1766) at Test.main(Test.java:29) Caused by: org.apache.jackrabbit.spi.commons.conversion.MalformedPathException: '2byte space.jpg' is not a valid path. Whitespace not a allowed in name. at org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:393) at org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:122) at org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver.getQPath(ParsingPathResolver.java:90) at org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:98) at org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:77) at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQPath(DefaultNamePathResolver.java:82) at org.apache.jackrabbit.core.SessionImpl.getQPath(SessionImpl.java:648) at org.apache.jackrabbit.core.session.SessionContext.getQPath(SessionContext.java:338) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:63) ... 6 more This can be reproduced by following code 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 hello = root.addNode("2byte space.jpg"); session.save(); } finally { session.logout(); } } I am using jackrabbit-2.6.0
https://issues.apache.org/jira/browse/JCR-3582