cancel
Showing results for 
Search instead for 
Did you mean: 

erroneous 2 nodes found error

bparis
Champ in-the-making
Champ in-the-making
Hi,

I have created two subspaces in a parent space named "images".
The subspaces are respectively named "repertoire des bebes" and "répertoires des bébés".
When I try


      ParentReference companyHomeParent = new ParentReference(storeRef, null,
            "/app:company_home/cm:UCL/cm:images/cm:" + ISO9075.encode("repertoire des bebes") , Constants.ASSOC_CONTAINS, null);

I get
{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:UCL/cm:images/cm:repertoire_x0020_des_x0020_bebes), found 2 nodes.</ns1:message>

So I understand there is a path confusion perhaps due to the encoding… ?
What's the origin of that confusion and how to solve it ?
Alfresco is 3.1.1.

Thanks for any help,
Bernardbparis
3 REPLIES 3

bparis
Champ in-the-making
Champ in-the-making
it seems it is not an encoding problem: trying

System.out.println(ISO9075.encode("bé bé be be"));

returns:
bé_x0020_bé_x0020_be_x0020_be

So wherelse could be the problem of getting a confusion between "répertoire des bébés" and "repertoire des bebes" when searching the repository with Lucene ?

Bernard

bparis
Champ in-the-making
Champ in-the-making
there obviously is a great confusion problem there, in the repositoty characters with accents are treated just as they have no accent
(i.e. "é" is treated as a "e") :

If I have a space named "répertoires des bébés" (with "é") alone under the space "images", this succeeds:
ParentReference companyHomeParent = new ParentReference(storeRef, null,
      "/app:company_home/cm:UCL/cm:images/cm:" + ISO9075.encode("repertoire des bebes") , Constants.ASSOC_CONTAINS, null);

This (and the previous erroneous 2 nodes found error) clearly mean that for alfresco "répertoire des bébés"=="repertoire des bebes", oups !

bernard

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 date
wsimport-client-ContentService:
files are up to date
wsimport-client-generate:
Compiling 1 source file to C:\Documents and Settings\ehtsham\My Documents\NetBeansProjects\UploadTest\build\classes
compile:
run:
inside alfresco part:…
Connecting to: http://localhost:8080/alfresco
Ticket::TICKET_bd0f745deaf88d459c4dd9b8c2c76be8bdc93029
Association type:::{http://www.alfresco.org/model/content/1.0}contains
ChiledName:::null
Path:::::/app:company_home/cm:null
Creating the document file.txt
Can 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;@e0a386

session ending
Closing 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)

i'll be very very thankful to you please help Smiley Sad