jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhinav Mathur <abhma...@adobe.com>
Subject Issue with node with double byte space
Date Tue, 23 Apr 2013 11:36:40 GMT
Hi,

When I try to create a node with double byte space I get following error

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();
              }
       }


Is this is a bug. I am using jackrabbit-2.6.0


Regards,
Abhinav Mathur

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