ClassCastException after search groups in Nuxeo 6.0 with Oracle JDK 1.8.x

Hi,

My Nuxeo configuration : Nuxeo 6.0-HF25, Oracle JDK 1.8.0.66 (x64) and Oracle Sun LDAP Directory

When I research a group in the AdminCenter or with the widget to add permission, I get the following error in the logs:

type an image title

[Stacktrace java]

2016-01-06 09:30:01,049 WARN  [http-bio-10.202.226.135-8080-exec-5] [org.nuxeo.ecm.platform.usermanager.providers.AbstractGroupsPageProvider] java.lang.String cannot be cast to java.util.List
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
        at org.nuxeo.ecm.core.api.model.impl.ListProperty.init(ListProperty.java:205)
        at org.nuxeo.ecm.core.api.model.impl.ComplexProperty.init(ComplexProperty.java:191)
        at org.nuxeo.ecm.core.api.impl.DataModelImpl.<init>(DataModelImpl.java:69)
        at org.nuxeo.ecm.directory.BaseSession.createEntryModel(BaseSession.java:178)
        at org.nuxeo.ecm.directory.BaseSession.createEntryModel(BaseSession.java:194)
        at org.nuxeo.ecm.directory.ldap.LDAPSession.fieldMapToDocumentModel(LDAPSession.java:741)
        at org.nuxeo.ecm.directory.ldap.LDAPSession.ldapResultToDocumentModel(LDAPSession.java:1028)
        at org.nuxeo.ecm.directory.ldap.LDAPSession.ldapResultsToDocumentModels(LDAPSession.java:904)
        at org.nuxeo.ecm.directory.ldap.LDAPSession.query(LDAPSession.java:639)
        at org.nuxeo.ecm.directory.ldap.LDAPSession.query(LDAPSession.java:683)
        at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.searchGroups(UserManagerImpl.java:1240)
        at org.nuxeo.ecm.platform.computedgroups.UserManagerWithComputedGroups.searchGroups(UserManagerWithComputedGroups.java:163)
        at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.searchGroups(UserManagerImpl.java:1375)
        at org.nuxeo.ecm.platform.usermanager.UserManagerImpl.searchGroups(UserManagerImpl.java:742)
        at org.nuxeo.ecm.platform.usermanager.providers.AbstractGroupsPageProvider.searchGroups(AbstractGroupsPageProvider.java:123)
        at org.nuxeo.ecm.platform.usermanager.providers.AbstractGroupsPageProvider.computeCurrentPage(AbstractGroupsPageProvider.java:77)
        at org.nuxeo.ecm.platform.usermanager.providers.GroupsPageProvider.getCurrentPage(GroupsPageProvider.java:34)
        at org.nuxeo.ecm.platform.query.api.AbstractPageProvider.getCurrentSelectPage(AbstractPageProvider.java:680)
        at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:99)
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
        at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
        at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
        at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
        at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:40)
    ....

When using a JDK 1.7.0.55 (x64), I do not have the error…

Thanks Pierre

0 votes

0 answers

1129 views

ANSWER

Hi, I'm very surprise that just a JDK change would provide different behavior. Without your LDAP server it would be difficult to reproduce and diagnose, it seems that a field in an LDAP entry is specified as a list but returns a simple string. Do you have ways to debug and put breakpoints in the offending code to find out the shape of the affected entry?
01/28/2016