cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with folder path

alessandrolazar
Champ in-the-making
Champ in-the-making
My content will be send by Webservice, and I'm with some problems to indicate as a folder path any user space different of "app:company_home"

For example:

"/app:company_home/app:user_homes/sys:Alessandro Home/cm:Alessandro Home"

Does anyone know what would be wrong?

Thanks
28 REPLIES 28

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Other than company_home and other standard folders, all other path name of the folders that are created follows  ISO9075 encoding.


import org.alfresco.util.ISO9075;
"/cm:"+ISO9075.encode(foldername)


Best Regards,
Shagul

chapeaurouge
Champ in-the-making
Champ in-the-making
Cool. But it still doesn't want to upload my file in that child folder.

Is there any sync issue when i execute the CML for the subfolder creation, and the actual CML execution of the document's upload in that subfolder?

Thanks a lot.

morpheus
Champ in-the-making
Champ in-the-making
ok , check with Tcpmon ,  and post the parts of the  message , indicating , which exception has been thrown and the path your are requesting !(all is in that soap message)

chapeaurouge
Champ in-the-making
Champ in-the-making
Good idea.

Ran a tcpdump, and there is an error executing the xpath:


org.alfresco.service.cmr.repository.XPathException: Error executing xpath: \n   xpath: /app:company_home/app:user_homes/sys:apsys/cm:2008

chapeaurouge
Champ in-the-making
Champ in-the-making
using ISO9075 encode on the year part, I get

java.lang.IllegalStateException: Failed to resolve to a single NodeRef with parameters (store=workspace:SpacesStore uuid=null path=/app:company_home/app:user_homes/sys:apsys/cm:_x0032_008), found 0 nodes.

morpheus
Champ in-the-making
Champ in-the-making
the requesting path is wrong , check the prefixes of the spaces, therefore check the type of that "space" and look in the schema declaration

rivetlogic
Champ on-the-rise
Champ on-the-rise
I remember running into a similar problem with an older Alfresco version where I couldn't access folder names that start with a numeric digit using web services. Try to change your year folder name to Year_2008 and see what happens.

Hope this helps,

-Alaaeldin

chapeaurouge
Champ in-the-making
Champ in-the-making
I remember running into a similar problem with an older Alfresco version where I couldn't access folder names that start with a numeric digit using web services. Try to change your year folder name to Year_2008 and see what happens.

Hope this helps,

-Alaaeldin
OK. Will try when I am back from vacation in September Smiley Happy Thanks for the input.

kumbach
Champ in-the-making
Champ in-the-making
RivetLogic is correct, you can't use folder names that begin with a number. Or contain spaces and possibly other symbols.

The solution is to ISO9075 encode your space names. Here is a snippet of code as an example of how to do so:

String docPath = "/app:company_home/cm:" + ISO9075.encode("2008 Folder with Spaces In the Name");

ISO9075 methods are the package org.alfresco.util.ISO9075

chapeaurouge
Champ in-the-making
Champ in-the-making
Digit was the issue for me… Can't start with a digit indeed! Thanks.