moving a service from place in the repository generate java.lang.reflect.InvocationTargetException when editing it

patrick.roekaerts.gmail.com's picture
Hi, I already send this information to the carbon-dev list but it seems important to inform everybody of the problem. * Just create a new service using the Add Service screen * Move it using the move command on the resource to another path Now try to update the service information will generate the following thread : [2009-12-08 17:11:34,993] ERROR - Resource does not exist at path /governance/services/be/busi/test/MyService java.lang.reflect.InvocationTargetException 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.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:202) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:103) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:135) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619) Caused by: org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException: Resource does not exist at path /governance/service s/be/busi/test/MyService at org.wso2.carbon.registry.core.jdbc.BasicRegistry.get(BasicRegistry.java:225) at org.wso2.carbon.registry.core.jdbc.AtomicRegistry.get(AtomicRegistry.java:184) at org.wso2.carbon.registry.core.jdbc.JDBCRegistry.get(JDBCRegistry.java:452) at org.wso2.carbon.registry.core.session.UserRegistry.get(UserRegistry.java:268) at org.wso2.carbon.governance.mgt.ui.services.services.AddServicesService.AddService(AddServicesService.java:21) ... 33 more Regards
patrick.roekaerts.gmail.com's picture

fixed in trunk (see detail comment) by Lahiru

Index: src/main/java/org/wso2/carbon/governance/services/services/AddServicesService.java =================================================================== --- src/main/java/org/wso2/carbon/governance/services/services/AddServicesService.java (revision 48443) +++ src/main/java/org/wso2/carbon/governance/services/services/AddServicesService.java (working copy) @@ -54,12 +54,9 @@ if("Edit".equals(operation)){ currentpath= registry.getRegistryContext().getServicepath() + CommonUtil.getUniqueNameforNamespace("",currentnamespace) + currentname; - resource = registry.get(currentpath); } - else{ - resource = registry.newResource(); - } - if(namespace.startsWith("/")){ + resource = registry.newResource(); + if(namespace.startsWith("/")){ if(!namespace.endsWith(RegistryConstants.PATH_SEPARATOR)){ tempnamespace = new StringBuilder().append(namespace).append(RegistryConstants.PATH_SEPARATOR).toString(); }
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)