IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Intégration Continue Discussion :

XmlRpc API, Changement de groupe


Sujet :

Intégration Continue

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    86
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Juin 2007
    Messages : 86
    Points : 19
    Points
    19
    Par défaut XmlRpc API, Changement de groupe
    Bonjour à tous,

    Pour déplacer un projet donné vers un autre groupe, j'ai utiliser :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    ps.setProjectGroup(client.getProjectGroupSummary(1));
    ps = continuumEManager.updateProject(ps);
    Et vu que ça ne marche pas, j'ai dû modifier l'implémentation du servicfe coté serveur (ContinuumServiceImpl.java):
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
     public ProjectSummary updateProject( ProjectSummary project )
            throws ContinuumException
        {
            ProjectSummary ps = getProjectSummary( project.getId() );
    
            checkRemoveProjectFromGroupAuthorization( ps.getProjectGroup().getName() );
    
            org.apache.maven.continuum.model.project.Project p = continuum.getProject( project.getId() );
    
            p.setName( project.getName() );
            p.setVersion( project.getVersion() );
            p.setScmUrl( project.getScmUrl() );
            p.setScmUseCache( project.isScmUseCache() );
            p.setScmUsername( project.getScmUsername() );
            p.setScmPassword( project.getScmPassword() );
            p.setScmTag( project.getScmTag() );
            
            p.setProjectGroup(populateProjectGroupSummary(project.getProjectGroup()));
            
            continuum.updateProject( p );
    
            return getProjectSummary( project.getId() );
        }
    ça ne marche tjrs pas mais cette fois-ci j'ai une exception
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    org.apache.maven.continuum.ContinuumException: The remote method failed.
    	at org.apache.maven.continuum.xmlrpc.client.ContinuumXmlRpcClient.updateProject(ContinuumXmlRpcClient.java:174)
    	at com.sofinco.soffwk.metiers.urba.services.delivery.LivraisonService.livrerContinuum(LivraisonService.java:723)
    	at com.sofinco.soffwk.metiers.urba.services.delivery.LivraisonService.buildContinuum(LivraisonService.java:572)
    	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
    	at com.sofinco.soffwk.interceptors.PerformanceInterceptor.invoke(PerformanceInterceptor.java:137)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    	at $Proxy7.buildContinuum(Unknown Source)
    	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
    	at $Proxy7.buildContinuum(Unknown Source)
    	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.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:59)
    	at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:320)
    	at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:86)
    	at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:134)
    	at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:109)
    	at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    	at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
    	at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
    	at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
    	at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
    	at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:67)
    	at org.codehaus.xfire.spring.remoting.XFireExporter.handleRequest(XFireExporter.java:48)
    	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:857)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:461)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:426)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: org.apache.xmlrpc.XmlRpcException: Failed to invoke method updateProject in class org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl: You have just attempted to access field "projects" yet this field was not detached when you detached the object. Either dont access this field, or detach the field when detaching the object.
    	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:184)
    	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
    	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
    	at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:39)
    	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
    	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
    	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
    	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
    	at org.apache.xmlrpc.client.util.ClientFactory$1.invoke(ClientFactory.java:104)
    	at $Proxy2.updateProject(Unknown Source)
    	at org.apache.maven.continuum.xmlrpc.client.ContinuumXmlRpcClient.updateProject(ContinuumXmlRpcClient.java:170)
    	... 57 more
    et sur la console Continuum:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    jvm 1    | 2007-12-26 10:41:21,222 [SocketListener0-1] ERROR org.apache.xmlrpc.server.XmlRpcStreamServer  - execute: Error while performing request
    jvm 1    | org.apache.xmlrpc.XmlRpcException: Failed to invoke method updateProject in class org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl: You have just attempted to access field "projects" yet this field was not detached when you detached the object. Either dont access this field, or detach the field when detaching the object.
    jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumXmlRpcMetaDataHandler.invoke(ContinuumXmlRpcMetaDataHandler.java:164)
    jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumXmlRpcMetaDataHandler.execute(ContinuumXmlRpcMetaDataHandler.java:133)
    jvm 1    |      at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:43)
    jvm 1    |      at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:83)
    jvm 1    |      at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:182)
    jvm 1    |      at org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:103)
    jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumXmlRpcServlet.doPost(ContinuumXmlRpcServlet.java:193)
    jvm 1    |      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    jvm 1    |      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    jvm 1    |      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
    jvm 1    |      at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189)
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
    jvm 1    |      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
    jvm 1    |      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
    jvm 1    |      at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
    jvm 1    |      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    jvm 1    |      at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    jvm 1    |      at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    jvm 1    |      at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    jvm 1    |      at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    jvm 1    |      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    jvm 1    |      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    jvm 1    |      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    jvm 1    |      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    jvm 1    |      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    jvm 1    | Caused by:
    jvm 1    | javax.jdo.JDODetachedFieldAccessException: You have just attempted to access field "projects" yet this field was not detached                     e object. Either dont access this field, or detach the field when detaching the object.
    jvm 1    |      at org.apache.maven.continuum.model.project.ProjectGroup.jdoGetprojects(ProjectGroup.java)
    jvm 1    |      at org.apache.maven.continuum.model.project.ProjectGroup.getProjects(ProjectGroup.java:235)
    jvm 1    |      at org.apache.maven.continuum.model.project.ProjectGroup.breakProjectAssociation(ProjectGroup.java:124)
    jvm 1    |      at org.apache.maven.continuum.model.project.Project.setProjectGroup(Project.java:822)
    jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl.updateProject(ContinuumServiceImpl.java:156)
    jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:585)
    jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumXmlRpcMetaDataHandler.invoke(ContinuumXmlRpcMetaDataHandler.java:145
    jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumXmlRpcMetaDataHandler.execute(ContinuumXmlRpcMetaDataHandler.java:13
    jvm 1    |      at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:43)
    jvm 1    |      at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:83)
    jvm 1    |      at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:182)
    jvm 1    |      at org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:103)
    jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumXmlRpcServlet.doPost(ContinuumXmlRpcServlet.java:193)
    jvm 1    |      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    jvm 1    |      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    jvm 1    |      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.d
    jvm 1    |      at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.d
    jvm 1    |      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(
    jvm 1    |      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(P
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.d
    jvm 1    |      at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFi
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.d
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebA
    jvm 1    |      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandle
    jvm 1    |      at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    jvm 1    |      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApp
    jvm 1    |      at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    jvm 1    |      at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    jvm 1    |      at org.mortbay.http.HttpConnection.service(HttpConnection.java:8
    jvm 1    |      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.jav
    jvm 1    |      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:83
    jvm 1    |      at org.mortbay.http.SocketListener.handleConnection(SocketListen
    jvm 1    |      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:35
    jvm 1    |      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:53


    SOS plz...

  2. #2
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    86
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Juin 2007
    Messages : 86
    Points : 19
    Points
    19
    Par défaut
    PS: j'utilise la beta4/Maven 2.0.6

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    86
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Juin 2007
    Messages : 86
    Points : 19
    Points
    19
    Par défaut
    Même ceci ne marche pas

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
     public ProjectSummary updateProject( ProjectSummary project )
            throws ContinuumException
        {
            ProjectSummary ps = getProjectSummary( project.getId() );
    
            checkRemoveProjectFromGroupAuthorization( ps.getProjectGroup().getName() );
    
            org.apache.maven.continuum.model.project.Project p = continuum.getProject( project.getId() );
    
            p.setName( project.getName() );
            p.setVersion( project.getVersion() );
            p.setScmUrl( project.getScmUrl() );
            p.setScmUseCache( project.isScmUseCache() );
            p.setScmUsername( project.getScmUsername() );
            p.setScmPassword( project.getScmPassword() );
            p.setScmTag( project.getScmTag() );
            
            
            org.apache.maven.continuum.model.project.ProjectGroup pg = continuum.getProjectGroup(project.getProjectGroup().getId());
            
            
            p.setProjectGroup(pg);
            
          
            
            continuum.updateProject( p );
    
            return getProjectSummary( project.getId() );
        }

Discussions similaires

  1. Changement de groupe d'un user
    Par kei-kun41 dans le forum Administration système
    Réponses: 2
    Dernier message: 17/03/2010, 20h58
  2. [win32] API changement de groupe de travail
    Par Nicolas Bauland dans le forum C++
    Réponses: 2
    Dernier message: 30/08/2009, 23h17
  3. [MySQL] Update pour changement de groupe
    Par Moxostoma dans le forum PHP & Base de données
    Réponses: 4
    Dernier message: 06/12/2008, 11h36
  4. [API] Changement texte dans un controle "Static Text"
    Par juni38 dans le forum Visual C++
    Réponses: 1
    Dernier message: 23/07/2007, 17h37
  5. [API] Changement de Background
    Par Taron31 dans le forum MFC
    Réponses: 6
    Dernier message: 03/04/2006, 15h23

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo