tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gunnar Eketrapp (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TAP5-1763) User types stopped working when upgrading to 5.3
Date Mon, 28 Nov 2011 12:14:39 GMT

     [ https://issues.apache.org/jira/browse/TAP5-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gunnar Eketrapp updated TAP5-1763:
----------------------------------

    Description: 
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());
    }


  was:
This morning i decided to step up to 5.3.

I noticed that 5.3 is stricter and some of my pages did not work due to the fact that 
there where event methods with no corresponding template component. So I had to 
do some cleanup but that I like ! I was also one of the few that had used @PageDetached :-)

Now I encountered another 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());
    }


    
> 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

        

Mime
View raw message