You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stefan <st...@wammel.com> on 2009/08/27 17:06:16 UTC
Problems with FormFragment and Zone update
Hi,
i have some trouble with a zone update.
A nested formFragment (within a zone) should be switched in/visible
dependend on a <select>-selection
Below i have included a snippet from the source:
<t:form t:id="addEditForm">
<p>
<t:label for="nType" /> :<br />
<t:select t:id="nType" validate="required" />
<t:actionlink t:id="nTypeUpdate" zone="qTypeZone">Update</
t:actionlink>
</p>
<t:zone t:id="qTypeZone" id="qTypeZone" visible="false">
<t:formfragment t:id="addEditForm_qType">
<p><t:label for="qType" /> :<br />
<t:select t:id="qType" /></p>
</t:formfragment>
</t:zone>
</t:form>
The problem is that there will be an exception (below) thrown and i
have no idea whats going wrong here.
What should i do to get this working?
Thanks in advance,
Stefan
Render queue error in BeginRender ... :
No object of type org.apache.tapestry5.services.FormSupport is
available from the Environment.
Available types are
org.apache.tapestry5.RenderSupport,
org.apache.tapestry5.ValidationDecorator,
org.apache.tapestry5.internal.services.DocumentLinker,
org.apache.tapestry5.services.ClientBehaviorSupport,
org.apache.tapestry5.services.Heartbeat.
Re: Problems with FormFragment and Zone update
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Thu, 27 Aug 2009 15:11:20 -0300, Stefan <st...@wammel.com> escreveu:
> Thanks Thiago,
You're welcome!
> Do you have still any idea?
Unfortunately, no. Remote debugging is quite hard . . . :P
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problems with FormFragment and Zone update
Posted by Stefan <st...@wammel.com>.
Thanks Thiago,
but unfortunately no improvement.
> Anyway, you need to add zone="addEditFormZone" to <t:form>
I have changed that.
My event handler returns "qTypeZone.getBody()"
Do you have still any idea?
Am 27.08.2009 um 19:00 schrieb Thiago H. de Paula Figueiredo:
> Em Thu, 27 Aug 2009 13:44:25 -0300, Stefan <st...@wammel.com>
> escreveu:
>
>> Sorry, it gives me the same error:
>>
>> No object of type org.apache.tapestry5.services.FormSupport is
>> available from the Environment. ...
>> And here is what i have changed:
>>
>> <t:zone t:id="addEditFormZone">
>> <t:form t:id="addEditForm">
>>
>> ... same as in first post
>>
>> </t:form>
>> </t:zone>
>
> Are your returning the addEditFormZone in your event handler method?
> Anyway, you need to add zone="addEditFormZone" to <t:form>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Problems with FormFragment and Zone update
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Thu, 27 Aug 2009 13:44:25 -0300, Stefan <st...@wammel.com> escreveu:
> Sorry, it gives me the same error:
>
> No object of type org.apache.tapestry5.services.FormSupport is
> available from the Environment. ...
> And here is what i have changed:
>
> <t:zone t:id="addEditFormZone">
> <t:form t:id="addEditForm">
>
> ... same as in first post
>
> </t:form>
> </t:zone>
Are your returning the addEditFormZone in your event handler method?
Anyway, you need to add zone="addEditFormZone" to <t:form>
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problems with FormFragment and Zone update
Posted by Stefan <st...@wammel.com>.
Sorry, it gives me the same error:
No object of type org.apache.tapestry5.services.FormSupport is
available from the Environment. ...
And here is what i have changed:
<t:zone t:id="addEditFormZone">
<t:form t:id="addEditForm">
... same as in first post
</t:form>
</t:zone>
Am 27.08.2009 um 18:26 schrieb Thiago H. de Paula Figueiredo:
> Em Thu, 27 Aug 2009 13:03:46 -0300, Stefan <st...@wammel.com>
> escreveu:
>
>> I tried the workaround and surrounded the whole form with a zone,
>> but it does not work.
>
> How does it not work? You didn't describe the error, so we cannot
> help you here.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Problems with FormFragment and Zone update
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Thu, 27 Aug 2009 13:03:46 -0300, Stefan <st...@wammel.com> escreveu:
> I tried the workaround and surrounded the whole form with a zone,
> but it does not work.
How does it not work? You didn't describe the error, so we cannot help you
here.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: ServletOutputStream gives null pointer in v5.1.0.5 but not in
v5.0.18
Posted by Marinus Maris <ma...@magiad.nl>.
Solved it. I should have checked the Tapestry Wiki first before posting,
sorry about that.
http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile
Still I don't know what changed in between versions, but I can live with
that.
Marinus
Marinus Maris schreef:
> I post this mail again, now with the stack trace added below the code:
>
> To get a file from disk I wrote this code below. It works perfectly in
> version 5.0.18 but it generates a null pointer in v5.1.0.5. I checked
> the release notes to no avail. What's going on here? Apparently a gzip
> service is needed now?
>
> Object onActionFromGetParticipantsFile() {
> String method = "get";
> try {
> FileInputStream fInput = new FileInputStream(fileName);
> byte[] bytes = new byte[fInput.available()];
> fInput.read(bytes, 0, fInput.available());
> if (bytes != null) {
> ServletOutputStream stream =
> response.getHTTPServletResponse().getOutputStream();
>
> response.getHTTPServletResponse().setContentType("text/plain");
>
> response.getHTTPServletResponse().setContentLength(bytes.length);
>
> response.getHTTPServletResponse().setHeader("Content-Disposition",
> method + ";filename=" +fileName;
>
> stream.write(bytes);
>
> line 446 in the code: Here it comes up with the null pointer,
> although the stream object exists as I checked that.
>
> stream.flush();
> stream.close();
> return response;
> }
> } catch (Exception e) {
> e.printStackTrace();
> }
> return new TextStreamResponse("text/plain", String.format("file
> " + fileName+ " not found"));
>
> java.lang.NullPointerException
> at
> org.apache.tapestry5.internal.services.ResponseCompressionAnalyzerImpl.isCompressable(ResponseCompressionAnalyzerImpl.java:65)
>
> at
> $ResponseCompressionAnalyzer_1236c9345b8.isCompressable($ResponseCompressionAnalyzer_1236c9345b8.java)
>
> at
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.openResponseOutputStream(BufferedGZipOutputStream.java:77)
>
> at
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.checkForCutover(BufferedGZipOutputStream.java:70)
>
> at
> org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.write(BufferedGZipOutputStream.java:108)
>
> at
> mobiquete.pages.SurveyDeploy.onActionFromGetParticipantsFile(SurveyDeploy.java:446)
>
> at
> mobiquete.pages.SurveyDeploy.dispatchComponentEvent(SurveyDeploy.java)
> at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902)
>
> at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
>
> at
> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
>
> at
> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>
> at
> $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
>
> at
> org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>
> at
> $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
>
> at
> org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75)
>
> at
> $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
>
> at
> org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164)
>
> at
> $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
>
> at
> $ComponentEventRequestHandler_1236c9345d9.handle($ComponentEventRequestHandler_1236c9345d9.java)
>
> at
> org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
>
> at
> $ComponentRequestHandler_1236c9345cd.handleComponentEvent($ComponentRequestHandler_1236c9345cd.java)
>
> at
> org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
>
> at $Dispatcher_1236c9345cf.dispatch($Dispatcher_1236c9345cf.java)
> at $Dispatcher_1236c9345c5.dispatch($Dispatcher_1236c9345c5.java)
> at
> org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
>
> at mobiquete.services.AppModule$1.service(AppModule.java:96)
> at
> $RequestFilter_1236c9345c4.service($RequestFilter_1236c9345c4.java)
> at
> $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
> at
> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
>
> at
> $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
> at
> org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
>
> at
> $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
> at
> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
>
> at
> $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
> at
> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
>
> at
> $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
> at
> org.equanda.tapestry5.services.EquandaModule$1.service(EquandaModule.java:84)
>
> at
> $RequestFilter_1236c9345c0.service($RequestFilter_1236c9345c0.java)
> at
> $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
> at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
>
> at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
>
> at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
>
> at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
>
> at
> $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
> at
> $RequestHandler_1236c9345ba.service($RequestHandler_1236c9345ba.java)
> at
> org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)
>
> at
> org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> at
> $HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
>
> at
> org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
>
> at
> $HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
>
> at
> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>
> at
> $HttpServletRequestFilter_1236c9345b9.service($HttpServletRequestFilter_1236c9345b9.java)
>
> at
> $HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
>
> at
> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
>
> at
> $HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
>
> at
> $HttpServletRequestHandler_1236c9345b6.service($HttpServletRequestHandler_1236c9345b6.java)
>
> at
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:619)
>
>
> Thiago H. de Paula Figueiredo schreef:
>> Em Sat, 29 Aug 2009 07:26:50 -0300, Marinus Maris
>> <ma...@magiad.nl> escreveu:
>>
>>> Hi
>>
>> Hi!
>>
>>> To get a file from disk I wrote this code below. It works perfectly
>>> in version 5.0.18 but it generates a null pointer in v5.1.0.5. I
>>> checked the release notes to no avail. What's going on here?
>>
>> To begin with, where's the stack trace? In what line does the NPE
>> happen?
>>
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database:
>> 270.13.71/2332 - Release Date: 08/28/09 18:10:00
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.71/2335 - Release Date: 08/30/09 06:36:00
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: ServletOutputStream gives null pointer in v5.1.0.5 but not in
v5.0.18
Posted by Marinus Maris <ma...@magiad.nl>.
I post this mail again, now with the stack trace added below the code:
To get a file from disk I wrote this code below. It works perfectly in
version 5.0.18 but it generates a null pointer in v5.1.0.5. I checked
the release notes to no avail. What's going on here? Apparently a gzip
service is needed now?
Object onActionFromGetParticipantsFile() {
String method = "get";
try {
FileInputStream fInput = new FileInputStream(fileName);
byte[] bytes = new byte[fInput.available()];
fInput.read(bytes, 0, fInput.available());
if (bytes != null) {
ServletOutputStream stream =
response.getHTTPServletResponse().getOutputStream();
response.getHTTPServletResponse().setContentType("text/plain");
response.getHTTPServletResponse().setContentLength(bytes.length);
response.getHTTPServletResponse().setHeader("Content-Disposition",
method + ";filename=" +fileName;
stream.write(bytes);
line 446 in the code: Here it comes up with the null pointer, although
the stream object exists as I checked that.
stream.flush();
stream.close();
return response;
}
} catch (Exception e) {
e.printStackTrace();
}
return new TextStreamResponse("text/plain", String.format("file "
+ fileName+ " not found"));
java.lang.NullPointerException
at
org.apache.tapestry5.internal.services.ResponseCompressionAnalyzerImpl.isCompressable(ResponseCompressionAnalyzerImpl.java:65)
at
$ResponseCompressionAnalyzer_1236c9345b8.isCompressable($ResponseCompressionAnalyzer_1236c9345b8.java)
at
org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.openResponseOutputStream(BufferedGZipOutputStream.java:77)
at
org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.checkForCutover(BufferedGZipOutputStream.java:70)
at
org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.write(BufferedGZipOutputStream.java:108)
at
mobiquete.pages.SurveyDeploy.onActionFromGetParticipantsFile(SurveyDeploy.java:446)
at
mobiquete.pages.SurveyDeploy.dispatchComponentEvent(SurveyDeploy.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
at
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
at
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
at
$ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
at
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
at
$ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
at
org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75)
at
$ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
at
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164)
at
$ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java)
at
$ComponentEventRequestHandler_1236c9345d9.handle($ComponentEventRequestHandler_1236c9345d9.java)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
at
$ComponentRequestHandler_1236c9345cd.handleComponentEvent($ComponentRequestHandler_1236c9345cd.java)
at
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
at $Dispatcher_1236c9345cf.dispatch($Dispatcher_1236c9345cf.java)
at $Dispatcher_1236c9345c5.dispatch($Dispatcher_1236c9345c5.java)
at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
at mobiquete.services.AppModule$1.service(AppModule.java:96)
at
$RequestFilter_1236c9345c4.service($RequestFilter_1236c9345c4.java)
at
$RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at
$RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
at
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
at
$RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
at
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
at
$RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
at
$RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
at
org.equanda.tapestry5.services.EquandaModule$1.service(EquandaModule.java:84)
at
$RequestFilter_1236c9345c0.service($RequestFilter_1236c9345c0.java)
at
$RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
at
$RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java)
at
$RequestHandler_1236c9345ba.service($RequestHandler_1236c9345ba.java)
at
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)
at
org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at
$HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
at
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
at
$HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
at
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at
$HttpServletRequestFilter_1236c9345b9.service($HttpServletRequestFilter_1236c9345b9.java)
at
$HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
at
$HttpServletRequestHandler_1236c9345bc.service($HttpServletRequestHandler_1236c9345bc.java)
at
$HttpServletRequestHandler_1236c9345b6.service($HttpServletRequestHandler_1236c9345b6.java)
at
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Thiago H. de Paula Figueiredo schreef:
> Em Sat, 29 Aug 2009 07:26:50 -0300, Marinus Maris
> <ma...@magiad.nl> escreveu:
>
>> Hi
>
> Hi!
>
>> To get a file from disk I wrote this code below. It works perfectly
>> in version 5.0.18 but it generates a null pointer in v5.1.0.5. I
>> checked the release notes to no avail. What's going on here?
>
> To begin with, where's the stack trace? In what line does the NPE happen?
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.71/2332 - Release Date: 08/28/09 18:10:00
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: ServletOutputStream gives null pointer in v5.1.0.5 but not in
v5.0.18
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Sat, 29 Aug 2009 07:26:50 -0300, Marinus Maris
<ma...@magiad.nl> escreveu:
> Hi
Hi!
> To get a file from disk I wrote this code below. It works perfectly in
> version 5.0.18 but it generates a null pointer in v5.1.0.5. I checked
> the release notes to no avail. What's going on here?
To begin with, where's the stack trace? In what line does the NPE happen?
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
ServletOutputStream gives null pointer in v5.1.0.5 but not in v5.0.18
Posted by Marinus Maris <ma...@magiad.nl>.
Hi
To get a file from disk I wrote this code below. It works perfectly in
version 5.0.18 but it generates a null pointer in v5.1.0.5. I checked
the release notes to no avail. What's going on here?
Object onActionFromGetParticipantsFile() {
String method = "get";
try {
FileInputStream fInput = new FileInputStream(fileName);
byte[] bytes = new byte[fInput.available()];
fInput.read(bytes, 0, fInput.available());
if (bytes != null) {
ServletOutputStream stream =
response.getHTTPServletResponse().getOutputStream();
response.getHTTPServletResponse().setContentType("text/plain");
response.getHTTPServletResponse().setContentLength(bytes.length);
response.getHTTPServletResponse().setHeader("Content-Disposition",
method + ";filename=" +fileName;
stream.write(bytes);
**** Here it comes up with a null pointer, although the streanm object
exists as I checked that !
stream.flush();
stream.close();
return response;
}
} catch (Exception e) {
System.out.println("onActionFromGetFile; " + e);
}
return new TextStreamResponse("text/plain", String.format("file
" + fileName+ " not found"));
Marinus
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problems with FormFragment and Zone update
Posted by Stefan <st...@wammel.com>.
Thank for the fast reply.
I think i understand the problem.
If i replace the nested form fragment with an static text, it works.
But it does not with the form fragment.
I tried the workaround and surrounded the whole form with a zone,
but it does not work.
Am 27.08.2009 um 17:43 schrieb Thiago H. de Paula Figueiredo:
> Em Thu, 27 Aug 2009 12:06:16 -0300, Stefan <st...@wammel.com>
> escreveu:
>
>> Hi,
>
> Hi!
>
>> Render queue error in BeginRender ... :
>> No object of type org.apache.tapestry5.services.FormSupport is
>> available from the Environment.
>
> Tapestry requires a Form to be rendering to render a field. While
> rendering your zone, there wasn't a Form inside. A workaround is to
> surround the whole Form with a Zone.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Problems with FormFragment and Zone update
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Thu, 27 Aug 2009 12:06:16 -0300, Stefan <st...@wammel.com> escreveu:
> Hi,
Hi!
> Render queue error in BeginRender ... :
> No object of type org.apache.tapestry5.services.FormSupport is
> available from the Environment.
Tapestry requires a Form to be rendering to render a field. While
rendering your zone, there wasn't a Form inside. A workaround is to
surround the whole Form with a Zone.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org