Hi, This issue is something specific to PostgreSQL and actually occurs while trying to populate bean properties of PGXADataSource instances during the initialization of XA datasources. To further explain the context of the issue, in dataservices core implementation we use java reflection to extract out the setter methods of the PGXADataSource class to dynamically populate properties, username, password and URL that are required to establish datasource connections upon the given configurations. Although most of the other XA datasource implementations such as Mysql, Oracle, H2, etc provide setter methods to directly populate value of the property named URL, PGXADataSource does not seem to provide that particular utility. As a result of it, the process of initializing PostgreSQL related XA datasources fails.
I'll look into this. Regards, Prabath On Mon, Jan 9, 2012 at 6:58 AM, Jorge Infante Osorio <jorg...@uci.cu> wrote: > Hi Lakmali, any advance on this? > > Saludos, > Ing. Jorge Infante Osorio. > J´Dpto Soluciones SOA. > CDAE. > Fac. 5. > UCI. > > De: carbon-dev-boun...@wso2.org [mailto:carbon-dev-boun...@wso2.org] En > nombre de Lakmali Baminiwatta > Enviado el: viernes, 16 de diciembre de 2011 4:51 > Para: carbon-dev@wso2.org > Asunto: Re: [Carbon-dev] XA Transactions > > > Hi Jorge, > > We are looking into this. > > Thanks, > Lakmali > On Fri, Dec 16, 2011 at 3:16 AM, Jorge Infante Osorio <jorg...@uci.cu> > wrote: > Hi Anjana. I know you guys are very busy in this days.. it´s ok :-D > > I made some work around but I´m facing some problems. This is my config: > > In context.xml: > > <Resource > name="jdbc/pruebas" > auth="Container" > type="com.atomikos.jdbc.AtomikosDataSourceBean" > > factory="org.wso2.carbon.atomikos.TransactionFactory" > uniqueResourceName="jdbc/pruebas" > > xaDataSourceClassName="org.postgresql.xa.PGXADataSource" > xaProperties.databaseName="pruebas" > xaProperties.serverName="127.0.0.1" > xaProperties.portNumber="5432" > xaProperties.user="postgres" > xaProperties.password="descarga*22" > /> > > And this is the pool in my dbreport mediator config: > > <pool> > <password>pass</password> > <user>postgres</user> > > <dsName>java:comp/env/jdbc/pruebas</dsName> > > <url>jdbc:postgresql://127.0.0.1:5432/pruebas2</url> > > <icClass>org.apache.naming.java.javaURLContextFactory</icClass> > > </pool> > > I don´t know if the icClass value it´s right.!!! > > The error: > > [2011-12-15 16:44:27,209] ERROR - DataSourceFinder DataSource : > java:comp/env/jdbc/pruebas not found when looking up using JNDI properties > : > {java.naming.factory.initial=org.apache > .naming.java.javaURLContextFactory, > java.naming.factory.url.pkgs=org.apache.naming, > > jmx.remote.authenticator=org.wso2.carbon.core.security.CarbonJMXAuthenticato > r@b88745} > [2011-12-15 16:44:27,209] FATAL - ServiceBusInitializer Couldn't initialize > the ESB... > org.apache.synapse.commons.SynapseCommonsException: DataSource : > java:comp/env/jdbc/pruebas not found when looking up using JNDI properties > : > {java.naming.factory.initial=org.apach > e.naming.java.javaURLContextFactory, > java.naming.factory.url.pkgs=org.apache.naming, > > jmx.remote.authenticator=org.wso2.carbon.core.security.CarbonJMXAuthenticato > r@b88745} > at > > org.apache.synapse.commons.datasource.DataSourceFinder.find(DataSourceFinder > .java:71) > at > > org.apache.synapse.commons.datasource.DataSourceFinder.find(DataSourceFinder > .java:49) > at > > org.apache.synapse.mediators.db.AbstractDBMediator.lookupDataSource(Abstract > DBMediator.java:423) > at > > org.apache.synapse.mediators.db.AbstractDBMediator.init(AbstractDBMediator.j > ava:79) > at > > org.apache.synapse.mediators.AbstractListMediator.init(AbstractListMediator. > java:106) > at > > org.apache.synapse.mediators.base.SequenceMediator.init(SequenceMediator.jav > a:189) > at > > org.apache.synapse.config.SynapseConfiguration.init(SynapseConfiguration.jav > a:1314) > at > > org.apache.synapse.Axis2SynapseController.createSynapseEnvironment(Axis2Syna > pseController.java:422) > at org.apache.synapse.ServerManager.start(ServerManager.java:181) > at > > org.wso2.carbon.mediation.initializer.ServiceBusInitializer.initESB(ServiceB > usInitializer.java:408) > at > > org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(Service > BusInitializer.java:170) > 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.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceCompo > nent.java:230) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceC > omponentProp.java:140) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComp > onentProp.java:330) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProce > ss.java:560) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProc > ess.java:182) > at > org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:292) > at > > org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:22 > 6) > at > > org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceCha > nged(FilteredServiceListener.java:124) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(Bun > dleContextImpl.java:930) > at > > org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager. > java:220) > at > > org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(L > istenerQueue.java:149) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > tPrivileged(ServiceRegistry.java:757) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > t(ServiceRegistry.java:712) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(S > erviceRegistrationImpl.java:129) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(Se > rviceRegistry.java:206) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:506) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:524) > at > > org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(Ev > entBrokerBuilderDS.java:71) > 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.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceCompo > nent.java:230) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceC > omponentProp.java:140) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComp > onentProp.java:330) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProce > ss.java:560) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProc > ess.java:182) > at > org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:292) > at > > org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:22 > 6) > at > > org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceCha > nged(FilteredServiceListener.java:124) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(Bun > dleContextImpl.java:930) > at > > org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager. > java:220) > at > > org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(L > istenerQueue.java:149) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > tPrivileged(ServiceRegistry.java:757) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > t(ServiceRegistry.java:712) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(S > erviceRegistrationImpl.java:129) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(Se > rviceRegistry.java:206) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:506) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:524) > at > > org.wso2.carbon.qpid.internal.QpidServiceComponent.activate(QpidServiceCompo > nent.java:134) > 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.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceCompo > nent.java:230) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceC > omponentProp.java:140) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComp > onentProp.java:330) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProce > ss.java:560) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProc > ess.java:182) > at > org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:292) > at > > org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:22 > 6) > at > > org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceCha > nged(FilteredServiceListener.java:124) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(Bun > dleContextImpl.java:930) > at > > org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager. > java:220) > at > > org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(L > istenerQueue.java:149) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > tPrivileged(ServiceRegistry.java:757) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > t(ServiceRegistry.java:712) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(S > erviceRegistrationImpl.java:129) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(Se > rviceRegistry.java:206) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:506) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:524) > at > > org.wso2.carbon.core.services.internal.CarbonServicesServiceComponent.activa > te(CarbonServicesServiceComponent.java:72) > 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.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceCompo > nent.java:230) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceC > omponentProp.java:140) > at > > org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComp > onentProp.java:330) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProce > ss.java:560) > at > > org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProc > ess.java:182) > at > org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:292) > at > > org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:22 > 6) > at > > org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceCha > nged(FilteredServiceListener.java:124) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(Bun > dleContextImpl.java:930) > at > > org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager. > java:220) > at > > org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(L > istenerQueue.java:149) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > tPrivileged(ServiceRegistry.java:757) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEven > t(ServiceRegistry.java:712) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(S > erviceRegistrationImpl.java:129) > at > > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(Se > rviceRegistry.java:206) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:506) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(B > undleContextImpl.java:524) > at > > org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerM > anager.java:471) > at > > org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServer > Manager.java:273) > at > > org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2C > onfigItemListener.java:117) > at > > org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(Bun > dleContextImpl.java:916) > at > > org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager. > java:220) > at > > org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManage > r.java:330) > [2011-12-15 16:44:27,225] INFO - EventBrokerBuilderDS Successfully > registered the event broker > > Saludos, > Ing. Jorge Infante Osorio. > J´Dpto Soluciones SOA. > CDAE. > Fac. 5. > UCI. > > De: Anjana Fernando [mailto:anj...@wso2.com] > Enviado el: lunes, 12 de diciembre de 2011 4:22 > Para: Jorge Infante Osorio > CC: carbon-dev@wso2.org > Asunto: Re: XA Transactions > > Hi Jorge, > > I'm a bit busy with some work now, I will check it out later, but I've done > this in some way earlier, maybe we'd the server.xml in earlier Carbon > versions, I'm not totally sure, you can google around a bit and find the > possibilities of adding a data source in Tomcat. In case I find the > solution > first, I will give an update. > > Cheers, > Anjana. > On Mon, Dec 12, 2011 at 12:12 AM, Jorge Infante Osorio <jorg...@uci.cu> > wrote: > Hi Anjana. > > To work with transactions in Tomcat, I need to work with the server.xml and > context.xml files. > > I found context.xml under [CARBON_HOME]\lib\tomcat\conf\ but I don´t find > server.xml. Following an Afkham message, I see that carbon don't support > server.xml config yet. > > What can I do in the case I cannot use server.xml? > > > Another idea: deploy ESB inside Apache Tomcat?? For me it´s not so good > because I want to use ESB standalone. > > Thanks > Saludos, > Ing. Jorge Infante Osorio. > J´Dpto Soluciones SOA. > CDAE. > Fac. 5. > UCI. > > De: Anjana Fernando [mailto:anj...@wso2.com] > Enviado el: domingo, 11 de diciembre de 2011 2:38 > Para: Jorge Infante Osorio > CC: carbon-dev@wso2.org > Asunto: Re: XA Transactions > Hi Jorge, > On Sun, Dec 11, 2011 at 12:53 PM, Jorge Infante Osorio <jorg...@uci.cu> > wrote: > My bad. I forgot to check that option :-D thanks, it work now. > > Can I do the same config with the DBReport in ESB? I´m try to figure out > how > to do a transaction between 3 DBReport mediators. > > Good to hear it works! .. as for DBReport, I'm afraid you can't use the > same > configuration, for this, you may have to dig into the Tomcat configurations > and create an XA data source there. I haven't personally tested that > scenario that much. But we are also planning to add the XA data source > support to the data sources component we have, so we can create global XA > data sources from there, which can be used by anywhere. > > Cheers, > Anjana. > > > Saludos, > Ing. Jorge Infante Osorio. > J´Dpto Soluciones SOA. > CDAE. > Fac. 5. > UCI. > > De: Anjana Fernando [mailto:anj...@wso2.com] > Enviado el: domingo, 11 de diciembre de 2011 1:36 > Para: Jorge Infante Osorio; carbon-dev > Asunto: Re: XA Transactions > > Hi, > > For the error you just mentioned, as the error message mentions, > distributed > transactions must be enabled in the data service to allow usage of XA data > sources. This settings is there in the first page of the wizard, where you > can check "Enable Distributed Transactions" check box, or else in XML edit, > in the initial "data" XML element, you can set the attribute, enableDTP to > true, e.g. <data name="transaccion1" enableDTP="true" > ... > > Cheers, > Anjana. > > > > > -- > Lakmali Baminiwatta > Software Engineer > WSO2, Inc.: http://wso2.com > lean.enterprise.middleware > > mobile: +94 71 2335936 > > > > > > Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE > ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU! > http://www.antiterroristas.cu > http://justiciaparaloscinco.wordpress.com > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > -- Prabath Abeysekara Software Engineer WSO2 Inc. Email: praba...@wso2.com <harsha...@wso2.com> Mobile: +94774171471 <http://harshana05.blogspot.com/>
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev