You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ryan Cuprak <rc...@mac.com> on 2006/06/29 22:47:29 UTC
Re: File download - LinkFactory not being set (statup exception
now)
Tweaked my hivemodule.xml to the following:
<service-point id="BipService" interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct class="com.kodak.mis.web.engine.BipService">
<set-object property="linkFactory" value="service:tapestry.url.LinkFactory"/>
</construct>
</invoke-factory>
</service-point>
<contribution configuration-id="tapestry.services.ApplicationServices">
<service name="bip" object="service:com.kodak.mis.web.engine.BipService"/>
</contribution>
Changed contribution/service/object from instance:... to service:.... Thought that simple fix would resolve it, however I now get:
javax.servlet.ServletException: Unable to construct service tapestry.asset.ClasspathAssetFactory: Error building service tapestry.asset.ClasspathAssetFactory: Error at jar:file:/C:/Documents%20and%20Settings/l507107/My%20Documents/Projects/MI_4.5/Source/Kodak_MI/Java/webapps/admin/WEB-INF/lib/tapestry-4.0.2.jar!/META-INF/tapestry.asset.xml, line 81, column 75: Unable to construct service tapestry.services.ServiceMap: Error building service tapestry.services.ServiceMap: Error at jar:file:/C:/Documents%20and%20Settings/l507107/My%20Documents/Projects/MI_4.5/Source/Kodak_MI/Java/webapps/admin/WEB-INF/lib/tapestry-4.0.2.jar!/META-INF/tapestry.services.xml, line 166, column 75: Unable to initialize service tapestry.services.ServiceMap (by invoking method initializeService on org.apache.tapestry.services.impl.ServiceMapImpl): Unable to construct configuration tapestry.services.ApplicationServices: Error at context:/WEB-INF/hivemodule.xml, line 110, column 83: Unable to process attribute object (of element service): Service point com.kodak.mis.web.engine.BipService does not exist.
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
$ServletRequestServicer_10c2186bf14.service($ServletRequestServicer_10c2186bf14.java)
$ServletRequestServicer_10c2186bf13.service($ServletRequestServicer_10c2186bf13.java)
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
$ServletRequestServicerFilter_10c2186bf10.service($ServletRequestServicerFilter_10c2186bf10.java)
$ServletRequestServicerFilter_10c2186bf0f.service($ServletRequestServicerFilter_10c2186bf0f.java)
$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2186bf15.java)
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
$ServletRequestServicerFilter_10c2186bf0e.service($ServletRequestServicerFilter_10c2186bf0e.java)
$ServletRequestServicerFilter_10c2186bf0d.service($ServletRequestServicerFilter_10c2186bf0d.java)
$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2186bf15.java)
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
$ServletRequestServicerFilter_10c2186bf12.service($ServletRequestServicerFilter_10c2186bf12.java)
$ServletRequestServicerFilter_10c2186bf11.service($ServletRequestServicerFilter_10c2186bf11.java)
$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2186bf15.java)
$ServletRequestServicer_10c2186bf08.service($ServletRequestServicer_10c2186bf08.java)
$ServletRequestServicer_10c2186bf07.service($ServletRequestServicer_10c2186bf07.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)
My class is compiled and deinitely in the classpath. If I remove:
<contribution configuration-id="tapestry.services.ApplicationServices">
<service name="bip" object="service:com.kodak.mis.web.engine.BipService"/>
</contribution>
then it reads everything in ok but the page which uses this engine/service doesn't work.
Any pointers on what I am missing?
-Ryan
On Thursday, June 29, 2006, at 01:35PM, Ryan Cuprak <rc...@mac.com> wrote:
>
>Hello,
> I am working my way through the "Handling File Downloads and Uploads" chapter in the "Enjoying Web Development" book however I am crashing into a brick wall.
> The setter for the LinkFactory is never being called thus resulting in a null pointer exception.
>
> hivemodule.xml snippet:
> <service-point id="BipService" interface="org.apache.tapestry.engine.IEngineService">
> <invoke-factory>
> <construct class="com.kodak.mis.web.engine.BipService">
> <set-object property="linkFactory" value="service:tapestry.url.LinkFactory"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <contribution configuration-id="tapestry.services.ApplicationServices">
> <service name="BipService" object="instance:com.kodak.mis.web.engine.BipService"/>
> </contribution>
>
> Code snippet:
>public class BipService implements IEngineService {
>
> private static final Logger logger = Logger.getLogger(BipService.class);
>
> private LinkFactory _linkFactory;
>
> public void setLinkFactory(LinkFactory linkFactory) {
> if(logger.isDebugEnabled())logger.debug("Link factory called: " + linkFactory);
> _linkFactory = linkFactory;
> }
>
> public ILink getLink(boolean post, Object parameter) {
> Map parameters = new HashMap();
> if(logger.isDebugEnabled()) logger.debug("link factory is null " + (_linkFactory == null) );
> return _linkFactory.constructLink(this,post,parameters,false);
> }
>
> It is always null. For the 'set-object' line I can enter complete garbage for the value and it won't complain!
>
> Am I missing something??
>
> Thanks!
> Ryan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: File download - LinkFactory not being set (statup exception
now)
Posted by Ryan Cuprak <rc...@mac.com>.
Thank you!!!!!!!!!!!!!!!!!!!!
This was driving me absolutely nuts.
-Ryan
On Thursday, June 29, 2006, at 01:59PM, Jeff Lubetkin <je...@zillow.com> wrote:
>Your service ID is not the same as your class name. Try:
>
> <contribution
>configuration-id="tapestry.services.ApplicationServices">
> <service name="bip" object="service:BipService"/>
> </contribution>
>
>jeff
>-----Original Message-----
>From: Ryan Cuprak [mailto:rcuprak@mac.com]
>Sent: Thursday, June 29, 2006 1:47 PM
>To: Tapestry users
>Subject: Re: File download - LinkFactory not being set (statup exception
>now)
>
>
>Tweaked my hivemodule.xml to the following:
> <service-point id="BipService"
>interface="org.apache.tapestry.engine.IEngineService">
> <invoke-factory>
> <construct class="com.kodak.mis.web.engine.BipService">
> <set-object property="linkFactory"
>value="service:tapestry.url.LinkFactory"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <contribution
>configuration-id="tapestry.services.ApplicationServices">
> <service name="bip"
>object="service:com.kodak.mis.web.engine.BipService"/>
> </contribution>
>
> Changed contribution/service/object from instance:... to service:....
>Thought that simple fix would resolve it, however I now get:
> javax.servlet.ServletException: Unable to construct service
>tapestry.asset.ClasspathAssetFactory: Error building service
>tapestry.asset.ClasspathAssetFactory: Error at
>jar:file:/C:/Documents%20and%20Settings/l507107/My%20Documents/Projects/
>MI_4.5/Source/Kodak_MI/Java/webapps/admin/WEB-INF/lib/tapestry-4.0.2.jar
>!/META-INF/tapestry.asset.xml, line 81, column 75: Unable to construct
>service tapestry.services.ServiceMap: Error building service
>tapestry.services.ServiceMap: Error at
>jar:file:/C:/Documents%20and%20Settings/l507107/My%20Documents/Projects/
>MI_4.5/Source/Kodak_MI/Java/webapps/admin/WEB-INF/lib/tapestry-4.0.2.jar
>!/META-INF/tapestry.services.xml, line 166, column 75: Unable to
>initialize service tapestry.services.ServiceMap (by invoking method
>initializeService on org.apache.tapestry.services.impl.ServiceMapImpl):
>Unable to construct configuration tapestry.services.ApplicationServices:
>Error at context:/WEB-INF/hivemodule.xml, line 110, column 83: Unable to
>process attribute object (of element service): Service point
>com.kodak.mis.web.engine.BipService does not exist.
>
>org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.servi
>ce(WebRequestServicerPipelineBridge.java:60)
>
>$ServletRequestServicer_10c2186bf14.service($ServletRequestServicer_10c2
>186bf14.java)
>
>$ServletRequestServicer_10c2186bf13.service($ServletRequestServicer_10c2
>186bf13.java)
>
>org.apache.tapestry.request.DecodedRequestInjector.service(DecodedReques
>tInjector.java:55)
>
>$ServletRequestServicerFilter_10c2186bf10.service($ServletRequestService
>rFilter_10c2186bf10.java)
>
>$ServletRequestServicerFilter_10c2186bf0f.service($ServletRequestService
>rFilter_10c2186bf0f.java)
>
>$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2
>186bf15.java)
>
>org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDe
>coderFilter.java:52)
>
>$ServletRequestServicerFilter_10c2186bf0e.service($ServletRequestService
>rFilter_10c2186bf0e.java)
>
>$ServletRequestServicerFilter_10c2186bf0d.service($ServletRequestService
>rFilter_10c2186bf0d.java)
>
>$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2
>186bf15.java)
>
>org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequ
>estEncoding.java:53)
>
>$ServletRequestServicerFilter_10c2186bf12.service($ServletRequestService
>rFilter_10c2186bf12.java)
>
>$ServletRequestServicerFilter_10c2186bf11.service($ServletRequestService
>rFilter_10c2186bf11.java)
>
>$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2
>186bf15.java)
>
>$ServletRequestServicer_10c2186bf08.service($ServletRequestServicer_10c2
>186bf08.java)
>
>$ServletRequestServicer_10c2186bf07.service($ServletRequestServicer_10c2
>186bf07.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)
>
> My class is compiled and deinitely in the classpath. If I remove:
> <contribution
>configuration-id="tapestry.services.ApplicationServices">
> <service name="bip"
>object="service:com.kodak.mis.web.engine.BipService"/>
> </contribution>
>
> then it reads everything in ok but the page which uses this
>engine/service doesn't work.
>
> Any pointers on what I am missing?
>
>
> -Ryan
>
>On Thursday, June 29, 2006, at 01:35PM, Ryan Cuprak <rc...@mac.com>
>wrote:
>
>>
>>Hello,
>> I am working my way through the "Handling File Downloads and Uploads"
>chapter in the "Enjoying Web Development" book however I am crashing
>into a brick wall.
>> The setter for the LinkFactory is never being called thus resulting in
>a null pointer exception.
>>
>> hivemodule.xml snippet:
>> <service-point id="BipService"
>interface="org.apache.tapestry.engine.IEngineService">
>> <invoke-factory>
>> <construct class="com.kodak.mis.web.engine.BipService">
>> <set-object property="linkFactory"
>value="service:tapestry.url.LinkFactory"/>
>> </construct>
>> </invoke-factory>
>> </service-point>
>>
>> <contribution
>configuration-id="tapestry.services.ApplicationServices">
>> <service name="BipService"
>object="instance:com.kodak.mis.web.engine.BipService"/>
>> </contribution>
>>
>> Code snippet:
>>public class BipService implements IEngineService {
>>
>> private static final Logger logger =
>Logger.getLogger(BipService.class);
>>
>> private LinkFactory _linkFactory;
>>
>> public void setLinkFactory(LinkFactory linkFactory) {
>> if(logger.isDebugEnabled())logger.debug("Link factory called: "
>+ linkFactory);
>> _linkFactory = linkFactory;
>> }
>>
>> public ILink getLink(boolean post, Object parameter) {
>> Map parameters = new HashMap();
>> if(logger.isDebugEnabled()) logger.debug("link factory is null
>" + (_linkFactory == null) );
>> return _linkFactory.constructLink(this,post,parameters,false);
>> }
>>
>> It is always null. For the 'set-object' line I can enter complete
>garbage for the value and it won't complain!
>>
>> Am I missing something??
>>
>> Thanks!
>> Ryan
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: File download - LinkFactory not being set (statup exception now)
Posted by Jeff Lubetkin <je...@zillow.com>.
Your service ID is not the same as your class name. Try:
<contribution
configuration-id="tapestry.services.ApplicationServices">
<service name="bip" object="service:BipService"/>
</contribution>
jeff
-----Original Message-----
From: Ryan Cuprak [mailto:rcuprak@mac.com]
Sent: Thursday, June 29, 2006 1:47 PM
To: Tapestry users
Subject: Re: File download - LinkFactory not being set (statup exception
now)
Tweaked my hivemodule.xml to the following:
<service-point id="BipService"
interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct class="com.kodak.mis.web.engine.BipService">
<set-object property="linkFactory"
value="service:tapestry.url.LinkFactory"/>
</construct>
</invoke-factory>
</service-point>
<contribution
configuration-id="tapestry.services.ApplicationServices">
<service name="bip"
object="service:com.kodak.mis.web.engine.BipService"/>
</contribution>
Changed contribution/service/object from instance:... to service:....
Thought that simple fix would resolve it, however I now get:
javax.servlet.ServletException: Unable to construct service
tapestry.asset.ClasspathAssetFactory: Error building service
tapestry.asset.ClasspathAssetFactory: Error at
jar:file:/C:/Documents%20and%20Settings/l507107/My%20Documents/Projects/
MI_4.5/Source/Kodak_MI/Java/webapps/admin/WEB-INF/lib/tapestry-4.0.2.jar
!/META-INF/tapestry.asset.xml, line 81, column 75: Unable to construct
service tapestry.services.ServiceMap: Error building service
tapestry.services.ServiceMap: Error at
jar:file:/C:/Documents%20and%20Settings/l507107/My%20Documents/Projects/
MI_4.5/Source/Kodak_MI/Java/webapps/admin/WEB-INF/lib/tapestry-4.0.2.jar
!/META-INF/tapestry.services.xml, line 166, column 75: Unable to
initialize service tapestry.services.ServiceMap (by invoking method
initializeService on org.apache.tapestry.services.impl.ServiceMapImpl):
Unable to construct configuration tapestry.services.ApplicationServices:
Error at context:/WEB-INF/hivemodule.xml, line 110, column 83: Unable to
process attribute object (of element service): Service point
com.kodak.mis.web.engine.BipService does not exist.
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.servi
ce(WebRequestServicerPipelineBridge.java:60)
$ServletRequestServicer_10c2186bf14.service($ServletRequestServicer_10c2
186bf14.java)
$ServletRequestServicer_10c2186bf13.service($ServletRequestServicer_10c2
186bf13.java)
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedReques
tInjector.java:55)
$ServletRequestServicerFilter_10c2186bf10.service($ServletRequestService
rFilter_10c2186bf10.java)
$ServletRequestServicerFilter_10c2186bf0f.service($ServletRequestService
rFilter_10c2186bf0f.java)
$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2
186bf15.java)
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDe
coderFilter.java:52)
$ServletRequestServicerFilter_10c2186bf0e.service($ServletRequestService
rFilter_10c2186bf0e.java)
$ServletRequestServicerFilter_10c2186bf0d.service($ServletRequestService
rFilter_10c2186bf0d.java)
$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2
186bf15.java)
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequ
estEncoding.java:53)
$ServletRequestServicerFilter_10c2186bf12.service($ServletRequestService
rFilter_10c2186bf12.java)
$ServletRequestServicerFilter_10c2186bf11.service($ServletRequestService
rFilter_10c2186bf11.java)
$ServletRequestServicer_10c2186bf15.service($ServletRequestServicer_10c2
186bf15.java)
$ServletRequestServicer_10c2186bf08.service($ServletRequestServicer_10c2
186bf08.java)
$ServletRequestServicer_10c2186bf07.service($ServletRequestServicer_10c2
186bf07.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)
My class is compiled and deinitely in the classpath. If I remove:
<contribution
configuration-id="tapestry.services.ApplicationServices">
<service name="bip"
object="service:com.kodak.mis.web.engine.BipService"/>
</contribution>
then it reads everything in ok but the page which uses this
engine/service doesn't work.
Any pointers on what I am missing?
-Ryan
On Thursday, June 29, 2006, at 01:35PM, Ryan Cuprak <rc...@mac.com>
wrote:
>
>Hello,
> I am working my way through the "Handling File Downloads and Uploads"
chapter in the "Enjoying Web Development" book however I am crashing
into a brick wall.
> The setter for the LinkFactory is never being called thus resulting in
a null pointer exception.
>
> hivemodule.xml snippet:
> <service-point id="BipService"
interface="org.apache.tapestry.engine.IEngineService">
> <invoke-factory>
> <construct class="com.kodak.mis.web.engine.BipService">
> <set-object property="linkFactory"
value="service:tapestry.url.LinkFactory"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <contribution
configuration-id="tapestry.services.ApplicationServices">
> <service name="BipService"
object="instance:com.kodak.mis.web.engine.BipService"/>
> </contribution>
>
> Code snippet:
>public class BipService implements IEngineService {
>
> private static final Logger logger =
Logger.getLogger(BipService.class);
>
> private LinkFactory _linkFactory;
>
> public void setLinkFactory(LinkFactory linkFactory) {
> if(logger.isDebugEnabled())logger.debug("Link factory called: "
+ linkFactory);
> _linkFactory = linkFactory;
> }
>
> public ILink getLink(boolean post, Object parameter) {
> Map parameters = new HashMap();
> if(logger.isDebugEnabled()) logger.debug("link factory is null
" + (_linkFactory == null) );
> return _linkFactory.constructLink(this,post,parameters,false);
> }
>
> It is always null. For the 'set-object' line I can enter complete
garbage for the value and it won't complain!
>
> Am I missing something??
>
> Thanks!
> Ryan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org