[Stratos-dev] Update on the platform sample.
Thilina Buddhika
thilinab at wso2.com
Tue Nov 30 21:25:21 PST 2010
Hi Shariq,
To secure the FinancialConnectorService, we placed a policy reference in the
WSDL file and bundled it with the service with the useOriginalWSDL param set
to 'true' in services.xml file. But in this case, this policy file should be
stored in each tenant's gov. registry and it should be referred from the
FinancialConnectorService.
Similarly the client(in this case, the corresponding EP) should be referring
to the correct policy.
We will have to figure out the proper way of handling this scenario.
Thanks,
Thilina
On Wed, Dec 1, 2010 at 10:39 AM, Shariq <shariq at wso2.com> wrote:
> Hi all,
>
> I managed to get the Shopping Cart gadgets working, but had to hard-code
> the endpoint URL's to fetch data from the Data Service. The .dar archives
> deployment failed, so I manually uploaded the gadget XML's via the UI.
>
> I got the following exception while deploying the
> FinancialConnectorService. By removing the policy reference from the WSDL as
> suggested by Thilina, I managed to deploy this service.
>
> The stack trace is as follows,
>
> [2010-11-30 08:39:01,767] @shariq.org [1096] INFO
> {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2
> service: FinanceConnectorService {shariq.org[1096]}
> {org.wso2.carbon.core.deployment.DeploymentInterceptor}
> [2010-11-30 08:39:05,833] @shariq.org [1096]ERROR
> {org.wso2.carbon.core.persistence.AbstractPersistenceManager} - Unable to
> handle new service addition. Service: FinanceConnectorService
> {org.wso2.carbon.core.persistence.AbstractPersistenceManager}
> java.lang.RuntimeException: Cannot reach remote resource:
> http://governance.cloud.private.wso2.com/t/shariq.org/registry/resource/_system/governance/policies/policy_service.xml
> at
> org.apache.neethi.PolicyReference.getRemoteReferedElement(PolicyReference.java:164)
> at
> org.apache.neethi.PolicyReference.getRemoteReferencedPolicy(PolicyReference.java:176)
> at org.apache.neethi.PolicyReference.normalize(PolicyReference.java:112)
> at org.apache.axis2.util.PolicyUtil.getMergedPolicy(PolicyUtil.java:263)
> at
> org.wso2.carbon.core.persistence.ServicePersistenceManager.getServicePolicies(ServicePersistenceManager.java:830)
> at
> org.wso2.carbon.core.persistence.ServicePersistenceManager.handleNewServiceAddition(ServicePersistenceManager.java:170)
> at
> org.wso2.carbon.core.deployment.DeploymentInterceptor.serviceUpdate(DeploymentInterceptor.java:261)
> at
> org.apache.axis2.engine.AxisConfiguration.notifyObservers(AxisConfiguration.java:648)
> at
> org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:402)
> at
> org.apache.axis2.deployment.DeploymentEngine.addServiceGroup(DeploymentEngine.java:611)
> at
> org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:99)
> at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:815)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:391)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
> at
> org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:144)
> at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
> at
> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:267)
> at
> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:100)
> at
> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.setTenantAccessed(TenantAxisUtils.java:136)
> at
> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:60)
> at
> org.wso2.carbon.server.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
> at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:249)
> 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)
> [2010-11-30 08:39:06,006] @shariq.org [1096]ERROR
> {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Exception
> occurred while handling service update event. {shariq.org[1096]}
> {org.wso2.carbon.core.deployment.DeploymentInterceptor}
> org.wso2.carbon.CarbonException: Unable to handle new service addition.
> Service: FinanceConnectorService
> at
> org.wso2.carbon.core.persistence.AbstractPersistenceManager.handleExceptionWithRollback(AbstractPersistenceManager.java:443)
> at
> org.wso2.carbon.core.persistence.ServicePersistenceManager.handleNewServiceAddition(ServicePersistenceManager.java:240)
> at
> org.wso2.carbon.core.deployment.DeploymentInterceptor.serviceUpdate(DeploymentInterceptor.java:261)
> at
> org.apache.axis2.engine.AxisConfiguration.notifyObservers(AxisConfiguration.java:648)
> at
> org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:402)
> at
> org.apache.axis2.deployment.DeploymentEngine.addServiceGroup(DeploymentEngine.java:611)
> at
> org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:99)
> at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:815)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:391)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
> at
> org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:144)
> at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
> at
> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:267)
> at
> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:100)
> at
> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.setTenantAccessed(TenantAxisUtils.java:136)
> at
> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:60)
> at
> org.wso2.carbon.server.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
> at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:249)
> 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: java.lang.RuntimeException: Cannot reach remote resource:
> http://governance.cloud.private.wso2.com/t/shariq.org/registry/resource/_system/governance/policies/policy_service.xml
> at
> org.apache.neethi.PolicyReference.getRemoteReferedElement(PolicyReference.java:164)
> at
> org.apache.neethi.PolicyReference.getRemoteReferencedPolicy(PolicyReference.java:176)
> at org.apache.neethi.PolicyReference.normalize(PolicyReference.java:112)
> at org.apache.axis2.util.PolicyUtil.getMergedPolicy(PolicyUtil.java:263)
> at
> org.wso2.carbon.core.persistence.ServicePersistenceManager.getServicePolicies(ServicePersistenceManager.java:830)
> at
> org.wso2.carbon.core.persistence.ServicePersistenceManager.handleNewServiceAddition(ServicePersistenceManager.java:170)
> ... 26 more
> [2010-11-30 08:39:06,010] @shariq.org [1096] INFO
> {org.apache.axis2.deployment.DeploymentEngine} - Deploying Web service:
> FinancialConnectorService.aar -
> file:/mnt/wso2stratos-as-1.0.0/repository/tenants/1096/axis2services/FinancialConnectorService.aar
> {org.apache.axis2.deployment.DeploymentEngine}
> [2010-11-30 08:39:06,010] @shariq.org [1096] INFO
> {org.apache.axis2.deployment.DeploymentEngine} - Deploying Web service:
> FinancialConnectorService.aar -
> file:/mnt/wso2stratos-as-1.0.0/repository/tenants/1096/axis2services/FinancialConnectorService.aar
> {org.apache.axis2.deployment.DeploymentEngine}
>
> Regards,
> Shariq.
>
> On Tue, Nov 30, 2010 at 12:13 AM, Afkham Azeez <azeez at wso2.com> wrote:
>
>>
>>
>> On Mon, Nov 29, 2010 at 11:51 PM, Hiranya Jayathilaka <hiranya at wso2.com>wrote:
>>
>>>
>>>
>>> On Sun, Nov 28, 2010 at 1:31 PM, Senaka Fernando <senaka at wso2.com>wrote:
>>>
>>>>
>>>>
>>>> On Sun, Nov 28, 2010 at 1:09 PM, Afkham Azeez <azeez at wso2.com> wrote:
>>>>
>>>>> Just hard code the EPs for now to ensure that the sample is working,
>>>>
>>>>
>>>> Yes, let's do that first.
>>>>
>>>>
>>>>> fix the sample installer,
>>>>
>>>> and then get WS-D properly working. May be we can have a short call with
>>>>> Hiranya to figure out the problem with WS-D.
>>>>
>>>>
>>> What was the issue?
>>>
>>
>> All EPRs returned are NULL. We will debug further and provide you with
>> more details.
>>
>>
>>
>>>
>>> Thanks,
>>> Hiranya
>>>
>>>
>>>>
>>>> +1. Shariq, by the way, did we configure WS-D properly and test this?
>>>> There is a blog post by Charitha IIRC.
>>>>
>>>>
>>>>> I'm sure it is something minor, most probably a config issue.
>>>>
>>>>
>>>> Possibly, yes.
>>>>
>>>> Also, please make sure that you commit all these changes to the svn
>>>> properly, which is what we did not do the last time, and the which is one of
>>>> the main reasons to these delays.
>>>>
>>>> Thanks,
>>>> Senaka.
>>>>
>>>>>
>>>>> Azeez
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Nov 28, 2010 at 12:59 PM, Senaka Fernando <senaka at wso2.com>wrote:
>>>>>
>>>>>> Hi Shariq,
>>>>>>
>>>>>> Awesome.
>>>>>>
>>>>>> On Sun, Nov 28, 2010 at 11:06 AM, Shariq <shariq at wso2.com> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> As of now we have manged to deploy the Shopping-Cart sample on all
>>>>>>> the services including ESB. Status on each component is listed below.
>>>>>>>
>>>>>>> 1. By sharing a common DB the Data Services service retrieves data.
>>>>>>> The data can be queried from the Appserver - User Portal webapp via the ESB.
>>>>>>> By data I mean the different Camera Categories thats stored in the DB.
>>>>>>>
>>>>>>
>>>>>> We can workaround this issue by introducing a tenant-id column to the
>>>>>> DB.
>>>>>>
>>>>>>>
>>>>>>> 2. The Mashup service to retrieve related products if also
>>>>>>> functioning as required and related products is listed on the User Portal.
>>>>>>>
>>>>>>> 3. The Admin portal portal is functional and list all products and
>>>>>>> quantities.
>>>>>>>
>>>>>>> 4. ESB is able to access registry resources. Had to make a minor
>>>>>>> modification in the ESB config to get this working.
>>>>>>>
>>>>>>> However all these services works with endpoints hardcoded endpoints.
>>>>>>> Some endpoints are read via a .properties file as Senaka mentioned in the
>>>>>>> previous mail. However I found some endpoints defined in Java classes (ESB)
>>>>>>> and in a JSP (Mashup related product's service endpoint).
>>>>>>>
>>>>>>
>>>>>> We can make replacements in JSP using the code I wrote. JSPs are not
>>>>>> pre-compiled. For the Java files, I believe that these are the ones on AS.
>>>>>> We can add a registry resource containing EPRs as properties and use for the
>>>>>> moment. That would become tenant-specific since the registry spaces for each
>>>>>> tenant are isolated.
>>>>>>
>>>>>>
>>>>>>> If we are to make this work, we would probably need to get
>>>>>>> WS discovery working or else find a way to replace endpoints in a .class
>>>>>>> file (or may be read it from a properties file)
>>>>>>>
>>>>>>
>>>>>> -1 on changing .class files and using a .properties file @ runtime.
>>>>>> Follow the approach mentioned above which is much cleaner.
>>>>>>
>>>>>>>
>>>>>>> Additionally the purchasing scenario of the sample fails due to an
>>>>>>> error in the ESB side. I will talk to Supun and hopefully we should be able
>>>>>>> to fix this on Monday.
>>>>>>>
>>>>>>
>>>>>> Wonder what the issue is? any stacktraces? etc?
>>>>>>
>>>>>>>
>>>>>>> After that I'll start working on other aspects of the platform sample
>>>>>>> (BRS part etc.)
>>>>>>>
>>>>>>
>>>>>> Yes, and we'll then focus on WS-D and endpoint unification.
>>>>>>
>>>>>> Thanks,
>>>>>> Senaka.
>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Shariq.
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Stratos-dev mailing list
>>>>>>> Stratos-dev at wso2.org
>>>>>>> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Senaka Fernando*
>>>>>> Associate Technical Lead & Product Manager - WSO2 G-Reg;
>>>>>> WSO2, Inc.; http://wso2.com*
>>>>>> Member; Apache Software Foundation; http://apache.org
>>>>>>
>>>>>> E-mail: senaka AT wso2.com
>>>>>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>>>>>> Linked-In: http://www.linkedin.com/in/senakafernando
>>>>>>
>>>>>> *Lean . Enterprise . Middleware
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Stratos-dev mailing list
>>>>>> Stratos-dev at wso2.org
>>>>>> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Afkham Azeez*
>>>>> Senior Software Architect & Senior Manager; WSO2, Inc.;
>>>>> http://wso2.com,
>>>>> *
>>>>> *
>>>>> *Member; Apache Software Foundation; **http://www.apache.org/*<http://www.apache.org/>
>>>>> *
>>>>> email: **azeez at wso2.com* <azeez at wso2.com>* cell: +94 77 3320919
>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>> *
>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>> *
>>>>> *
>>>>> *Lean . Enterprise . Middleware*
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Senaka Fernando*
>>>> Associate Technical Lead & Product Manager - WSO2 G-Reg;
>>>> WSO2, Inc.; http://wso2.com*
>>>> Member; Apache Software Foundation; http://apache.org
>>>>
>>>> E-mail: senaka AT wso2.com
>>>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>>>> Linked-In: http://www.linkedin.com/in/senakafernando
>>>>
>>>> *Lean . Enterprise . Middleware
>>>>
>>>>
>>>> _______________________________________________
>>>> Stratos-dev mailing list
>>>> Stratos-dev at wso2.org
>>>> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Senior Software Engineer;
>>> WSO2 Inc.; http://wso2.org
>>> E-mail: hiranya at wso2.com; Mobile: +94 77 633 3491
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>
>>
>>
>> --
>> *Afkham Azeez*
>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
>> *
>> *
>> *Member; Apache Software Foundation; **http://www.apache.org/*<http://www.apache.org/>
>> *
>> email: **azeez at wso2.com* <azeez at wso2.com>* cell: +94 77 3320919
>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>> *
>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>> *
>> *
>> *Lean . Enterprise . Middleware*
>>
>>
>> _______________________________________________
>> Stratos-dev mailing list
>> Stratos-dev at wso2.org
>> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>>
>>
>
> _______________________________________________
> Stratos-dev mailing list
> Stratos-dev at wso2.org
> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev
>
>
--
Thilina Buddhika
Senior Software Engineer
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware
phone : +94 77 44 88 727
blog : http://blog.thilinamb.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://wso2.org/pipermail/stratos-dev/attachments/20101201/e7f75241/attachment-0001.htm>
More information about the Stratos-dev
mailing list