pinpoint-apm/pinpoint · error · OracleConnectionStringException
invalid oracle jdbc url:<driverUrl>
Error message
invalid oracle jdbc url:<driverUrl>
What it means
nextPosition() locates where the descriptor begins by checking that the URL starts with the thin-driver prefix 'jdbc:oracle:thin:' followed by either ':@' or '@'. If the URL does not contain the '@' marker at the expected position, the parser throws 'invalid oracle jdbc url:<driverUrl>'. It is an upfront format check, so a malformed URL fails immediately before tokenization.
Source
Thrown at agent-module/plugins/oracle-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/oracle/parser/OracleNetConnectionDescriptorParser.java:87
throw new OracleConnectionStringException("parsing error. expected token:'EOF' token:null");
}
if (eof != OracleNetConnectionDescriptorTokenizer.TOKEN_EOF_OBJECT) {
throw new OracleConnectionStringException("parsing error. expected token:'EOF' token:" + eof);
}
}
public DriverType getDriverType() {
return driverType;
}
private int nextPosition(String driverUrl) {
final int thinLength = driverUrl.length();
if (normalizedUrl.startsWith(":@", thinLength)) {
return thinLength + 2;
} else if(normalizedUrl.startsWith("@", thinLength)) {
return thinLength + 1;
} else {
throw new OracleConnectionStringException("invalid oracle jdbc url:" + driverUrl);
}
}
private KeyValue parseKeyValue() {
// start
this.tokenizer.checkStartToken();
// key
Token literalToken = this.tokenizer.getLiteralToken();
KeyValue.Builder keyValue = new KeyValue.Builder(literalToken.getToken());
// =
this.tokenizer.checkEqualToken();
// value compare reduce
boolean nonTerminalValue = false;View on GitHub (pinned to 744c3d3075)
Solutions
- Ensure the URL matches jdbc:oracle:thin:@... exactly — restore the missing '@' (and ':' if using the :@ form)
- If the URL is a plain host:port:SID form, write it as jdbc:oracle:thin:@host:1521:SID (note the '@')
- Confirm the URL is intended for the thin driver; oci URLs may need a different plugin/parser
- Validate the JDBC URL format (regex ^jdbc:oracle:thin:(:@)?@?.*) in config validation before startup
Example fix
// before String url = "jdbc:oracle:thin:dbhost:1521:ORCL"; // missing '@' // after String url = "jdbc:oracle:thin:@dbhost:1521:ORCL";
Defensive patterns
Strategy: validation
Validate before calling
static final Pattern THIN_URL = Pattern.compile("^jdbc:oracle:thin:(:@)?.+");
boolean isValidThinUrl(String url) {
return url != null && THIN_URL.matcher(url).matches();
} Try / catch
try {
parser.parse(url);
} catch (OracleConnectionStringException e) {
log.error("Oracle JDBC URL missing '@' or malformed: {}", url, e);
throw new ConfigurationException("jdbc url must match jdbc:oracle:thin:@...", e);
} Prevention
- Always include '@' after the jdbc:oracle:thin: prefix
- Use the exact prefix jdbc:oracle:thin: when this parser is in play
- Add URL format validation at startup before any connection attempt
When it happens
Trigger: Calling OracleNetConnectionDescriptorParser.parse(url) with a URL whose portion after 'jdbc:oracle:thin:' does not begin with '@' or ':@' — e.g. 'jdbc:oracle:thin:host:1521:SID' or 'jdbc:oracle:oci8:@...' reaching this parser.
Common situations: Typo omitting the '@' in the JDBC URL; using the wrong driver-type prefix (oci vs thin); a properties/template variable left empty so the '@' section is missing; concatenating the prefix with the descriptor without '@'.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- description node not found
- description_list node not found
- invalid oracle jdbc url. expected token:(thin or oci) url:<u
- parsing error. expected token:'EOF' token:null
- parsing error. expected token:'EOF' token:<eof>
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/67cbaa6d8bddae07.
Report an issue: GitHub.