First problem I see:

hivemodule.xml:
<service name="ical" object="service:ICalService" />

  public String getName() {
       return "ICalService";
   }

These need to be the same string. Tapestry is checking that the engine
service knows its own name, in case it generates any links.

I don't think that's your root problem.

I need to see the code from UpcomingEvents.java and a  readable and complete
stack trace.

On 10/27/06, Warner Onstine <[EMAIL PROTECTED]> wrote:

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]




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Reply via email to