question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BeanMapper: unable to access mapper

See original GitHub issue

I’m starting with JDBI…

I have mapper like below, but get “unable to access mapper” error. When i implements ResultSetMapper, everything works. Am I doing something wrong?

public class UserMapper extends BeanMapper<User>{

    public UserMapper(Class<User> type) {
        super(type);
    }

}

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
brianmcommented, Jul 3, 2012

On Tue, Jul 3, 2012 at 7:17 AM, marioosh < reply@reply.github.com

wrote:

public class UserMapper extends BeanMapper<User>{

public UserMapper(Class<User> type) {
    super(type);
}

}

Your UserMapper needs to have a No-Arg constructor. Don’t pass Class<User> to the UserMapper constructer, just call super with it a la:

public class UserMapper extends BeanMapper<User> {
  public UserMapper() {
    super(User.class);
  }
}
0reactions
dzmitryhcommented, Mar 8, 2018

tricky thing that Idea did it for me) heh anyway thanks 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bean mapper with @SqlQuery and @RegisterBeanMapper ...
To use a specific constructor, the solution is to use a ConstructorMapper . Your TipoLog class needs a default constructor. This works: User....
Read more >
BeanMapper (42 Bean Mapper 0.2.13 API) - javadoc.io
Add classes to skip while unproxying to prevent failing of the BeanMapper while mapping proxy classes or classes containing synthetic fields (Like ENUM...
Read more >
A Guide to Mapping With Dozer | Baeldung
Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another, attribute by attribute.
Read more >
Usage - Dozer
The Dozer mapping xml file(s) define any custom mappings that can't be automatically ... Below is a programmatic approach to creating a bean...
Read more >
Beanmapper by 42BV
It shows you how to use the BeanMapper in a REST API in Java. ... Let us suppose we have a tool that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found