public DataObject create(Class interfaceClass) {
    if (interfaceClass == null) {
      throw new IllegalArgumentException(
          SDOException.cannotPerformOperationWithNullInputParameter("create", "interfaceClass"));
    }
    Type type = getHelperContext().getTypeHelper().getType(interfaceClass);
    if (type != null) {
      return create(type);
    }

    // at this point the type may not have been defined or there could be a classloader issue
    SDOXMLHelper xmlHelper = (SDOXMLHelper) getHelperContext().getXMLHelper();
    ClassLoader contextLoader = xmlHelper.getLoader();
    ClassLoader interfaceLoader = interfaceClass.getClassLoader();
    boolean loadersAreRelated = false;

    // check the hierarchy to see if the interface loader is a parent of the context loader
    List<ClassLoader> visitedLoaders = new ArrayList<ClassLoader>();
    while (contextLoader != null && !loadersAreRelated) {
      if (visitedLoaders.contains(contextLoader)) {
        // if we encounter a loader we've already checked, break out
        break;
      }
      visitedLoaders.add(contextLoader);
      if (contextLoader == interfaceLoader) {
        loadersAreRelated = true;
      }
      ClassLoader parentLoader = contextLoader.getParent();
      if (contextLoader == parentLoader) {
        break;
      }
      contextLoader = parentLoader;
    }

    throw new IllegalArgumentException(
        SDOException.typeNotFoundForInterface(interfaceClass.getName(), loadersAreRelated));
  }