freemarker.template.Configuration (v.2.3.22) cannot be injected because of final method decleration in OSGI environment
halil <[email protected]> Wed, 20 May 2015 17:30:43 +0300
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <CA+HT29rSbRL4q9yRL=Abvuq72N7FtUyQ9qvm_LveQZYmG_QjnA@mail.gmail.com> |
--===============4637946512806636205== Content-Type: multipart/alternative; boundary=001a1134d0d0a037120516844534 --001a1134d0d0a037120516844534 Content-Type: text/plain; charset=UTF-8 Hi All, I could not create a reference of freemarker.template.Configuration on OSGI blueprint file. I referenced it as below. Blueprint throwed exception which states that Configuration class has final method declerations. It seems that OSGI (org.apache.felix.framework-4.4.1) does not support injection of classes having final method declerations... <reference id="freemarkerCfgRef" interface="freemarker.template.Configuration" ext:proxy-method='classes' /> When I did below steps, I succeed. 1. create an interface of Configuration class 2. put it a new package named freemarker.template.api. 3. Configuration class now implements freemarker.template.api.FreeMarkerConfigurationInt 3. reference it as below <reference id="freemarkerCfgRef" interface="freemarker.template.api.FreeMarkerConfigurationInt" /> Now, it works perfectly... I read some mails of developers stating that freemarker works on OSGI but I could not succeed until I have done it as above... I would like to inform you, best, -halil. --001a1134d0d0a037120516844534 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div><div><div><div><div><div><div><div>Hi All,<= br><br></div>I could not create a reference of freemarker.template.Configur= ation on OSGI blueprint file. I referenced it as below. Blueprint throwed e= xception which states that Configuration class has final method decleration= s. It seems that OSGI (org.apache.felix.framework-4.4.1) does not support i= njection of classes having final method declerations...<br><br><referenc= e id=3D"freemarkerCfgRef" interface=3D"freemarker.template.C= onfiguration"=C2=A0 ext:proxy-method=3D'classes' /><br><br>= </div>When I did below steps, I succeed.<br><br></div>1. create an interfac= e of Configuration class<br></div>2. put it a new package named freemarker.= template.api.<br></div><div>3. Configuration class now implements freemarke= r.template.api.FreeMarkerConfigurationInt</div>3. reference it as below<br>= <br><reference id=3D"freemarkerCfgRef" interface=3D"freem= arker.template.api.FreeMarkerConfigurationInt" /><br><br></div>Now,= it works perfectly...<br><br></div>I read some mails of developers stating= that freemarker works on OSGI but I could not succeed until I have done it= as above...<br><br><br></div>I would like to inform you,<br><br><br></div>= best,<br><br><br></div>-halil.<br></div> --001a1134d0d0a037120516844534-- --===============4637946512806636205== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y --===============4637946512806636205== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ FreeMarker-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-user --===============4637946512806636205==--