To reproduce, put the following in a wiki page:
{{groovy}} import org.xwiki.model.reference.* import org.xwiki.component.util.* import org.xwiki.model.* def type = new DefaultParameterizedType(null, EntityReferenceResolver.class, String.class) def resolver = services.component.getInstance(type, "resource/standardURL") resolver.resolve("https://xwiki.com/xwiki", EntityType.DOCUMENT) {{/groovy}}