pinpoint-apm/pinpoint · error · OracleConnectionStringException

parse error. token is null. Expected token='LITERAL'

Error message

parse error. token is null. Expected token='LITERAL'

What it means

Parser guard in getLiteralToken: the token stream ran out (nextToken returned null) while the parser expected a literal value token for a descriptor key. Fires when the Oracle connection descriptor ends right after '=' with no value supplied.

Solutions

  1. Provide a value after every '=' in the descriptor, e.g. (PORT=1521) not (PORT=)
  2. Check for truncated connection strings
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:216 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/8ad515f88c3df138. 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:216

            throw new OracleConnectionStringException("Syntax error. Expected token='=' :" + token.getToken());
        }
    }

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

    public Token getLiteralToken() {
        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())) {

View on GitHub (pinned to 744c3d3075)