You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Todd Orr <to...@gmail.com> on 2010/08/20 15:31:30 UTC

T5.2 Coercion Confusion

This used to work in 5.1.05:

	public static void contributeTypeCoercer(Configuration<CoercionTuple>
configuration) {

		configuration.add(new CoercionTuple<String, Class>(String.class,
Class.class, new Coercion<String, Class>() {
			@Override
			public Class coerce(String input) {
				try {
					return Class.forName(input);
				} catch (ClassNotFoundException e) {
					throw new RuntimeException(e);
				}
			}
		}));
		
	}

Since upgrading to 5.2.0 I received this error:

Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could
not find a coercion from type java.lang.String to type
java.lang.Class.

Is there a new syntax for this?

Thanks,
T

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.2 Coercion Confusion

Posted by Todd Orr <to...@gmail.com>.
Head + palm. I must've changed that somewhere along the line. Thanks!

On Fri, Aug 20, 2010 at 3:58 PM, Robert Zeigler <ro...@scazdl.org> wrote:
> I've successfully converted a couple of T5.1 apps to T5.2 without encountering anything like that.  And I have module (and use 3rd party modules) that contribute to TypeCoercer with no issues, as well, so it definitely looks app-specific.
>
> One thing does come to mind, though. In your web.xml, what is the value of "filter-name" (in the filter-mapping element)?
>
> Robert
>
> On Aug 20, 2010, at 8/2010:13 AM , Todd Orr wrote:
>
>> It appears that since upgrading from 5.1 to 5.2 Tapestry completely
>> ignores my AppModule altogether. The only thing that has changed is
>> the Tap version. Has anyone experienced this?
>>
>> On Fri, Aug 20, 2010 at 9:31 AM, Todd Orr <to...@gmail.com> wrote:
>>> This used to work in 5.1.05:
>>>
>>>        public static void contributeTypeCoercer(Configuration<CoercionTuple>
>>> configuration) {
>>>
>>>                configuration.add(new CoercionTuple<String, Class>(String.class,
>>> Class.class, new Coercion<String, Class>() {
>>>                        @Override
>>>                        public Class coerce(String input) {
>>>                                try {
>>>                                        return Class.forName(input);
>>>                                } catch (ClassNotFoundException e) {
>>>                                        throw new RuntimeException(e);
>>>                                }
>>>                        }
>>>                }));
>>>
>>>        }
>>>
>>> Since upgrading to 5.2.0 I received this error:
>>>
>>> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could
>>> not find a coercion from type java.lang.String to type
>>> java.lang.Class.
>>>
>>> Is there a new syntax for this?
>>>
>>> Thanks,
>>> T
>>>
>>
>> ---------------------------------------------------------------------
>> 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: T5.2 Coercion Confusion

Posted by Robert Zeigler <ro...@scazdl.org>.
I've successfully converted a couple of T5.1 apps to T5.2 without encountering anything like that.  And I have module (and use 3rd party modules) that contribute to TypeCoercer with no issues, as well, so it definitely looks app-specific.

One thing does come to mind, though. In your web.xml, what is the value of "filter-name" (in the filter-mapping element)?

Robert

On Aug 20, 2010, at 8/2010:13 AM , Todd Orr wrote:

> It appears that since upgrading from 5.1 to 5.2 Tapestry completely
> ignores my AppModule altogether. The only thing that has changed is
> the Tap version. Has anyone experienced this?
> 
> On Fri, Aug 20, 2010 at 9:31 AM, Todd Orr <to...@gmail.com> wrote:
>> This used to work in 5.1.05:
>> 
>>        public static void contributeTypeCoercer(Configuration<CoercionTuple>
>> configuration) {
>> 
>>                configuration.add(new CoercionTuple<String, Class>(String.class,
>> Class.class, new Coercion<String, Class>() {
>>                        @Override
>>                        public Class coerce(String input) {
>>                                try {
>>                                        return Class.forName(input);
>>                                } catch (ClassNotFoundException e) {
>>                                        throw new RuntimeException(e);
>>                                }
>>                        }
>>                }));
>> 
>>        }
>> 
>> Since upgrading to 5.2.0 I received this error:
>> 
>> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could
>> not find a coercion from type java.lang.String to type
>> java.lang.Class.
>> 
>> Is there a new syntax for this?
>> 
>> Thanks,
>> T
>> 
> 
> ---------------------------------------------------------------------
> 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: T5.2 Coercion Confusion

Posted by Todd Orr <to...@gmail.com>.
It appears that since upgrading from 5.1 to 5.2 Tapestry completely
ignores my AppModule altogether. The only thing that has changed is
the Tap version. Has anyone experienced this?

On Fri, Aug 20, 2010 at 9:31 AM, Todd Orr <to...@gmail.com> wrote:
> This used to work in 5.1.05:
>
>        public static void contributeTypeCoercer(Configuration<CoercionTuple>
> configuration) {
>
>                configuration.add(new CoercionTuple<String, Class>(String.class,
> Class.class, new Coercion<String, Class>() {
>                        @Override
>                        public Class coerce(String input) {
>                                try {
>                                        return Class.forName(input);
>                                } catch (ClassNotFoundException e) {
>                                        throw new RuntimeException(e);
>                                }
>                        }
>                }));
>
>        }
>
> Since upgrading to 5.2.0 I received this error:
>
> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could
> not find a coercion from type java.lang.String to type
> java.lang.Class.
>
> Is there a new syntax for this?
>
> Thanks,
> T
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org