[prev in list] [next in list] [prev in thread] [next in thread]
List: wsf-java-user
Subject: Re: [User] Issue with a mediator: Unknown mediator referenced by configuration element
From: Anjana Fernando <anjana () wso2 ! com>
Date: 2012-05-18 4:57:48
Message-ID: CAN1PtkSeUw_aJHAx=EFZeNc-k1cedK_tqNLbtqPOpb0zxCGFAg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Oh yeah, my mistake, I've earlier mentioned to put it into to "lib", it
should be "dropins", thank you Amila for correcting.
Cheers,
Anjana.
On Fri, May 18, 2012 at 10:10 AM, Amila Maha Arachchi <amilam@wso2.com>wrote:
> Hi Jorge,
>
> Please try the following steps.
>
> 1. You need to have the Mediator, MediatorFactory and Serializer classes
> (as mentioned in the article which you have already referred)
> 2. You need the following configs
>
> org.apache.synapse.config.xml.MediatorSerializer
> org.apache.synapse.config.xml.MediatorFactory
>
> 3. You need a pom.xml similar to what has been provided by Anjana
> 4. Finally, copy the jar to repository/components/*dropins* (your bundle
> is already an OSGi bundle, therefore no need to copy it to lib, you can
> directly copy it to dropins folder)
>
> I have tried the above steps recently on WSO2 ESB 4.0.3 and was
> successful. Hope this helps.
>
> Regards,
> AmilaM.
>
>
> On Fri, May 18, 2012 at 3:59 AM, Jorge Infante Osorio <jorgeio@uci.cu>wrote:
>
>> Hi Anjana,****
>>
>> ** **
>>
>> *De:* Anjana Fernando [mailto:anjana@wso2.com]
>> *Enviado el:* domingo, 13 de mayo de 2012 2:02
>> *Para:* Jorge Infante Osorio
>> *CC:* Nirmal Fernando; user@wso2.org
>> *Asunto:* Re: [User] Issue with a mediator: Unknown mediator referenced
>> by configuration element****
>>
>> ** **
>>
>> Hi Jorge,****
>>
>> On Sun, May 13, 2012 at 7:56 AM, Jorge Infante Osorio <jorgeio@uci.cu>
>> wrote:****
>>
>> ** **
>>
>> I think that too, but after a lots of tests it doesn’t work :-( if I
>> remove the jar from [ESB]/lib I receive this error in console:****
>>
>>
>> You've to put the line "<Fragment-Host>synapse-core</Fragment-Host>" for
>> the bundle plugin in the pom.xml.
>>
>> For example,
>>
>> <plugin>
>> <groupId>org.apache.felix</groupId>
>> <artifactId>maven-bundle-plugin</artifactId>
>> <version>1.4.0</version>
>> <extensions>true</extensions>
>> <configuration>
>> <instructions>
>>
>> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>> <Bundle-Name>${pom.artifactId}</Bundle-Name>
>> <Export-Package>
>> org.wso2.xxx.*
>> </Export-Package>
>> <Import-Package>
>> !javax.xml.namespace,
>> javax.xml.namespace;
>> version=0.0.0,
>> org.apache.commons.logging,
>> org.osgi.framework,
>> *;
>> resolution:=optional
>> </Import-Package>
>> <DynamicImport-Package>*</DynamicImport-Package>
>> * <Fragment-Host>synapse-core</Fragment-Host>*
>> </instructions>
>> </configuration>
>> </plugin>
>>
>> This will make this bundle a fragment of synapse-core, and the Java SPI
>> based lookup will work properly, and then you should just be able to put it
>> in /repository/components/lib.****
>>
>> ** **
>>
>> My Mediator Project use this plugin in pom.xml:****
>>
>> ** **
>>
>> <groupId>org.wso2.maven</groupId>****
>>
>> <artifactId>maven-synapse-mediator-plugin</artifactId>****
>>
>> ** **
>>
>> I have to do the same?
>>
>> Cheers,
>> Anjana.
>> ****
>>
>>
>> [2012-05-13 01:51:14,900] ERROR - MediatorFactoryFinder Unknown mediator
>> referenced by configuration element :
>> {http://ws.apache.org/ns/synapse}LdapEnriquecimiento
>> [2012-05-13 01:51:14,903] WARN - SynapseXMLConfigurationFactory Proxy***
>> *
>>
>> Service configuration: MediadorLDAP cannot be built - Continue in
>> fail-safe****
>>
>> mode 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)****
>>
>> If a put the jar again and restart the server it work.****
>>
>>
>>
>> 2. I have to change the way I access the OMElement that represent my
>> mediator xml. Just like in http://wso2.org/library/2936 I´m doing in the
>> wrong way.
>>
>> Thanks a lot.
>>
>> 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
>>
>>
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Software Engineer- Platform Technologies Team, WSO2 Inc.
>> Mobile: +94715779733
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>> 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
>> User@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/user****
>>
>>
>>
>>
>> --
>> *Anjana Fernando*
>> Associate Technical Lead****
>>
>> WSO2 Inc. | http://wso2.com****
>>
>> lean . enterprise . middleware****
>>
>> <http://www.uci.cu/>
>>
>>
>> _______________________________________________
>> User mailing list
>> User@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/user
>>
>>
>
>
> --
> *Amila Maharachchi*
> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>
> Blog: http://maharachchi.blogspot.com
> Mobile: +94719371446
>
>
>
--
*Anjana Fernando*
Associate Technical Lead
WSO2 Inc. | http://wso2.com
lean . enterprise . middleware
[Attachment #5 (text/html)]
Oh yeah, my mistake, I've earlier mentioned to put it into to "lib", it \
should be "dropins", thank you Amila for \
correcting.<br><br>Cheers,<br>Anjana.<br><br><div class="gmail_quote">On Fri, May 18, \
2012 at 10:10 AM, Amila Maha Arachchi <span dir="ltr"><<a \
href="mailto:amilam@wso2.com" target="_blank">amilam@wso2.com</a>></span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">Hi Jorge,<br><br>Please try the following \
steps.<br><br>1. You need to have the Mediator, MediatorFactory and Serializer \
classes (as mentioned in the article which you have already referred)<br> 2. You need \
the following configs<br>
<pre>org.apache.synapse.config.xml.MediatorSerializer<br>org.apache.synapse.config.xml.MediatorFactory<br></pre> \
3. You need a pom.xml similar to what has been provided by Anjana<br>4. Finally, copy \
the jar to repository/components/<b>dropins</b> (your bundle is already an OSGi \
bundle, therefore no need to copy it to lib, you can directly copy it to dropins \
folder)<br>
<br>I have tried the above steps recently on WSO2 ESB 4.0.3 and was successful. Hope \
this helps.<br><br>Regards,<br>AmilaM.<div><div class="h5"><br><br><div \
class="gmail_quote">On Fri, May 18, 2012 at 3:59 AM, Jorge Infante Osorio <span \
dir="ltr"><<a href="mailto:jorgeio@uci.cu" \
target="_blank">jorgeio@uci.cu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div link="blue" vlink="purple" lang="ES"><div><p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi \
Anjana,<u></u><u></u></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> \
<u></u></span></p><p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> \
Anjana Fernando [mailto:<a href="mailto:anjana@wso2.com" \
target="_blank">anjana@wso2.com</a>] <br>
<b>Enviado el:</b> domingo, 13 de mayo de 2012 2:02<br><b>Para:</b> Jorge Infante \
Osorio<br><b>CC:</b> Nirmal Fernando; <a href="mailto:user@wso2.org" \
target="_blank">user@wso2.org</a><br><b>Asunto:</b> Re: [User] Issue with a mediator: \
Unknown mediator referenced by configuration element<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" \
style="margin-bottom:12.0pt">Hi Jorge,<u></u><u></u></p><div><div><div><p \
class="MsoNormal">On Sun, May 13, 2012 at 7:56 AM, Jorge Infante Osorio <<a \
href="mailto:jorgeio@uci.cu" target="_blank">jorgeio@uci.cu</a>> \
wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><p class="MsoNormal">I \
think that too, but after a lots of tests it doesn’t work :-( if I<br>remove the \
jar from [ESB]/lib I receive this error in console:<u></u><u></u></p>
</div></div><div><div><div><p class="MsoNormal"><br>You've to put the line \
"<Fragment-Host>synapse-core</Fragment-Host>" for the bundle \
plugin in the pom.xml. <br><br>For example,<br> <br>
<plugin><br> <groupId>org.apache.felix</groupId><br> \
<artifactId>maven-bundle-plugin</artifactId><br> \
<version>1.4.0</version><br> \
<extensions>true</extensions><br>
<configuration><br> <instructions><br> \
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName><br> \
<Bundle-Name>${pom.artifactId}</Bundle-Name><br>
<Export-Package><br> \
org.wso2.xxx.*<br> \
</Export-Package><br> <Import-Package><br>
!javax.xml.namespace,<br> \
javax.xml.namespace;<br> version=0.0.0,<br> \
org.apache.commons.logging,<br> org.osgi.framework,<br>
*;<br> \
resolution:=optional<br> </Import-Package><br> \
<DynamicImport-Package>*</DynamicImport-Package><br>
<b> \
<Fragment-Host>synapse-core</Fragment-Host></b><br> \
</instructions><br> </configuration><br> \
</plugin><br><br>This will make this bundle a fragment of synapse-core, and the \
Java SPI based lookup will work properly, and then you should just be able to put it \
in /repository/components/lib.<span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> \
<u></u></span></p></div></div><p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" \
lang="EN-US">My Mediator Project use this plugin in pom.xml:<u></u><u></u></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" \
lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" \
lang="EN-US"> \
<groupId>org.wso2.maven</groupId><u></u><u></u></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" \
lang="EN-US"> \
<artifactId>maven-synapse-mediator-plugin</artifactId><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d" lang="EN-US"><u></u> \
<u></u></span></p><p class="MsoNormal"><span style="color:#1f497d" lang="EN-US">I \
have to do the same?</span><span lang="EN-US"><br><br>Cheers,<br>Anjana.<br>
<u></u><u></u></span></p></div><div><div><blockquote \
style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm \
6.0pt;margin-left:4.8pt;margin-right:0cm"><p class="MsoNormal"><span \
lang="EN-US"><br>
[2012-05-13 01:51:14,900] ERROR - MediatorFactoryFinder Unknown \
mediator<br>referenced by configuration element :<br>{</span><a \
href="http://ws.apache.org/ns/synapse%7DLdapEnriquecimiento" \
target="_blank">http://ws.apache.org/ns/synapse}LdapEnriquecimiento</a><br>
[2012-05-13 01:51:14,903] WARN - SynapseXMLConfigurationFactory \
Proxy<u></u><u></u></p><div><p class="MsoNormal">Service configuration: MediadorLDAP \
cannot be built - Continue in fail-safe<u></u><u></u></p></div><p class="MsoNormal">
mode org.apache.synapse.SynapseException: Unknown mediator referenced \
by<u></u><u></u></p><div><p class="MsoNormal" \
style="margin-bottom:12.0pt">configuration element : {<a \
href="http://ws.apache.org/ns/synapse%7DLdapEnriquecimiento" \
target="_blank">http://ws.apache.org/ns/synapse}LdapEnriquecimiento</a><br>
at<br>org.apache.synapse.config.xml.MediatorFactoryFinder.getMediator(MediatorFact<br>oryFinder.java:185)<br> \
at<br>org.apache.synapse.config.xml.AbstractListMediatorFactory.addChildren(Abstra<br>ctListMediatorFactory.java:41)<u></u><u></u></p>
</div><p class="MsoNormal">If a put the jar again and restart the server it \
work.<u></u><u></u></p><div><div><p class="MsoNormal"><br><br>2. I have to change the \
way I access the OMElement that represent my<br>mediator xml. Just like in <a \
href="http://wso2.org/library/2936" target="_blank">http://wso2.org/library/2936</a> \
I´m doing in the<br>
wrong way.<br><br>Thanks a lot.<br><br>Saludos,<br>Ing. Jorge Infante \
Osorio.<br>J´Dpto Soluciones SOA.<br>CDAE.<br>Fac. 5.<br>UCI.<br><br><br>10mo. \
ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS<br>INFORMATICAS...<br>
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION<br><br><a href="http://www.uci.cu" \
target="_blank">http://www.uci.cu</a><br><a \
href="http://www.facebook.com/universidad.uci" \
target="_blank">http://www.facebook.com/universidad.uci</a><br>
<a href="http://www.flickr.com/photos/universidad_uci" \
target="_blank">http://www.flickr.com/photos/universidad_uci</a><br><br><br><br>--<br><br>Thanks \
& regards,<br>Nirmal<br><br>Software Engineer- Platform Technologies Team, WSO2 \
Inc.<br>
Mobile: <a href="tel:%2B94715779733" target="_blank">+94715779733</a><br>Blog: <a \
href="http://nirmalfdo.blogspot.com/" \
target="_blank">http://nirmalfdo.blogspot.com/</a><br><br><br>10mo. ANIVERSARIO DE LA \
CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...<br>
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION<br><br><a href="http://www.uci.cu" \
target="_blank">http://www.uci.cu</a><br><a \
href="http://www.facebook.com/universidad.uci" \
target="_blank">http://www.facebook.com/universidad.uci</a><br>
<a href="http://www.flickr.com/photos/universidad_uci" \
target="_blank">http://www.flickr.com/photos/universidad_uci</a><u></u><u></u></p></div></div><div><div><p \
class="MsoNormal">_______________________________________________<br>
User mailing list<br><a href="mailto:User@wso2.org" \
target="_blank">User@wso2.org</a><br><a \
href="http://wso2.org/cgi-bin/mailman/listinfo/user" \
target="_blank">http://wso2.org/cgi-bin/mailman/listinfo/user</a><u></u><u></u></p>
</div></div></blockquote></div></div></div><div><div><p class="MsoNormal"><br><br \
clear="all"><br>-- <br><b>Anjana Fernando</b><br><span \
style="font-size:7.5pt;font-family:"Georgia","serif"">Associate \
Technical Lead<u></u><u></u></span></p>
<div><p class="MsoNormal"><span \
style="font-size:7.5pt;font-family:"Georgia","serif"">WSO2 Inc. | \
<a href="http://wso2.com/" \
target="_blank">http://wso2.com</a><u></u><u></u></span></p></div><p \
class="MsoNormal">
<span style="font-size:7.5pt;font-family:"Georgia","serif"">lean \
. enterprise . middleware</span><u></u><u></u></p></div></div></div> <br>
<div>
<a href="http://www.uci.cu/" target="_blank">
<img src="">
</a></div>
<br></div><br>_______________________________________________<br>
User mailing list<br>
<a href="mailto:User@wso2.org" target="_blank">User@wso2.org</a><br>
<a href="http://wso2.org/cgi-bin/mailman/listinfo/user" \
target="_blank">http://wso2.org/cgi-bin/mailman/listinfo/user</a><br> \
<br></blockquote></div><br><br clear="all"><br>-- <br></div></div><font \
size="1"><b><font><span style="color:rgb(153,153,153)">Amila \
Maharachchi</span></font></b><br style="color:rgb(153,153,153)"><span \
style="color:rgb(153,153,153)">Senior Software Engineer;</span></font> <font \
color="#888888"><font face="verdana, sans-serif"><span \
style="font-size:x-small"><span style="font-family:arial;font-size:small"><span \
style="font-size:x-small">WSO2, Inc.; </span><a href="http://wso2.com/" \
target="_blank"><span \
style="font-size:x-small">http://wso2.com</span></a></span></span></font><span \
style="font-size:x-small"><br>
<br>Blog: <a href="http://maharachchi.blogspot.com" \
target="_blank">http://maharachchi.blogspot.com</a> <br>Mobile: <a \
href="tel:%2B94719371446" value="+94719371446" \
target="_blank">+94719371446</a><br><br></span></font><br>
</blockquote></div><br><br clear="all"><br>-- <br><b><font>Anjana \
Fernando</font></b><font style="font-family:georgia,serif" size="2"></font><br><font \
style="font-family:georgia,serif" size="1">Associate Technical Lead<br> <div>WSO2 \
Inc. | <a href="http://wso2.com/" target="_blank">http://wso2.com</a><br></div>lean . \
enterprise . middleware</font><br>
_______________________________________________
User mailing list
User@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic