frohoff/ysoserial · error · Exception

Failed to get object id, separator

Error message

Failed to get object id, separator

What it means

After locating 'objID:[', parseObjIdAndExploit searches for the ", " separator between the UID and object number inside the message. If indexOf(", ") after the start marker returns -1, it throws Exception("Failed to get object id, separator").

Solutions

  1. Log e.getMessage() and confirm the exact ObjID rendering on the target's Java version
  2. Update the parser markers to match the actual format
  3. Regenerate/parse the objID client-side instead of scraping exception text if the format keeps drifting
  4. Pin the exploit host JDK version known to match the parser's expected format
Defensive patterns

Strategy: try-catch

Validate before calling

String msg = e.getMessage();
int start = msg.indexOf("objID:[");
if (start >= 0 && msg.indexOf(", ", start + 1) < 0) {
    System.err.println("unexpected objID format on this JDK: " + msg);
}

Try / catch

try {
    parseObjIdAndExploit(args, payloadClass, jrmpPort, isa, e);
} catch (Exception ex) {
    if (ex.getMessage().contains("separator")) {
        // print raw message and adapt parser markers to target JDK format
    }
}

Prevention

When it happens

Trigger: The exception message contains 'objID:[' but no ', ' following it — the ObjID.toString() rendering differs from 'objID:[<uid>, <num>]' expected by the parser, e.g. a different Java version's UID format.

Common situations: Running against a JDK whose UID/ObjID toString output changed format; a message truncated after 'objID:['; localization or subclassed exception altering the text.

Related errors


AI-assisted analysis of frohoff/ysoserial@218bcffcaa (2026-09-12). Data as JSON: /api/errors/4a564a1205bbc72c. Report an issue: GitHub.

Appendix: source

Thrown at src/main/java/ysoserial/exploit/JenkinsListener.java:139

        return reqCons
                .newInstance(oid, JarLoader.class.getMethod("isPresentOnRemote", Class.forName("hudson.remoting.Checksum")), new Object[] {
                    uro,
        });
    }


    private static void parseObjIdAndExploit ( final String[] args, final Class<? extends ObjectPayload> payloadClass, int jrmpPort,
            InetSocketAddress isa, Exception e ) throws Exception, IOException {
        String msg = e.getMessage();
        int start = msg.indexOf("objID:[");
        if ( start < 0 ) {
            throw new Exception("Failed to get object id");
        }

        int sep = msg.indexOf(", ", start + 1);

        if ( sep < 0 ) {
            throw new Exception("Failed to get object id, separator");
        }

        int end = msg.indexOf("]", sep + 1);

        if ( end < 0 ) {
            throw new Exception("Failed to get object id, separator");
        }

        String uid = msg.substring(start + 7, sep);
        String objNum = msg.substring(sep + 2, end);

        System.err.println("* UID is " + uid);
        System.err.println("* ObjNum is " + objNum);

        String[] parts = uid.split(":");

        long obj = Long.parseLong(objNum);
        int o1 = Integer.parseInt(parts[ 0 ], 16);

View on GitHub (pinned to 218bcffcaa)