pinpoint-apm/pinpoint · error · OracleConnectionStringException

Syntax error. Expected token='LITERAL

Error message

Syntax error. Expected token='LITERAL' :<token>

What it means

Parser guard in getLiteralToken(String expectedValue): the token's type was literal but its text did not equal the expected literal keyword required at this position of the Oracle descriptor grammar, so parsing aborts as a syntax mismatch.

Solutions

  1. Use the exact keyword the descriptor grammar expects at that position (case/format sensitive)
  2. Compare the failing token text in the message with the expected value and correct the URL
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at agent-module/plugins/oracle-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/oracle/parser/OracleNetConnectionDescriptorTokenizer.java:232 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/6af1111c2dbbb90a. Report an issue: GitHub.

Appendix: source

Thrown at agent-module/plugins/oracle-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/oracle/parser/OracleNetConnectionDescriptorTokenizer.java:232

        Token token = this.nextToken();
        if (token == null) {
            throw new OracleConnectionStringException("parse error. token is null. Expected token='LITERAL'");
        }
        // We can check by == because the token object is singleton.
        if (!(token.getType() == TYPE_LITERAL)) {
            throw new OracleConnectionStringException("Syntax error. Expected token='LITERAL'' :" + token.getToken());
        }
        return token;
    }

    public Token getLiteralToken(String expectedValue) {
        Token token = this.nextToken();
        if (token == null) {
            throw new OracleConnectionStringException("parse error. token is null. Expected token='LITERAL'");
        }
        // We can check by == because the token object is singleton.
        if (!(token.getType() == TYPE_LITERAL)) {
            throw new OracleConnectionStringException("Syntax error. Expected token='LITERAL' :" + token.getToken());
        }
        if (!expectedValue.equals(token.getToken())) {
            throw new OracleConnectionStringException("Syntax error. Expected token=" + expectedValue + "' :" + token.getToken());
        }
        return token;
    }
}

View on GitHub (pinned to 744c3d3075)