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

shamabbas
Champ in-the-making
Champ in-the-making
Hi all,
I'm also having a problem while uploading file in folder path. Please help me out as soon as possible.
i'm using following code>
ParentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home/cm:" + ISO9075.encode(fileIndex), Constants.ASSOC_CONTAINS, null);‍‍‍

and I got the following exception.

init:deps-jar:wsimport-init:wsimport-client-RepositoryService:files are up to datewsimport-client-ContentService:files are up to datewsimport-client-generate:Compiling 1 source file to C:\Documents and Settings\ehtsham\My Documents\NetBeansProjects\UploadTest\build\classescompile:run:inside alfresco part:…Connecting to: http://localhost:8080/alfrescoTicket::TICKET_bd0f745deaf88d459c4dd9b8c2c76be8bdc93029Association type:::{http://www.alfresco.org/model/content/1.0}containsChiledName:::nullPath:::::/app:company_home/cm:nullCreating the document file.txtCan not create the document.Error uploading file:::AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode:  faultString:  faultActor:  faultNode:  faultDetail:         {http://www.alfresco.org/ws/service/repository/1.0}RepositoryFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>java.lang.IllegalStateException: Failed to resolve to a single NodeRef with parameters (store=workspace:SpacesStore uuid=null path=/app:company_home/cm:null), found 0 nodes.</ns1:message>        {http://xml.apache.org/axis/}exceptionName:org.alfresco.repo.webservice.repository.RepositoryFault        {http://xml.apache.org/axis/}stackTrace:        at org.alfresco.repo.webservice.repository.RepositoryWebService.update(RepositoryWebService.java:341)        at sun.reflect.GeneratedMethodAccessor455.invoke(Unknown Source)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)        at java.lang.reflect.Method.invoke(Method.java:597)        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)        at java.lang.Thread.run(Thread.java:619)        {http://xml.apache.org/axis/}hostname:flying-int-02        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)        at java.lang.Class.newInstance0(Class.java:355)        at java.lang.Class.newInstance(Class.java:308)        at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)        at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)        at org.alfresco.webservice.repository.RepositoryFault.getDeserializer(RepositoryFault.java:146)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)        at java.lang.reflect.Method.invoke(Method.java:597)        at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)        at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)        at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)        at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)        at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)        at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)[Ljava.lang.StackTraceElement;@e0a386session endingClosing connection.        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)        at org.apache.axis.client.Call.invoke(Call.java:2767)        at org.apache.axis.client.Call.invoke(Call.java:2443)        at org.apache.axis.client.Call.invoke(Call.java:2366)The result file index is null        at org.apache.axis.client.Call.invoke(Call.java:1812)        at org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.update(RepositoryServiceSoapBindingStub.java:986)        at uploadtest.Main.createDocument(Main.java:251)        at uploadtest.Main.upload(Main.java:99)        at uploadtest.Main.main(Main.java:298)BUILD SUCCESSFUL (total time: 4 seconds)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

ill be very thankful to you…  :wink:

yahiko
Champ in-the-making
Champ in-the-making
With my little experience… app:company_home/cm:null ????? to me that doesn´t sound good…


ChiledName:::nullPath:::::/app:company_home/cm:null‍‍

shamabbas
Champ in-the-making
Champ in-the-making
No i have used admin i mean a complete username. i have tried it in different ways all those which were above in forum but nothing helped me out..
please if can upload a syntax will be helpful for me?

And Thnaksss alotz for replying..

z3r0
Champ in-the-making
Champ in-the-making
Hi, I have the following problem. I created a user "hallo". The user folder is called "hallowelt". In alfresco Explorer is "hallowelt" in the following folder "Company Home -> My Home -> hallowelt". I want to store a file with this code there.
arentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home/app:user_home/sys:hallo/cm:hallowelt, Constants.ASSOC_CONTAINS, null);‍‍‍
But nothing happens. If there is only company_home like this, it works.
arentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home, Constants.ASSOC_CONTAINS, null);‍‍‍

Can someone please help me?

yahiko
Champ in-the-making
Champ in-the-making
I think the problem is the path you are passing to ParentReference, have your tried with???:

/app:company_home/cm:my_home/cm:hallowelt‍

My alfresco is only two depth folders (Company Home -> CVS) but i can add content to it as:
folder="/app:company_home/cm:CVS"; ‍

z3r0
Champ in-the-making
Champ in-the-making
Hello,
unfortunately, have your suggestions will not work. And I have even logged in as admin. Another problem is that only the user "admin" can create files.
My new created user "hallo" can not Creating files, nowhere.
 
What I really want?
I want that my created user "hallo" can to store files in a subfolder of his own (my home) folder.

This work:
Log-in user admin password admin
parentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home", Constants.ASSOC_CONTAINS, null);‍‍‍

This don't work
Log-in user admin password admin [folder hallowelt is under Company Home -> My Home -> hallowelt]
parentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home/cm:hallowelt", Constants.ASSOC_CONTAINS, null);‍‍‍
Log-in user hallo password welt [the folder hallowelt is the homespace of the user hallo]
parentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home", Constants.ASSOC_CONTAINS, null);‍‍‍
parentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home/cm:hallowelt", Constants.ASSOC_CONTAINS, null);‍‍‍

Am grateful for every suggestion.

janv
Employee
Employee
Have you tried:

parentReference companyHomeParent = new ParentReference(STORE, null, "/app:company_home/app:user_homes/cm:hallowelt", Constants.ASSOC_CONTAINS, null);

The default user home spaces are typically under "/app:company_home/app:user_homes". You can also verify by using the Node Browser (login to Alfresco Explorer as admin -> Administration Console -> Node Browser).

Regards,
Jan

shamabbas
Champ in-the-making
Champ in-the-making
Hi z3ro,

I used this n its working. I have my own space Flying_Technologies within CompanyHome. and I'm uploading my files in it.
            ParentReference companyHomeParent = getCompanyHome();             System.out.println("Association type:::" + companyHomeParent.getAssociationType());            System.out.println("ChiledName:::" + companyHomeParent.getChildName());            System.out.println("Path:::::" + companyHomeParent.getPath());            Reference document = createDocument(createSpace(companyHomeParent, "Flying_Technologies"), fileName, data);‍‍‍‍‍‍‍‍

  protected ParentReference getCompanyHome() {                  //this method i used above and where ever needed to.        return new ParentReference(STORE, null, "/app:company_home", Constants.ASSOC_CONTAINS, null);    }‍‍‍‍‍

[size=150]
And also I PREFER YOU TO Checkout this link. I really really hope it will help you out.[/size]

http://wiki.alfresco.com/wiki/IngresTutorial_Alfresco_Web_Service_API_for_Java#Reference_to_the_.27C...


  • If above post helps you please Click on Yes button is given on right side.. thanx   Smiley Very Happy
  • rsosborn
    Champ in-the-making
    Champ in-the-making
    Use the "Node Browser" in the application to look up the node.  Click down until it lists it's "name" and "UUID". 
    Plug them into "Parent Reference".  I find this much easier.