404-not-find / orika

Automatically exported from code.google.com/p/orika
2 stars 0 forks source link

RuntimeException raised when source object contains a list of arrays , even if not mapped #188

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Orika 1.4.5 on Linux, Java 1.6 build 45

See the attached file; when I run that I get 

Exception in thread "main" java.lang.RuntimeException: Unexpected error while 
trying to resolve property orikatest.TestMyOrika.Source, [data]

The issue seems to be caused by the list containing a byte[]. What's puzzling 
to me is that I'm NOT asking orika to map such field - otherwise I'd think it's 
a mapping issue that requires a custom converter.

This seems to happen every time an array is stored inside a collection.

Original issue reported on code.google.com by alan.fra...@gmail.com on 16 Jan 2015 at 1:51

GoogleCodeExporter commented 8 years ago

Original comment by alan.fra...@gmail.com on 16 Jan 2015 at 1:52

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry, I forgot to attach the full stacktrace:

Exception in thread "main" java.lang.RuntimeException: Unexpected error while 
trying to resolve property orikatest.TestMyOrika.Source, [data]
    at ma.glasnost.orika.property.IntrospectorPropertyResolver.collectProperties(IntrospectorPropertyResolver.java:93)
    at ma.glasnost.orika.property.PropertyResolver.getProperties(PropertyResolver.java:128)
    at ma.glasnost.orika.metadata.ClassMapBuilder.<init>(ClassMapBuilder.java:121)
    at ma.glasnost.orika.metadata.ClassMapBuilder$Factory.newClassMapBuilder(ClassMapBuilder.java:69)
    at ma.glasnost.orika.metadata.ClassMapBuilderFactory.getNewClassMapBuilder(ClassMapBuilderFactory.java:142)
    at ma.glasnost.orika.metadata.ClassMapBuilderFactory.map(ClassMapBuilderFactory.java:153)
    at ma.glasnost.orika.impl.DefaultMapperFactory.classMap(DefaultMapperFactory.java:1444)
    at ma.glasnost.orika.impl.DefaultMapperFactory.classMap(DefaultMapperFactory.java:1457)
    at orikatest.TestMyOrika.main(TestMyOrika.java:13)
Caused by: java.lang.IllegalArgumentException: java.lang.Integer[] is an 
unsupported type
    at ma.glasnost.orika.metadata.TypeFactory.limitedValueOf(TypeFactory.java:379)
    at ma.glasnost.orika.metadata.TypeUtil.convertTypeArguments(TypeUtil.java:188)
    at ma.glasnost.orika.metadata.TypeFactory.intern(TypeFactory.java:79)
    at ma.glasnost.orika.metadata.TypeFactory.valueOf(TypeFactory.java:177)
    at ma.glasnost.orika.metadata.TypeFactory.valueOf(TypeFactory.java:201)
    at ma.glasnost.orika.property.PropertyResolver.resolveGenericType(PropertyResolver.java:176)
    at ma.glasnost.orika.property.PropertyResolver.resolvePropertyType(PropertyResolver.java:312)
    at ma.glasnost.orika.property.PropertyResolver.processProperty(PropertyResolver.java:248)
    at ma.glasnost.orika.property.IntrospectorPropertyResolver.collectProperties(IntrospectorPropertyResolver.java:83)
    ... 8 more

Original comment by alan.fra...@gmail.com on 16 Jan 2015 at 1:53