[Dev] Jaggery - How to parse an XML, with an element named return
Hi all, I have an XML, with an element named as return. I want to parse this XML and extract the value of this return element (i.e. 5). Below is the jaggery snippet I'm using to do this. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:return5/ns:return /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::return.text()); This gives an error. Please see [1] for error log. I tried with replacing return with temp and did the same parsing, and it worked. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:temp5/ns:temp /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::temp.text()); Isn't there any other way to parse this XML (with return element)? [1] js: /portal/apis/flot-data-files/cep-data.jag, line 78: missing name after :: operator js: log.info(_+order.*::return.text()+_); js: ^ [2014-04-06 15:16:41,430] ERROR - {RhinoEngine} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) [2014-04-06 15:16:41,430] ERROR - {WebAppManager} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) org.jaggeryjs.scriptengine.exceptions.ScriptException: org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575) at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432) at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors.
[Dev] Products Clustering Deployment guide error
The page [1] has a text In this case, the database we should connect to is WSO2CARBON_DB.. The WSO2CARBON_DB is not found anywhere in the documentation. I think it should be WSO2CARBONDB Can someone clarify whether this is correcct? [1] https://docs.wso2.org/display/CLUSTER420/Setting+up+the+Database -- K.D. Chamil Jeewantha Associate Technical Lead WSO2, Inc.; http://wso2.com Mobile: +94716813892 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Warnings when doing deployment synchronization of Carbon 4.2 based products (ESB 4.8)
Any idea ? Thanks ! On Wed, Jan 29, 2014 at 5:08 AM, Nirmal Fernando nir...@wso2.com wrote: Hi, Noticed $subject. What could be the reason? [2014-01-29 03:04:39,918] WARN - SvnOutputParser Can't find a svn action for svn output line : A (bin) repository/deployment/server/axis2services/Version.aar [2014-01-29 03:04:39,943] WARN - SvnOutputParser Can't find a svn action for svn output line : A (bin) repository/deployment/server/axis2services/Echo.aar [2014-01-29 03:04:41,042] WARN - SvnOutputParser Can't find a svn action for svn output line : A (bin) repository/deployment/server/webapps/STRATOS_ROOT/images/logo.gif -- Thanks regards, Nirmal Senior Software Engineer- Platform Technologies Team, WSO2 Inc. Mobile: +94715779733 Blog: http://nirmalfdo.blogspot.com/ ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Sagara Gunathunga Senior Technical Lead; WSO2, Inc.; http://wso2.com V.P Apache Web Services;http://ws.apache.org/ Linkedin; http://www.linkedin.com/in/ssagara Blog ; http://ssagara.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Jaggery - How to parse an XML, with an element named return
Hi Rajith, Thanks a lot. That works. Hi all, Problem solved, but wondering how that works though..From [2], found the below fact: [foo] JavaScript takes the string foo and converts it to an array with one element, foo: [2] http://stackoverflow.com/a/1629610/1033469 Regards, Dilini On Sun, Apr 6, 2014 at 4:22 PM, Rajith Vitharana raji...@wso2.com wrote: Hi Dilini, try this - log.info(order.*::[return].text()); Thanks, On Sun, Apr 6, 2014 at 3:31 PM, Dilini Muthumala dil...@wso2.com wrote: Hi all, I have an XML, with an element named as return. I want to parse this XML and extract the value of this return element (i.e. 5). Below is the jaggery snippet I'm using to do this. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:return5/ns:return /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::return.text()); This gives an error. Please see [1] for error log. I tried with replacing return with temp and did the same parsing, and it worked. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:temp5/ns:temp /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::temp.text()); Isn't there any other way to parse this XML (with return element)? [1] js: /portal/apis/flot-data-files/cep-data.jag, line 78: missing name after :: operator js: log.info(_+order.*::return.text()+_); js: ^ [2014-04-06 15:16:41,430] ERROR - {RhinoEngine} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) [2014-04-06 15:16:41,430] ERROR - {WebAppManager} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) org.jaggeryjs.scriptengine.exceptions.ScriptException: org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575) at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432) at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at
Re: [Dev] Warnings when doing deployment synchronization of Carbon 4.2 based products (ESB 4.8)
On Sun, Apr 6, 2014 at 1:59 PM, Sagara Gunathunga sag...@wso2.com wrote: Any idea ? Applied the suggested workarounds on issues[1], [2] then ran into following heap space issue. java.lang.OutOfMemoryError: Java heap space Dumping heap to /Users/sagara/dev/clients/dev-services/BPFrance/setups/bpi/esb-active/repository/logs/heap-dump.hprof ... Unable to create /Users/sagara/dev/clients/dev-services/BPFrance/setups/bpi/esb-active/repository/logs/heap-dump.hprof: File exists [2014-04-06 14:14:02,745] ERROR - CarbonDeploymentSchedulerTask Error while running deployment scheduler.. java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuffer.append(StringBuffer.java:224) at org.tmatesoft.svn.core.SVNErrorMessage.getFullMessage(SVNErrorMessage.java:257) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:58) at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.open(SVNAdminAreaFactory.java:163) at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.doOpen(SVNWCAccess.java:364) at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:272) at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:265) at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:261) at org.tmatesoft.svn.core.wc.SVNStatusClient.doStatus(SVNStatusClient.java:316) at org.tmatesoft.svn.core.javahl.SVNClientImpl.status(SVNClientImpl.java:296) at org.tmatesoft.svn.core.javahl.SVNClientImpl.status(SVNClientImpl.java:278) at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:542) at org.tigris.subversion.svnclientadapter.svnkit.SvnKitClientAdapter.getStatus(SvnKitClientAdapter.java:144) at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:528) at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:521) at org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.cleanupDeletedFiles(SVNBasedArtifactRepository.java:533) at org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.checkout(SVNBasedArtifactRepository.java:399) at org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizer.checkout(DeploymentSynchronizer.java:181) at org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerServiceImpl.update(DeploymentSynchronizerServiceImpl.java:87) at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.deploymentSyncUpdate(CarbonDeploymentSchedulerTask.java:165) at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:123) FYI I'm running local svn 1.7.10 based repo on my mac 10.9.1 machine. [1] - https://wso2.org/jira/browse/BPS-346 [2] - https://wso2.org/jira/browse/BPS-346 Thanks ! On Wed, Jan 29, 2014 at 5:08 AM, Nirmal Fernando nir...@wso2.com wrote: Hi, Noticed $subject. What could be the reason? [2014-01-29 03:04:39,918] WARN - SvnOutputParser Can't find a svn action for svn output line : A (bin) repository/deployment/server/axis2services/Version.aar [2014-01-29 03:04:39,943] WARN - SvnOutputParser Can't find a svn action for svn output line : A (bin) repository/deployment/server/axis2services/Echo.aar [2014-01-29 03:04:41,042] WARN - SvnOutputParser Can't find a svn action for svn output line : A (bin) repository/deployment/server/webapps/STRATOS_ROOT/images/logo.gif -- Thanks regards, Nirmal Senior Software Engineer- Platform Technologies Team, WSO2 Inc. Mobile: +94715779733 Blog: http://nirmalfdo.blogspot.com/ ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Sagara Gunathunga Senior Technical Lead; WSO2, Inc.; http://wso2.com V.P Apache Web Services;http://ws.apache.org/ Linkedin; http://www.linkedin.com/in/ssagara Blog ; http://ssagara.blogspot.com -- Sagara Gunathunga Senior Technical Lead; WSO2, Inc.; http://wso2.com V.P Apache Web Services;http://ws.apache.org/ Linkedin; http://www.linkedin.com/in/ssagara Blog ; http://ssagara.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Jaggery - How to parse an XML, with an element named return
Hi Dilini, its about property accessors of E4X. see section 11.2.1 Property Accessors of the E4X spec in [1] [1] - http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-357.pdf Thanks, On Sun, Apr 6, 2014 at 5:42 PM, Dilini Muthumala dil...@wso2.com wrote: Hi Rajith, Thanks a lot. That works. Hi all, Problem solved, but wondering how that works though..From [2], found the below fact: [foo] JavaScript takes the string foo and converts it to an array with one element, foo: [2] http://stackoverflow.com/a/1629610/1033469 Regards, Dilini On Sun, Apr 6, 2014 at 4:22 PM, Rajith Vitharana raji...@wso2.com wrote: Hi Dilini, try this - log.info(order.*::[return].text()); Thanks, On Sun, Apr 6, 2014 at 3:31 PM, Dilini Muthumala dil...@wso2.com wrote: Hi all, I have an XML, with an element named as return. I want to parse this XML and extract the value of this return element (i.e. 5). Below is the jaggery snippet I'm using to do this. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:return5/ns:return /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::return.text()); This gives an error. Please see [1] for error log. I tried with replacing return with temp and did the same parsing, and it worked. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:temp5/ns:temp /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::temp.text()); Isn't there any other way to parse this XML (with return element)? [1] js: /portal/apis/flot-data-files/cep-data.jag, line 78: missing name after :: operator js: log.info(_+order.*::return.text()+_); js: ^ [2014-04-06 15:16:41,430] ERROR - {RhinoEngine} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) [2014-04-06 15:16:41,430] ERROR - {WebAppManager} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) org.jaggeryjs.scriptengine.exceptions.ScriptException: org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575) at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432) at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at
Re: [Dev] Jaggery - How to parse an XML, with an element named return
Hi Rajith, Got it. Thanks a lot for the helpful reply. Cheers, Dilini On Sun, Apr 6, 2014 at 6:49 PM, Rajith Vitharana raji...@wso2.com wrote: Hi Dilini, its about property accessors of E4X. see section 11.2.1 Property Accessors of the E4X spec in [1] [1] - http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-357.pdf Thanks, On Sun, Apr 6, 2014 at 5:42 PM, Dilini Muthumala dil...@wso2.com wrote: Hi Rajith, Thanks a lot. That works. Hi all, Problem solved, but wondering how that works though..From [2], found the below fact: [foo] JavaScript takes the string foo and converts it to an array with one element, foo: [2] http://stackoverflow.com/a/1629610/1033469 Regards, Dilini On Sun, Apr 6, 2014 at 4:22 PM, Rajith Vitharana raji...@wso2.comwrote: Hi Dilini, try this - log.info(order.*::[return].text()); Thanks, On Sun, Apr 6, 2014 at 3:31 PM, Dilini Muthumala dil...@wso2.comwrote: Hi all, I have an XML, with an element named as return. I want to parse this XML and extract the value of this return element (i.e. 5). Below is the jaggery snippet I'm using to do this. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:return5/ns:return /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::return.text()); This gives an error. Please see [1] for error log. I tried with replacing return with temp and did the same parsing, and it worked. var order = new XML(ns:getStockQuoteResponse xmlns:ns= http://service.axis2.wso2.com; ns:temp5/ns:temp /ns:getStockQuoteResponse); var ns=http://service.axis2.wso2.com;; log.info(order.*::temp.text()); Isn't there any other way to parse this XML (with return element)? [1] js: /portal/apis/flot-data-files/cep-data.jag, line 78: missing name after :: operator js: log.info(_+order.*::return.text()+_); js: ^ [2014-04-06 15:16:41,430] ERROR - {RhinoEngine} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) [2014-04-06 15:16:41,430] ERROR - {WebAppManager} org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) org.jaggeryjs.scriptengine.exceptions.ScriptException: org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors. (/portal/apis/flot-data-files/cep-data.jag#1) at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575) at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432) at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at
Re: [Dev] Implementing ODE Scheduler job redistribution for BPS cluster
Let me add more on this. On Wed, Apr 2, 2014 at 11:24 PM, Nandika Jayawardana nand...@wso2.comwrote: Hi All, BPEL processes in ode are executed by first writing the process initiating message to the database and running a job (a separate thread ) against it which will try to execute the process definition against the message and current process state. Ode job scheduler is what does the loading of jobs from the job table for execution.Usually, all the jobs scheduled from a given BPS node is loaded and executed by that node itself. However, in case of a long running process, where there can be waiting activities or timer jobs, there will be jobs that are not loaded immediately. These jobs are scheduled against a node id identifying the running ode instance. In our current cluster implementation, if a node goes down, these jobs will remain there until the node is restarted. In order to solve this problem ,we though of using the hazel-cast cluster which is already available and used. Ode scheduler has a heartbeat method, which should be called in the cluster implementation periodically by each node in order to tell the scheduler that each node is alive. A separate task is executed to monitor the availability/staleness of the nodes periodically by maintaining a list of known nodes and nodes that have not updated the heartbeat. Job redistribution has two problems. 1. If all the nodes in the cluster try to redistribute the jobs of a stale node, there will be dead locks since these are db operations. Hence we need to elect a node in the cluster which will do the job redistribution. In hazelcast, we can select the leader by obtaining the oldest member of the cluster and treating it as the leader. Recover stale nodes job is one of the schedule jobs in ode. ODE developers make it to start randomly with intention of, jobs don't overlap in clustered environment. But this doesn't grantee it and if two jobs overlapped with each other, it cause deadlocks in ODE_JOB tables. There is another scheduled job called updateJob which assign nodeIDs to near-future jobs. Same problem can happen if two updateJobs overlapped. So the suggested solution is, every node check whether he is the leader and if he is the leader then run these two jobs for whole cluster. 2. We need a way to implement the heartbeat method. Initially we though of using the membership listeners available from carbon clustering. However, it seems when nodes are added/removed, all nodes does not get notified. Hence we though of using the periodic task running in the scheduler to do the member availability check and update the heartbeat using the hazel-cast cluster. @Hasitha - Please add anything i missed. Regards Nandika -- Nandika Jayawardana Senior Technical Lead WSO2 Inc ; http://wso2.com lean.enterprise.middleware Thanks, Hasitha. -- Hasitha Aravinda, Software Engineer, WSO2 Inc. Email: hasi...@wso2.com Mobile: +94 71 8 210 200 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Products Clustering Deployment guide error
Hi Chamil, Thanks for finding this. I've changed this to REGISTRY_DB but I'm not sure. Adding Shazni. Shazni, could you check if this is correct now? The following is the sentence in question: - *This cacheID is used to identify the cache it should look for when caching is enabled. In this case, the database we should connect to is REGISTRY_DB*. See [1] for more context. [1] - https://docs.wso2.org/display/CLUSTER420/Setting+up+the+Database Thanks, Sam *Samuel Gnaniah* Senior Technical Writer WSO2 (pvt.) Ltd. Colombo, Sri Lanka (+94) 773131798 On Sun, Apr 6, 2014 at 5:12 PM, Chamil Jeewantha cha...@wso2.com wrote: The page [1] has a text In this case, the database we should connect to is WSO2CARBON_DB.. The WSO2CARBON_DB is not found anywhere in the documentation. I think it should be WSO2CARBONDB Can someone clarify whether this is correcct? [1] https://docs.wso2.org/display/CLUSTER420/Setting+up+the+Database -- K.D. Chamil Jeewantha Associate Technical Lead WSO2, Inc.; http://wso2.com Mobile: +94716813892 -- You received this message because you are subscribed to the Google Groups WSO2 Documentation group. To unsubscribe from this group and stop receiving emails from it, send an email to documentation+unsubscr...@wso2.com. For more options, visit https://groups.google.com/a/wso2.com/d/optout. ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Throws errors when creating spml2cleint object
Hi, I am developing a SPMLConnector for IS. I added following dependency. dependency groupIdorg.openspml/groupId artifactIdopenspml2/artifactId version192-20100413/version /dependency But, When I create an object of spml2client it throws following error. When it tested in outside of carbon environment it works fine. ERROR {org.wso2.carbon.user.mgt.ui.UserAdminClient} - org/openspml/v2/client/Spml2Client org.apache.axis2.AxisFault: org/openspml/v2/client/Spml2Client at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.wso2.carbon.user.mgt.stub.UserAdminStub.addUser(UserAdminStub.java:1561) at org.wso2.carbon.user.mgt.ui.UserAdminClient.addUser(UserAdminClient.java:94) at org.apache.jsp.user.add_002dfinish_jsp._jspService(org.apache.jsp.user.add_002dfinish_jsp:122) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155) at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544) at org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37) at org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1015) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:700) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:87) at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:88) at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:465) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:140) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:117) at org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171) at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75) at org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80) at org.apache.jsp.admin.layout.template_jsp._jspx_meth_tiles_insertAttribute_7(org.apache.jsp.admin.layout.template_jsp:603) at org.apache.jsp.admin.layout.template_jsp._jspService(org.apache.jsp.admin.layout.template_jsp:335) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155) at
Re: [Dev] Products Clustering Deployment guide error
Hi Samuel, On Mon, Apr 7, 2014 at 8:54 AM, Samuel Gnaniah sam...@wso2.com wrote: Hi Chamil, Thanks for finding this. I've changed this to REGISTRY_DB but I'm not sure. Yes, this should be REGISTRY_DB where this is the database shared across all the master/workers nodes. You can identify that by looking in the mounting configurations, where the same datasource is being used. thanks Eranda Adding Shazni. Shazni, could you check if this is correct now? The following is the sentence in question: - *This cacheID is used to identify the cache it should look for when caching is enabled. In this case, the database we should connect to is REGISTRY_DB*. See [1] for more context. [1] - https://docs.wso2.org/display/CLUSTER420/Setting+up+the+Database Thanks, Sam *Samuel Gnaniah* Senior Technical Writer WSO2 (pvt.) Ltd. Colombo, Sri Lanka (+94) 773131798 On Sun, Apr 6, 2014 at 5:12 PM, Chamil Jeewantha cha...@wso2.com wrote: The page [1] has a text In this case, the database we should connect to is WSO2CARBON_DB.. The WSO2CARBON_DB is not found anywhere in the documentation. I think it should be WSO2CARBONDB Can someone clarify whether this is correcct? [1] https://docs.wso2.org/display/CLUSTER420/Setting+up+the+Database -- K.D. Chamil Jeewantha Associate Technical Lead WSO2, Inc.; http://wso2.com Mobile: +94716813892 -- You received this message because you are subscribed to the Google Groups WSO2 Documentation group. To unsubscribe from this group and stop receiving emails from it, send an email to documentation+unsubscr...@wso2.com. For more options, visit https://groups.google.com/a/wso2.com/d/optout. -- You received this message because you are subscribed to the Google Groups WSO2 Documentation group. To unsubscribe from this group and stop receiving emails from it, send an email to documentation+unsubscr...@wso2.com. For more options, visit https://groups.google.com/a/wso2.com/d/optout. -- *Eranda Sooriyabandara*Senior Software Engineer; Integration Technologies Team; WSO2 Inc.; http://wso2.com Lean . Enterprise . Middleware E-mail: eranda AT wso2.com Mobile: +94 716 472 816 Linked-In: http://www.linkedin.com/in/erandasooriyabandara Blog: http://emsooriyabandara.blogspot.com/ ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Products Clustering Deployment guide error
Thanks Eranda, Cheers, Sam *Samuel Gnaniah* Senior Technical Writer WSO2 (pvt.) Ltd. Colombo, Sri Lanka (+94) 773131798 On Mon, Apr 7, 2014 at 10:02 AM, Eranda Sooriyabandara era...@wso2.comwrote: Hi Samuel, On Mon, Apr 7, 2014 at 8:54 AM, Samuel Gnaniah sam...@wso2.com wrote: Hi Chamil, Thanks for finding this. I've changed this to REGISTRY_DB but I'm not sure. Yes, this should be REGISTRY_DB where this is the database shared across all the master/workers nodes. You can identify that by looking in the mounting configurations, where the same datasource is being used. thanks Eranda Adding Shazni. Shazni, could you check if this is correct now? The following is the sentence in question: - *This cacheID is used to identify the cache it should look for when caching is enabled. In this case, the database we should connect to is REGISTRY_DB*. See [1] for more context. [1] - https://docs.wso2.org/display/CLUSTER420/Setting+up+the+Database Thanks, Sam *Samuel Gnaniah* Senior Technical Writer WSO2 (pvt.) Ltd. Colombo, Sri Lanka (+94) 773131798 On Sun, Apr 6, 2014 at 5:12 PM, Chamil Jeewantha cha...@wso2.com wrote: The page [1] has a text In this case, the database we should connect to is WSO2CARBON_DB.. The WSO2CARBON_DB is not found anywhere in the documentation. I think it should be WSO2CARBONDB Can someone clarify whether this is correcct? [1] https://docs.wso2.org/display/CLUSTER420/Setting+up+the+Database -- K.D. Chamil Jeewantha Associate Technical Lead WSO2, Inc.; http://wso2.com Mobile: +94716813892 -- You received this message because you are subscribed to the Google Groups WSO2 Documentation group. To unsubscribe from this group and stop receiving emails from it, send an email to documentation+unsubscr...@wso2.com. For more options, visit https://groups.google.com/a/wso2.com/d/optout. -- You received this message because you are subscribed to the Google Groups WSO2 Documentation group. To unsubscribe from this group and stop receiving emails from it, send an email to documentation+unsubscr...@wso2.com. For more options, visit https://groups.google.com/a/wso2.com/d/optout. -- *Eranda Sooriyabandara*Senior Software Engineer; Integration Technologies Team; WSO2 Inc.; http://wso2.com Lean . Enterprise . Middleware E-mail: eranda AT wso2.com Mobile: +94 716 472 816 Linked-In: http://www.linkedin.com/in/erandasooriyabandara Blog: http://emsooriyabandara.blogspot.com/ ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [ESB] Why are ESB connector integration tests in separate projects ?
Hi folks, What are the reasons behind placing the integration tests in separate folders rather than putting them in the connector projects themselves. e.g. Google drive connector : https://github.com/wso2/esb-connectors/tree/master/googledrive Google drive integration tests : https://github.com/wso2/esb-connectors/tree/master/googledrive-connector-test And isn't it a good idea to pull the ESB binary zip file as a maven dependency rather than copying it manually ? Thanks /rushmin -- *Rushmin Fernando* *Technical Lead* WSO2 Inc. http://wso2.com/ - Lean . Enterprise . Middleware email : rush...@wso2.com mobile : +94772310855 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev