wood burning stoves 2.0*
The moose likes Web Services and the fly likes Type mismatch error in ParamConverterProvider Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Type mismatch error in ParamConverterProvider" Watch "Type mismatch error in ParamConverterProvider" New topic

Type mismatch error in ParamConverterProvider

Anirudh Gupta
Ranch Hand

Joined: Dec 08, 2010
Posts: 43

Hi All,

While attempting to write a custom ParamConverterProvider I am facing a compile error which is a little strange. I am quiet sure it is trivial but am not able to quiet point it out.
The error is in the provider class on the return statement. "Type mismatch: cannot convert from DemoParamConverter to ParamConverter<T>"

Attaching the 3 artifacts of concern,

1. Provider

2. ParamConverter

3. The type to be converted

Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1076

although i have not ran it, i guess error is due to type information missing in private final DemoParamConverter dpc = new DemoParamConverter() line.
Btw, please post code of DemoParamConverter class.
Anirudh Gupta
Ranch Hand

Joined: Dec 08, 2010
Posts: 43


The 2nd code item listing IS that very class - DemoParamConverter.class.

It is sorta covered in the JavaRanch Style Guide.
subject: Type mismatch error in ParamConverterProvider
Similar Threads
BindingResult is not showing any errors during form Validation
Dependency injection with Wrapper classes
complextype with Axis2
mapping xml to java using jaxb
How to read/understand a generic method?