You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Daniel (JIRA)" <de...@tapestry.apache.org> on 2008/06/24 17:38:45 UTC
[jira] Created: (TAPESTRY-2476) Unhelpful exception messages when a
null value is bound to a required parameter.
Unhelpful exception messages when a null value is bound to a required parameter.
--------------------------------------------------------------------------------
Key: TAPESTRY-2476
URL: https://issues.apache.org/jira/browse/TAPESTRY-2476
Project: Tapestry
Issue Type: Bug
Components: Core Components
Affects Versions: 5.0.11
Environment: Windows XP Service Pack 2, FireFox 2.0.0.14, Eclipse 3.3.2, Maven 2.0.9, Run-Jetty-Run, Java 1.6.0_3
Reporter: Daniel
Priority: Minor
Example exception:
Render queue error in SetupRender[MainPage:tilesetsearch.palette]:
org.apache.tapestry.ioc.internal.util.TapestryException
Example tml line:
<t:palette t:model="keywordModel" t:selected="selectedKeywordIds" t:encoder="longEncoder" t:size="5"/>
Example stack trace: java.lang.NullPointerException
* org.apache.tapestry.corelib.components...
Palette.setupRender(Palette.java:379)
* Palette.setupRender(Palette.java)
* org.apache.tapestry.internal.structure...
ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
* ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:880)
* ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
* ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
* org.apache.tapestry.internal.services...
RenderQueueImpl.run(RenderQueueImpl.java:63)
* PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
This constitutes one example where the t:selected parameter was null. Later I got the same exception message with a different stack trace when the same parameter was null, but for a different reason.
Perhaps required parameters should not only be bound, but also null checked.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2476) Unhelpful exception messages when a
null value is bound to a required parameter
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAPESTRY-2476:
-------------------------------------------
Summary: Unhelpful exception messages when a null value is bound to a required parameter (was: Unhelpful exception messages when a null value is bound to a required parameter.)
The solution here is to add another @Parameter attribute, allowNull. This defaults to true. When allowNull=false, and when a parameter is bound, and the value retrieved from the parameters is null, an exception is thrown. Often, but not always, required=true will be paired with allowNull=false. The exception is something like the value parameter of TextField, which must be bound, but doesn't have to have an initial value.
> Unhelpful exception messages when a null value is bound to a required parameter
> -------------------------------------------------------------------------------
>
> Key: TAPESTRY-2476
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2476
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.11
> Environment: Windows XP Service Pack 2, FireFox 2.0.0.14, Eclipse 3.3.2, Maven 2.0.9, Run-Jetty-Run, Java 1.6.0_3
> Reporter: Daniel
> Assignee: Howard M. Lewis Ship
> Priority: Minor
> Fix For: 5.0.14
>
>
> Example exception:
> Render queue error in SetupRender[MainPage:tilesetsearch.palette]:
> org.apache.tapestry.ioc.internal.util.TapestryException
> Example tml line:
> <t:palette t:model="keywordModel" t:selected="selectedKeywordIds" t:encoder="longEncoder" t:size="5"/>
> Example stack trace: java.lang.NullPointerException
> * org.apache.tapestry.corelib.components...
> Palette.setupRender(Palette.java:379)
> * Palette.setupRender(Palette.java)
> * org.apache.tapestry.internal.structure...
> ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
> * ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:880)
> * ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
> * ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
> * org.apache.tapestry.internal.services...
> RenderQueueImpl.run(RenderQueueImpl.java:63)
> * PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
> This constitutes one example where the t:selected parameter was null. Later I got the same exception message with a different stack trace when the same parameter was null, but for a different reason.
> Perhaps required parameters should not only be bound, but also null checked.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-2476) Unhelpful exception messages when
a null value is bound to a required parameter.
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607786#action_12607786 ]
Howard M. Lewis Ship commented on TAPESTRY-2476:
------------------------------------------------
Looking at the code, the issue here should be that keywordModel was returning null.
> Unhelpful exception messages when a null value is bound to a required parameter.
> --------------------------------------------------------------------------------
>
> Key: TAPESTRY-2476
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2476
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.11
> Environment: Windows XP Service Pack 2, FireFox 2.0.0.14, Eclipse 3.3.2, Maven 2.0.9, Run-Jetty-Run, Java 1.6.0_3
> Reporter: Daniel
> Assignee: Howard M. Lewis Ship
> Priority: Minor
>
> Example exception:
> Render queue error in SetupRender[MainPage:tilesetsearch.palette]:
> org.apache.tapestry.ioc.internal.util.TapestryException
> Example tml line:
> <t:palette t:model="keywordModel" t:selected="selectedKeywordIds" t:encoder="longEncoder" t:size="5"/>
> Example stack trace: java.lang.NullPointerException
> * org.apache.tapestry.corelib.components...
> Palette.setupRender(Palette.java:379)
> * Palette.setupRender(Palette.java)
> * org.apache.tapestry.internal.structure...
> ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
> * ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:880)
> * ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
> * ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
> * org.apache.tapestry.internal.services...
> RenderQueueImpl.run(RenderQueueImpl.java:63)
> * PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
> This constitutes one example where the t:selected parameter was null. Later I got the same exception message with a different stack trace when the same parameter was null, but for a different reason.
> Perhaps required parameters should not only be bound, but also null checked.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Assigned: (TAPESTRY-2476) Unhelpful exception messages when
a null value is bound to a required parameter.
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAPESTRY-2476:
----------------------------------------------
Assignee: Howard M. Lewis Ship
> Unhelpful exception messages when a null value is bound to a required parameter.
> --------------------------------------------------------------------------------
>
> Key: TAPESTRY-2476
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2476
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.11
> Environment: Windows XP Service Pack 2, FireFox 2.0.0.14, Eclipse 3.3.2, Maven 2.0.9, Run-Jetty-Run, Java 1.6.0_3
> Reporter: Daniel
> Assignee: Howard M. Lewis Ship
> Priority: Minor
>
> Example exception:
> Render queue error in SetupRender[MainPage:tilesetsearch.palette]:
> org.apache.tapestry.ioc.internal.util.TapestryException
> Example tml line:
> <t:palette t:model="keywordModel" t:selected="selectedKeywordIds" t:encoder="longEncoder" t:size="5"/>
> Example stack trace: java.lang.NullPointerException
> * org.apache.tapestry.corelib.components...
> Palette.setupRender(Palette.java:379)
> * Palette.setupRender(Palette.java)
> * org.apache.tapestry.internal.structure...
> ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
> * ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:880)
> * ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
> * ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
> * org.apache.tapestry.internal.services...
> RenderQueueImpl.run(RenderQueueImpl.java:63)
> * PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
> This constitutes one example where the t:selected parameter was null. Later I got the same exception message with a different stack trace when the same parameter was null, but for a different reason.
> Perhaps required parameters should not only be bound, but also null checked.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-2476) Unhelpful exception messages when a
null value is bound to a required parameter
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-2476.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.14
> Unhelpful exception messages when a null value is bound to a required parameter
> -------------------------------------------------------------------------------
>
> Key: TAPESTRY-2476
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2476
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.11
> Environment: Windows XP Service Pack 2, FireFox 2.0.0.14, Eclipse 3.3.2, Maven 2.0.9, Run-Jetty-Run, Java 1.6.0_3
> Reporter: Daniel
> Assignee: Howard M. Lewis Ship
> Priority: Minor
> Fix For: 5.0.14
>
>
> Example exception:
> Render queue error in SetupRender[MainPage:tilesetsearch.palette]:
> org.apache.tapestry.ioc.internal.util.TapestryException
> Example tml line:
> <t:palette t:model="keywordModel" t:selected="selectedKeywordIds" t:encoder="longEncoder" t:size="5"/>
> Example stack trace: java.lang.NullPointerException
> * org.apache.tapestry.corelib.components...
> Palette.setupRender(Palette.java:379)
> * Palette.setupRender(Palette.java)
> * org.apache.tapestry.internal.structure...
> ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
> * ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:880)
> * ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
> * ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
> * org.apache.tapestry.internal.services...
> RenderQueueImpl.run(RenderQueueImpl.java:63)
> * PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
> This constitutes one example where the t:selected parameter was null. Later I got the same exception message with a different stack trace when the same parameter was null, but for a different reason.
> Perhaps required parameters should not only be bound, but also null checked.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org