You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Gunnar Eketrapp (Commented) (JIRA)" <ji...@apache.org> on 2011/12/03 09:49:40 UTC

[jira] [Commented] (TAP5-1763) User types stopped working when upgrading to 5.3

    [ https://issues.apache.org/jira/browse/TAP5-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162073#comment-13162073 ] 

Gunnar Eketrapp commented on TAP5-1763:
---------------------------------------

Ok I took some time ro provide a  minimal project thar reproduces the issue. Just extratc it and runt with 

   gradle jettyRun

The tets page url is http://localhost:8080/t53/usertypes which crashes with 5.3

Edit build.gradle and switch 5.3 to 5.2.6 and retstart - now it works!
                
> User types stopped working when upgrading to 5.3
> ------------------------------------------------
>
>                 Key: TAP5-1763
>                 URL: https://issues.apache.org/jira/browse/TAP5-1763
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3
>            Reporter: Gunnar Eketrapp
>
> This morning i decided to step up to 5.3.
> I encountered a problem that at the first sight could not be seen among the breaking 
> changes listing in http://tapestry.apache.org/release-notes-53.html
> A textfield that is using a none standard type raises an exception.
> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'translate' of component economy/EditTransaction:date: java.lang.NullPointerException
> 	at org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:259) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.corelib.base.AbstractTextField.getfieldvalue_translate(AbstractTextField.java) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:159) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143) ~[tapestry-core-5.3.jar:na]
> 	... 82 common frames omitted
> Caused by: java.lang.NullPointerException: null
> 	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768) ~[na:1.6.0_22]
> 	at org.apache.tapestry5.ioc.util.AbstractMessages.getFormatter(AbstractMessages.java:67) ~[tapestry-ioc-5.3.jar:na]
> 	at $Messages_531628bb891f.getFormatter(Unknown Source) ~[na:na]
> 	at $Messages_531628bb899c.getFormatter(Unknown Source) ~[na:na]
> 	at org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:129) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:93) ~[tapestry-core-5.3.jar:na]
> 	at org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:74) ~[tapestry-core-5.3.jar:na]
> To get my user types to function in textfield's I have added the following in my module config class which worked in 5.2
>     public static void contributeTranslatorSource(MappedConfiguration<Class<?>, Translator<?>> configuration) {
>         configuration.add(EmailAddress.class, new EmailTranslator());
>         configuration.add(Money.class, new MoneyTranslator());
>         configuration.add(Percentage.class, new PercentageTranslator());
>         configuration.add(UTDate.class, new UTDateTranslator());
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira