Hi all,
I'm having some difficulties injecting a service, when I reference
the service through a @ServiceLink I get this exception:
org.apache.hivemind.ApplicationRuntimeException
No engine service named '<SingletonProxy for
eventscalendar.ICalService(org.apache.tapestry.engine.IEngineService)>'
is available.
Stack Trace:
*
org.apache.tapestry.services.impl.ServiceMapImpl.buildProxy(ServiceMapIm
pl.java:143)
*
org.apache.tapestry.services.impl.ServiceMapImpl.getService(ServiceMapIm
pl.java:105)
* $ServiceMap_10e8b71c9d5.getService($ServiceMap_10e8b71c9d5.java)
*
org.apache.tapestry.engine.AbstractEngine.getService(AbstractEngine.java
:164)
*
org.apache.tapestry.link.AbstractLinkComponent.getLink(AbstractLinkCompo
nent.java:197)
* org.apache.tapestry.link.ServiceLink.getLink(ServiceLink.java:38)
*
org.apache.tapestry.link.DefaultLinkRenderer.constructURL(DefaultLinkRen
derer.java:112)
*
org.apache.tapestry.link.DefaultLinkRenderer.renderLink(DefaultLinkRende
rer.java:62)
Here is my setup:
hivemodule.xml
<module id="eventscalendar" version="4.0.0"
package="com.sourcebeat.tap101.services">
<contribution configuration-
id="tapestry.services.ApplicationServices">
<service name="ical" object="service:ICalService" />
</contribution>
<service-point id="ICalService"
interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory model="singleton">
<construct class="ICalService">
<set-object property="eventDAO"
value="spring:eventDAO"/>
</construct>
</invoke-factory>
</service-point>
</module>
UpcomingEvents.java (all but the injection ommitted)
@InjectObject("service:eventscalendar.ICalService")
public abstract IEngineService getIcal();
UpcomingEvents.html (servicelink call)
<a href="WeeksEvents.ics" jwcid="@ServiceLink" service="ognl:ical"
parameters="ognl:calendarType"/>
Now one thing I'm not sure on is my service implements the
IEngineService but it returns null on the getLink(), I don't know if
this is the root cause of the error or not. But I thought I'd shoot
this off before testing that theory out.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]