This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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: 49

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: 1340

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: 49


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

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Type mismatch error in ParamConverterProvider
It's not a secret anymore!