Hi Jorge,

On Sun, May 13, 2012 at 4:56 AM, Jorge Infante Osorio <[email protected]>wrote:

> Hi all.
>
> I´m building a mediator using the class mediator and I call it in this way
> and it work fine.
>
>    <class name="cdae.uci.cu.mediadores.LdapEnriquecimientoMediator">
>                <property name="INITCTX"
> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>                <property name="MY_HOST"
> value="ldap://localhost:10389/ou=Users,dc=cdae,dc=uci,dc=cu"/>
>                <property name="usuario" value="uid=admin,ou=system"/>
>                <property name="pass" value="secret"/>
>                <property name="tipo_auth" value="simple"/>
>        </class>
>
> Now I want to go a step further  and call it in this way:
>
>                        <LdapEnriquecimiento>
>
> <INITCTX>com.sun.jndi.ldap.LdapCtxFactory</INITCTX>
>
> <MY_HOST>ldap://localhost:10389/ou=Users,dc=cdae,dc=uci,dc=cu</MY_HOST>
>                                <usuario>uid=admin,ou=system</usuario>
>                                <pass>secret</pass>
>                                <tipo_auth>simple</tipo_auth>
>                        </LdapEnriquecimiento>
>
>
Please make sure that the QName you've used in MediatorFactory is same as
"LdapEnriquecimiento".

Further you can refer OT article [1], if you're not already referring to it.

[1] http://wso2.org/library/2936


> So I modified the implementation as you can see in the attached file.
>
> When I use this mediator inside a proxy service I see this error:
>
> TID: [0] [WSO2 ESB] [2012-05-12 19:16:16,042] DEBUG
> {org.apache.synapse.config.xml.MediatorFactoryFinder} -
> getMediator({http://ws.apache.org/ns/synapse}LdapEnriquecimiento)
> {org.apache.synapse.config.xml.MediatorFactoryFinder}
> TID: [0] [WSO2 ESB] [2012-05-12 19:16:16,045] ERROR
> {org.apache.synapse.config.xml.MediatorFactoryFinder} -  Unknown mediator
> referenced by configuration element :
> {http://ws.apache.org/ns/synapse}LdapEnriquecimiento
> {org.apache.synapse.config.xml.MediatorFactoryFinder}
> TID: [0] [WSO2 ESB] [2012-05-12 19:16:16,049]  WARN
> {org.apache.synapse.config.xml.SynapseXMLConfigurationFactory} -  Proxy
> Service configuration: MediadorLDAP cannot be built - Continue in fail-safe
> mode {org.apache.synapse.config.xml.SynapseXMLConfigurationFactory}
> org.apache.synapse.SynapseException: Unknown mediator referenced by
> configuration element : {
> http://ws.apache.org/ns/synapse}LdapEnriquecimiento
>        at
>
> org.apache.synapse.config.xml.MediatorFactoryFinder.getMediator(MediatorFact
> oryFinder.java:185)
>        at
>
> org.apache.synapse.config.xml.AbstractListMediatorFactory.addChildren(Abstra
> ctListMediatorFactory.java:41)
>        at
>
> org.apache.synapse.config.xml.SequenceMediatorFactory.createAnonymousSequenc
> e(SequenceMediatorFactory.java:69)
>        at
>
> org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFa
> ctory.java:185)
>        at
>
> org.apache.synapse.config.xml.SynapseXMLConfigurationFactory.defineProxy(Syn
> apseXMLConfigurationFactory.java:137)
>        at
>
> org.apache.synapse.config.xml.MultiXMLConfigurationBuilder.createProxyServic
> es(MultiXMLConfigurationBuilder.java:220)
>        at
>
> org.apache.synapse.config.xml.MultiXMLConfigurationBuilder.getConfiguration(
> MultiXMLConfigurationBuilder.java:127)
>        at
>
> org.apache.synapse.config.SynapseConfigurationBuilder.getConfiguration(Synap
> seConfigurationBuilder.java:100)
>        at
>
> org.apache.synapse.Axis2SynapseController.createSynapseConfiguration(Axis2Sy
> napseController.java:465)
>        at
>
> org.wso2.carbon.mediation.initializer.CarbonSynapseController.createSynapseC
> onfiguration(CarbonSynapseController.java:150)
>        at org.apache.synapse.ServerManager.start(ServerManager.java:177)
>        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)
>
>
> As I can  understand the loadMediatorFactories method  of the
> MediatorFactoryFinder class cannot find the class to build my mediator. But
> I specified in the META-INF/services/ the two classes for Factory and
> Serializer stuff as you can see in my jar.
>
> What I do it wrong?
>
> Saludos,
> Ing. Jorge Infante Osorio.
> J´Dpto Soluciones SOA.
> CDAE.
> Fac. 5.
> UCI.
>
>
>
>
> 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
> INFORMATICAS...
> CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
>
> http://www.uci.cu
> http://www.facebook.com/universidad.uci
> http://www.flickr.com/photos/universidad_uci
>
>
> _______________________________________________
> User mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/user
>
>


-- 

Thanks & regards,
Nirmal

Software Engineer- Platform Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
_______________________________________________
User mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/user

Reply via email to