Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException: Converter class br.com.caelum.vraptor.converter.ByteConverter #1086

Open
surajchhetry opened this issue Jan 22, 2017 · 4 comments
Assignees

Comments

@surajchhetry
Copy link

Hi,
If I add a Post method in controller with parameter I am getting below exception.

@Controller
@Path("/user")
public class UserController {
@Post
@Path("new")
public void submitNew(UserModel user){}
 }

public class UserModel{
    private String name; //getter and setter
    private String userName;//getter and setter
    private String password;//getter and setter
  }

Environments:
JDK : 1.8
Wildfly 10.01

java.lang.IllegalStateException: Converter class br.com.caelum.vraptor.converter.ByteConverter have same priority than class br.com.caelum.vraptor.converter.ByteConverter
com.google.common.base.Preconditions.checkState(Preconditions.java:469)

@Turini
Copy link
Member

Turini commented Jan 22, 2017

hey @surajchhetry

this is only happening when you add the post method? I mean, removing it solves completely the problem?

(just trying to understand the unexpected behavior, to reproduce it later)

besides that, could you tell us which vraptor version and plugins you're using?

@Turini Turini self-assigned this Jan 22, 2017
@surajchhetry
Copy link
Author

surajchhetry commented Jan 23, 2017

Hi @Turini , I am using vraptor 4.2.0-RC5 without any plugin.

@mhbpcuiaba
Copy link
Contributor

Hi @Turini , I had the same issue and in my case was the wrong version of paranamer that was lower than 2.7

@Turini
Copy link
Member

Turini commented Sep 23, 2018

@mhbpcuiaba yes, it may cause problems -- especially with java 8+

be default VRaptor uses Paranamer 2.8 as a compile dependency.
Do you think we can make it clearer in the dependencies page?

if you wanna help by sending a pull-request, it will be very welcome (;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants