Here is an extract of the code:
-----------------------------------
// init LocalServiceProvider
..
Hashtable environment = new Hashtable();
environment.put(LocalServiceProvider.PROVIDER_URL, providerUrl);
vmmService = new LocalServiceProvider(environment);
..
AuthData authData = startSecureBlock();
try {
// create search data object
DataObject root = SDOHelper.createRootDataObject();
DataObject searchCtrl = SDOHelper.createControlDataObject(root, null, SchemaConstants.DO_SEARCH_CONTROL);
searchCtrl.getList(SchemaConstants.PROP_SEARCH_BASES).add(suffixe);
searchCtrl.setString(SchemaConstants.PROP_SEARCH_EXPRESSION, filter);
// call the servicee
root = vmmService.search(root);
...
} finally {
endSecureBlock(authData);
}
-------------------------------------
Executing this code in an extrenal java process work fine but I have the following error when I executed it in portal java process:
Caused by: com.ibm.websphere.wim.exception.WIMException
at com.ibm.ws.wim.tx.JTAHelper.handleException(JTAHelper.java:235)
at com.ibm.websphere.wim.ServiceProvider.search(ServiceProvider.java:451)
at com.ibm.websphere.wim.ejb.WIMServiceBean.search(WIMServiceBean.java:223)
at com.ibm.websphere.wim.ejb.EJSRemoteStatelessWIMService_a12c79ef.search(Unknown Source)
at com.ibm.websphere.wim.ejb._WIMService_Stub.search(_WIMService_Stub.java:712)
at com.ibm.websphere.wim.client.LocalServiceProvider.search(LocalServiceProvider.java:393)
at com.triloggroup.directory.VMMDriver.searchWithVmmConstraints(VMMDriver.java:1865)
.....
*bold*Caused by: java.lang.ClassCastException: The feature 'root's type 'RootType' does not permit a value of type 'RootType'*bold*
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2848)
at org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
at org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
at org.eclipse.emf.ecore.util.BasicFeatureMap.set(BasicFeatureMap.java:1051)
at org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureValue.set(FeatureMapUtil.java:1150)
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator.dynamicSet(EStructuralFeatureImpl.java:1406)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
at org.eclipse.emf.ecore.sdo.util.SDOUtil.set(SDOUtil.java:630)
at org.eclipse.emf.ecore.sdo.util.SDOUtil.set(SDOUtil.java:212)
at org.eclipse.emf.ecore.sdo.util.SDOUtil.setDataObject(SDOUtil.java:280)
at org.eclipse.emf.ecore.sdo.impl.DynamicEDataObjectImpl.setDataObject(DynamicEDataObjectImpl.java:485)
at com.ibm.websphere.wim.util.SDOHelper.cloneRootDataObject(SDOHelper.java:352)
at com.ibm.websphere.wim.util.SDOHelper.deepCloneRootDataObject(SDOHelper.java:393)
at com.ibm.ws.wim.util.DataGraphHelper.deepCloneRootDataObject(DataGraphHelper.java:129)
at com.ibm.ws.wim.ProfileManager.getDeepDataGraphClone(ProfileManager.java:226)
at com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:255)
at com.ibm.ws.wim.ProfileManager.search(ProfileManager.java:362)
at com.ibm.websphere.wim.ServiceProvider.search(ServiceProvider.java:447)
... 208 more
I called this code from a java portlet. The war of this portlet doesn't content any emf libraries.
Does any one was able to call VMM search API with external LDAP integration?
Does any one as any syggestion about this strange error "The feature 'root's type 'RootType' does not permit a value of type 'RootType'"?
Thanks
-FF
The postings on this site are my own and do not necessarily represent the positions, strategies or opinions of IBM.