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

Ability to set custom ClassLoader #198

Open
GoogleCodeExporter opened this issue Jan 1, 2016 · 0 comments
Open

Ability to set custom ClassLoader #198

GoogleCodeExporter opened this issue Jan 1, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hello!

I am using Orika in Java EE 6 environment.
I get following exception.

Caused by: java.lang.NoClassDefFoundError: name/of/my/Class
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483)
    at java.lang.Class.getConstructor0(Class.java:2793)
    at java.lang.Class.newInstance(Class.java:345)
    at ma.glasnost.orika.impl.generator.SourceCodeContext.getInstance(SourceCodeContext.java:266)
    at ma.glasnost.orika.impl.generator.MapperGenerator.build(MapperGenerator.java:75)
    at ma.glasnost.orika.impl.DefaultMapperFactory.buildMapper(DefaultMapperFactory.java:1372)
    at ma.glasnost.orika.impl.DefaultMapperFactory.build(DefaultMapperFactory.java:1199)
    at ma.glasnost.orika.impl.DefaultMapperFactory.getMapperFacade(DefaultMapperFactory.java:859)

A similar problem exists and Dozer.
But Dozer allows to replace the default ClassLoader with a custom one.
This workaround solves the problem.

Original issue reported on code.google.com by [email protected] on 19 Jun 2015 at 11:18

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

No branches or pull requests

1 participant