0

I am getting the below exception since morning. This is thrown in the generic main Controller that we have written at line getPageModel(requestPath, localization); This exception occurs on all the pages. I am eliminating each include page at a time but no luck.

Caused by: java.lang.reflect.UndeclaredThrowableException: null at com.sun.proxy.$Proxy81.buildRegions(Unknown Source) ~[na:na] at com.sdl.webapp.dd4t.PageBuilder.createPage(PageBuilder.java:141) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider$1.tryFindPage(DD4TContentProvider.java:83) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider$1.tryFindPage(DD4TContentProvider.java:69) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider.findPage(DD4TContentProvider.java:135) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider.getPageModel(DD4TContentProvider.java:69) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.PageBuilder.createPage(PageBuilder.java:134) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider$1.tryFindPage(DD4TContentProvider.java:83) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider$1.tryFindPage(DD4TContentProvider.java:69) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider.findPage(DD4TContentProvider.java:135) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TContentProvider.getPageModel(DD4TContentProvider.java:69) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.addon.controller.GenericMainController.getPageModel(GenericMainController.java:161) ~[GenericMainController.class:na] ... 53 common frames omitted Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_79] at com.sdl.webapp.common.api.DefaultImplementation.invoke(DefaultImplementation.java:36) ~[common-api-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] ... 65 common frames omitted Caused by: java.lang.IllegalStateException: Not a java.util.Collection or Array at org.springframework.core.convert.TypeDescriptor.assertCollectionOrArray(TypeDescriptor.java:597) ~[spring-core-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.core.convert.TypeDescriptor.getElementTypeDescriptor(TypeDescriptor.java:431) ~[spring-core-3.2.8.RELEASE.jar:3.2.8.RELEASE] at com.sdl.webapp.dd4t.fieldconverters.EmbeddedFieldConverter.getFieldValue(EmbeddedFieldConverter.java:41) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.DD4TSemanticFieldDataProvider.getFieldData(DD4TSemanticFieldDataProvider.java:83) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.common.impl.mapping.SemanticMapperImpl$1.doWith(SemanticMapperImpl.java:68) ~[common-impl-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:577) ~[spring-core-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:554) ~[spring-core-3.2.8.RELEASE.jar:3.2.8.RELEASE] at com.sdl.webapp.common.impl.mapping.SemanticMapperImpl.createEntity(SemanticMapperImpl.java:47) ~[common-impl-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.EntityBuilder.createEntity(EntityBuilder.java:81) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.dd4t.PageBuilder$DD4TRegionBuilderCallback.buildEntity(PageBuilder.java:84) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.sdl.webapp.common.impl.DefaultRegionBuilder.buildRegions(DefaultRegionBuilder.java:44) ~[common-impl-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] ... 70 common frames omitted

  • Is this the latest DXA version? DXA 1.2 with JAVA is released now. This is the first DXA release with JAVA support. You might be using an older development copy. community.sdl.com/developers/tridion_developer/m/mediagallery/… – Jan H Nov 9 '15 at 19:02
  • 1
    Indeed, the stack trace indicates that you are on a pre-release version. We don't keep track of the source code for these pre-release versions. But you will probably have the source code (which you used to compile that version). I suggest to check what is on line 41 of EmbeddedFieldConverter.java to get a better idea of how it is failing. – Rick Pannekoek Nov 9 '15 at 19:36
  • Line 41 shows final TypeDescriptor elementType = targetType.getElementTypeDescriptor(); – Rache Nov 10 '15 at 5:03
  • I was able to find which model caused this issue. It was because I allowed multiple values on a link on the Schema level but didn't handle it in the model side in Java. Thanks for pointing me to the correct line. – Rache Nov 10 '15 at 6:14
  • 1
    @Rache. Great you found the problem. You can add the answer to your own question here on Tridion.Stackexchange and approve your own answer. – Jan H Nov 10 '15 at 16:15
1

This issue came up because I allowed multiple values on a link field on the schema level in CMS but forgot to modify the model in Java. This caused the java.lang.IllegalStateException: Not a java.util.Collection or Array exception.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.