I' trying to convert an old, pre 3.0 tapestry application to T4.1. Although 
it's quite some work, most of it goes smoothly. However, I have an external 
service called "Pdf", and it doesn't work at all. Basically, when I'm trying to 
render a page containing a link to the service I get the message  "No engine 
service named '<SingletonProxy for 
net.kolmodin.yalt.Pdf(org.apache.tapestry.engine.IEngineService)>' is 
available. This has now taken a looong time, and I'm just stuck :-(

Some bits out of this: The component being rendered:

    <component id="pdfLink" type="ServiceLink">
        <binding name="service"     
value="hivemind:service:net.kolmodin.yalt.Pdf" /> 
        <binding name="title"          value="message:pdfTip"/>
        <binding name="parameters"  value="ognl:page.layoutId" />
    </component>

hivemodule.xml:

<contribution configuration-id="tapestry.services.ApplicationServices">
    <service name="pdf" object="service:Pdf"/>
</contribution>

<service-point id="Pdf" 
               interface="org.apache.tapestry.engine.IEngineService">
  <invoke-factory>
      <construct class="net.kolmodin.yalt.list.PdfFormatService">
          <set-object property="response" value="tapestry.globals.response"/>
          <set-object property="request" value="tapestry.globals.request"/>
          <set-object property="linkFactory" 
value="infrastructure:linkFactory"/>
      </construct>
  </invoke-factory>


The service is a little  too big for this message. It's getName() returns 
'pdf', though, and it does implement IEngineService according to the compiler. 
I have inserted log statements in the getLink method, but it obviously crashes 
before this call.

One possible problem is that the service is a concrete class called 
PdfFormatService, inheriting a lot of properties from the abstract 
FormatService. Are there any limitations in such a scenario in the hivemind 
reflection code?
 
A grep in the log (which logs all DEBUG messages) shows that the missing 
SingletonProxy has been created. 

2007-03-23 15:19:12,332 [main] DEBUG org.apache.hivemind.impl.RegistryBuilder - 
Creating service point net.kolmodin.yalt.Pdf
2007-03-23 15:19:12,332 [main] DEBUG org.apache.hivemind.impl.RegistryBuilder - 
Adding InvokeFactoryDescriptor[factoryServiceId=hivemind.BuilderFactory 
parameters=[ElementImpl[elementName=construct 
attributes=[AttributeImpl[name=class 
value=net.kolmodin.yalt.list.PdfFormatService]] elements=null content=]] 
serviceModel=singleton] to service extension point net.kolmodin.yalt.Pdf
2007-03-23 15:19:12,332 [main] DEBUG org.apache.hivemind.impl.RegistryBuilder - 
Adding InterceptorDescriptor[factoryServiceId=hivemind.LoggingInterceptor 
parameters=null before=null after=null name=null] to service extension point 
net.kolmodin.yalt.Pdf
2007-03-23 15:19:18,078 [http-8080-Processor25] DEBUG net.kolmodin.yalt.Pdf - 
Creating SingletonProxy for service net.kolmodin.yalt.Pdf
2007-03-23 15:19:35,732 [http-8080-Processor25] DEBUG 
org.apache.tapestry.engine.RequestCycle - Set attribute 
org.apache.tapestry.active-link-component to [EMAIL PROTECTED]/pdfLink]
org.apache.hivemind.ApplicationRuntimeException: No engine service named 
'<SingletonProxy for 
net.kolmodin.yalt.Pdf(org.apache.tapestry.engine.IEngineService)>' is available.
~                                                                               
~                                                                               
~                          

The top of the stack trace:
#org.apache.tapestry.services.impl.ServiceMapImpl.buildProxy(ServiceMapImpl.java:143)
#org.apache.tapestry.services.impl.ServiceMapImpl.getService(ServiceMapImpl.java:105)
#$ServiceMap_1117f2a5533.getService($ServiceMap_1117f2a5533.java)
#org.apache.tapestry.link.ServiceLink.getLink(ServiceLink.java:38)

Any hints out there?

--Alec


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to