jenkinsci/jenkins · error · IllegalArgumentException

No view named %s inside view %s

Error message

No view named %s inside view %s

What it means

IllegalArgumentException from ViewOptionHandler when parsing a slash-separated view path and ViewGroup.getView(viewName) returns null for some segment. View.READ is checked on the group before throwing, so a missing-view and a no-read-permission case can look alike.

Source

Thrown at core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java:105

     * @throws AccessDeniedException
     *      If user doesn't have a READ permission for the view
     * @since 1.618
     */
    @CheckForNull
    public View getView(final String name) {

        ViewGroup group = Jenkins.get();
        View view = null;

        final StringTokenizer tok = new StringTokenizer(name, "/");
        while (tok.hasMoreTokens()) {

            String viewName = tok.nextToken();

            view = group.getView(viewName);
            if (view == null) {
                group.checkPermission(View.READ);
                throw new IllegalArgumentException(String.format(
                        "No view named %s inside view %s",
                        viewName, group.getDisplayName()
                ));
            }
            view.checkPermission(View.READ);
            if (view instanceof ViewGroup) {
                group = (ViewGroup) view;
            } else if (tok.hasMoreTokens()) {
                throw new IllegalStateException(view.getViewName() + " view can not contain views");
            }
        }

        return view;
    }

    @Override
    public String getDefaultMetaVariable() {

View on GitHub (pinned to 2e228ff40b)

Solutions

  1. List views under the group and copy the exact name.
  2. Verify each path segment exists and is traversable.
  3. Run as a user with View.READ on the group.
Defensive patterns

Strategy: validation

Validate before calling

View v = group.getView(viewName);
if (v == null) {
    group.checkPermission(View.READ);
    throw new IllegalArgumentException("No view '" + viewName + "' in " + group.getDisplayName());
}

Try / catch

catch (IllegalArgumentException e) { /* view segment missing */ }

Prevention

When it happens

Trigger: A CLI command taking a view option (`-v a/b`) where segment `a` or `b` does not exist in its parent ViewGroup.

Common situations: Typo in a view name; wrong nesting path; view deleted; insufficient READ permission on the containing group.

Related errors


AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14). Data as JSON: /api/errors/14245438a0e09ef3. Report an issue: GitHub.