AnsweredAssumed Answered

Problems with Alfresco Web Services

Question asked by fbertos on May 30, 2006
Latest reply on Jun 8, 2006 by fbertos
Hi,

I'm using Alfresco 1.3 community, Tomcat 1.5 and JDK 1.5, and I have a problem with Alfresco Web Services. I'm trying to create many folders from another web application, using alfreso web services, but after the 20th folder aprox. my system crashes and alfresco too. It's necessary reboot tomcat after that.

I'm getting the following error:

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.Object.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;</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:518)
   at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at ….

The source code is:

         AuthenticationUtils.startSession("theuser", "thepassword");
         String path = "/app:company_home/cm:TEST";
         RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();

         for (int i=0; i<500; i++)
         {
            String name = "TEST_" + i;
             Store store = new Store(StoreEnum.workspace, "SpacesStore");
              Reference reference = new Reference(store, null, path);
            
              ParentReference parentReference = new ParentReference(
                      store,
                      reference.getUuid(),
                      reference.getPath(),
                      Constants.ASSOC_CONTAINS,
                      Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, name));              
              NamedValue[] properties = new NamedValue[]{new NamedValue(Constants.PROP_NAME, name)};
              CMLCreate create = new CMLCreate(name, parentReference, Constants.TYPE_FOLDER, properties);
              CML cml = new CML();
              cml.setCreate(new CMLCreate[]{create});
              repositoryService.update(cml);
         }
         
           AuthenticationUtils.endSession();

Can anybody help me, please?

Thanks.

fbertos.

Outcomes