private URL createURL(File file, Path tempDir) {
    URI uri;
    if (isJar(file.getName())) {
      uri = file.toURI();
    } else {
      uri = tempDir.toUri();
    }
    try {
      return uri.toURL();
    } catch (MalformedURLException e) {
      throw new JdbcConnectorException(
          "Could not convert \"" + uri + "\" to a URL, because: " + e);
    }
  }
Generates and returns a PdxType for the given class.
The generated PdxType is also stored in the TypeRegistry.

@param cache used to generate pdx type
@param clazz the class to generate a PdxType for
@return the generated PdxType
@throws JdbcConnectorException if a PdxType can not be generated
geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingPreconditionCheckFunction.java