Ok, I tried to add the following to my module definition in WEB-INF

<implementation service-id="tapestry.url.LinkFactory">

    <invoke-factory>
      <construct class="org.apache.tapestry.services.impl.LinkFactoryImpl">
        <set-object property="dataSqueezer" 
value="infrastructure:dataSqueezer"/>
        <set-configuration property="contributions" 
configuration-id="tapestry.url.ServiceEncoders"/>
        <set-object property="servletPath" 
value="app-property:org.apache.tapestry.servlet-path"/>
        <set-object property="contextPath" value="literal:"/>
     <set-object property="request" value="infrastructure:request"/>
        <set-service property="persistenceStrategySource" 
service-id="tapestry.persist.PropertyPersistenceStrategySource"/>
      </construct>
    </invoke-factory>

  </implementation>

The result is a fatal error

exception

javax.servlet.ServletException: Unable to construct service 
tapestry.request.RequestCycleFactory: Error building service 
tapestry.request.RequestCycleFactory: Error at 
jar:file:/usr/java/jakarta-tomcat-5.5.9/webapps/blingon-test-portal/WEB-INF/lib/tapestry-4.0-beta-13.jar!/META-INF/tapestry.request.xml,
 
line 216, column 88: Unable to read property serviceEncoders of object 
<SingletonProxy for 
tapestry.url.LinkFactory(org.apache.tapestry.services.LinkFactory)>: 
java.lang.reflect.InvocationTargetException
        
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
        
$ServletRequestServicer_107a51a5492.service($ServletRequestServicer_107a51a5492.java)
        
$ServletRequestServicer_107a51a5491.service($ServletRequestServicer_107a51a5491.java)
        
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
        
$ServletRequestServicerFilter_107a51a548e.service($ServletRequestServicerFilter_107a51a548e.java)
        
$ServletRequestServicerFilter_107a51a548d.service($ServletRequestServicerFilter_107a51a548d.java)
        
$ServletRequestServicer_107a51a5493.service($ServletRequestServicer_107a51a5493.java)
        
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
        
$ServletRequestServicerFilter_107a51a548c.service($ServletRequestServicerFilter_107a51a548c.java)
        
$ServletRequestServicerFilter_107a51a548b.service($ServletRequestServicerFilter_107a51a548b.java)
        
$ServletRequestServicer_107a51a5493.service($ServletRequestServicer_107a51a5493.java)
        
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
        
$ServletRequestServicerFilter_107a51a5490.service($ServletRequestServicerFilter_107a51a5490.java)
        
$ServletRequestServicerFilter_107a51a548f.service($ServletRequestServicerFilter_107a51a548f.java)
        
$ServletRequestServicer_107a51a5493.service($ServletRequestServicer_107a51a5493.java)
        
$ServletRequestServicer_107a51a5484.service($ServletRequestServicer_107a51a5484.java)
        
$ServletRequestServicer_107a51a5483.service($ServletRequestServicer_107a51a5483.java)
        
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
        org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
com.bluprinted.personal.servlet.SessionGovernorFilter.doFilter(SessionGovernorFilter.java:222)

root cause

org.apache.hivemind.ApplicationRuntimeException: Unable to construct service 
tapestry.request.RequestCycleFactory: Error building service 
tapestry.request.RequestCycleFactory: Error at 
jar:file:/usr/java/jakarta-tomcat-5.5.9/webapps/blingon-test-portal/WEB-INF/lib/tapestry-4.0-beta-13.jar!/META-INF/tapestry.request.xml,
 
line 216, column 88: Unable to read property serviceEncoders of object 
<SingletonProxy for 
tapestry.url.LinkFactory(org.apache.tapestry.services.LinkFactory)>: 
java.lang.reflect.InvocationTargetException 
[jar:file:/usr/java/jakarta-tomcat-5.5.9/webapps/blingon-test-portal/WEB-INF/lib/tapestry-4.0-beta-13.jar!/META-INF/tapestry.request.xml,
 
line 213, column 21]
        
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:165)
I guess I should have checked the log file, because it provides more clues. 
It states that the literal: cannot be used. So I tried to do<set-object 
property="contextPath" value=""/>Which leads to Links looking like 
'/null/Page.htm'Is there another way to specify a blank value or should I 
make my own LinkFactory implementation.Henrik
"Howard Lewis Ship" <[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
If you did as you said, then your LinkFactory impl did replace the
default one, as surely as releasing a ball from your hand causes it to
drop to the ground.

So, don't you think we might need more data to determine what really 
happened?

On 11/18/05, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:
> How do I replace LinkFactory.
>
> I tried contributing a new <implementation> but that didn't seem to work.
>
> So How ?
>
> Henrik
>
> "hv @ Fashion Content" <[EMAIL PROTECTED]> skrev i en meddelelse
> news:[EMAIL PROTECTED]
> > In my existing Tapestry 3 solution I had my own Link class which didn't
> > prefix the contextPath to URLs.
> >
> > In Tapestry 4 it is the LinkFactory that determines that part of the
> > process. It has a contextPath attribute which must be initialised
> > somewhere. I need to make sure that this is set to "". How do I do it?
> >
> > 1) Subclass and replace the LinkFactory
> > 2) Configure context.xml / web.xml
> > 3) App. Spec. Meta tag
> >
> > ?
> >
> > Cheers,
> >
> > Henrik
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

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

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





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

Reply via email to