easysoa / EasySOA

A light, collaborative platform to make Service Oriented Architecture simple.
http://www.easysoa.org
35 stars 8 forks source link

SCA Import in Appli whose URL has (wrongly) a port moves its api under itself #20

Closed mdutoo closed 12 years ago

mdutoo commented 13 years ago

How to reproduce :

Solution : check that appli and API URL are of the right form (no port for applis), if not enough add a guard against moving an API under itself (or at the wrong depth)

2011-07-25 17:49:06,848 ERROR [org.easysoa.sca.ScaImporter] Error when visiting binding org.easysoa.sca.visitors.WSBindingScaVisitor@117bba6 at archi path /trip in SCA composite file smart-travel-mock-services.composite org.nuxeo.ecm.core.api.ClientException: Failed to move document: org.nuxeo.ecm.core.storage.StorageException: Cannot move a node under itself: 7f234a9d-352c-46d5-a80f-b502a01bf973 is under 7f234a9d-352c-46d5-a80f-b502a01bf973 at org.nuxeo.ecm.core.api.AbstractSession.move(AbstractSession.java:700) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:98) at $Proxy22.move(Unknown Source) at org.easysoa.services.NotificationService.notifyServiceApi(NotificationService.java:131) at org.easysoa.sca.visitors.ServiceBindingVisitorBase.visit(ServiceBindingVisitorBase.java:49) at org.easysoa.sca.ScaImporter.acceptBindingVisitors(ScaImporter.java:201) at org.easysoa.sca.ScaImporter.acceptBindingParentVisitors(ScaImporter.java:190) at org.easysoa.sca.ScaImporter.importSCA(ScaImporter.java:129) ... Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.core.api.DocumentException. message: org.nuxeo.ecm.core.storage.StorageException: Cannot move a node under itself: 7f234a9d-352c-46d5-a80f-b502a01bf973 is under 7f234a9d-352c-46d5-a80f-b502a01bf973 at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.move(SQLSession.java:263) at org.nuxeo.ecm.core.api.AbstractSession.move(AbstractSession.java:688) ... 99 more Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.core.storage.StorageException. message: Cannot move a node under itself: 7f234a9d-352c-46d5-a80f-b502a01bf973 is under 7f234a9d-352c-46d5-a80f-b502a01bf973 at org.nuxeo.ecm.core.storage.sql.HierarchyContext.checkNotUnder(HierarchyContext.java:284) at org.nuxeo.ecm.core.storage.sql.HierarchyContext.move(HierarchyContext.java:405) at org.nuxeo.ecm.core.storage.sql.PersistenceContext.move(PersistenceContext.java:756) at org.nuxeo.ecm.core.storage.sql.SessionImpl.move(SessionImpl.java:825) at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.move(ConnectionImpl.java:261) at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.move(SQLSession.java:259) ... 100 more

mkalam-alami commented 12 years ago

Fixed: https://github.com/easysoa/EasySOA/commit/81a1f3f966aa3267342e9073aae9f104d97fb355