{"record":{"id":"d1d455186f5d15bf","repo":"pinpoint-apm/pinpoint","slug":"invalid-oracle-jdbc-url-expected-token-thin-or-o","errorCode":null,"errorMessage":"invalid oracle jdbc url. expected token:(thin or oci) url:<url>","messagePattern":"invalid oracle jdbc url\\. expected token:\\(thin or oci\\) url:<url>","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agent-module/plugins/oracle-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/oracle/parser/OracleNetConnectionDescriptorParser.java","lineNumber":52,"sourceCode":"    public OracleNetConnectionDescriptorParser(String url) {\n        this.url = url;\n        this.normalizedUrl = url.toLowerCase();\n        this.tokenizer = new OracleNetConnectionDescriptorTokenizer(normalizedUrl);\n    }\n\n    public KeyValue<?> parse() {\n        // You can find driver spec here: http://docs.oracle.com/cd/B14117_01/java.101/b10979/urls.htm\n        // It's for 10g but maybe 11g would be same.\n        \n        int position;\n        if (normalizedUrl.startsWith(THIN)) {\n            position = nextPosition(THIN);\n            driverType = DriverType.THIN;\n        } else if(normalizedUrl.startsWith(OCI)) {\n            position = nextPosition(OCI);\n            driverType = DriverType.OCI;\n        } else {\n            throw new IllegalArgumentException(\"invalid oracle jdbc url. expected token:(\" + THIN + \" or \" + OCI + \") url:\" + url);\n        }\n\n        // skip thin string\n        this.tokenizer.setPosition(position);\n\n        this.tokenizer.parse();\n        KeyValue<?> keyValue = parseKeyValue();\n\n        checkEof();\n\n        return keyValue;\n    }\n\n    private void checkEof() {\n        Token eof = this.tokenizer.nextToken();\n        if (eof == null) {\n            throw new OracleConnectionStringException(\"parsing error. expected token:'EOF' token:null\");\n        }","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/plugins/oracle-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/oracle/parser/OracleNetConnectionDescriptorParser.java#L34-L70","documentation":"OracleNetConnectionDescriptorParser.parse(url) expects the normalized JDBC URL to start with a driver-type token: 'thin' or 'oci'. If it starts with neither, it throws IllegalArgumentException('invalid oracle jdbc url. expected token:(thin or oci) url:...').","triggerScenarios":"Calling parse() with a JDBC URL whose prefix (after normalization) is not 'thin' or 'oci' — e.g. unknown driver types, already-stripped URLs, or non-descriptor URLs like jdbc:oracle:drizzle:@....","commonSituations":"Using an unsupported Oracle driver type in the URL; passing a raw host[:port][/service] URL to the descriptor parser instead of a @(...)/@(DESCRIPTION...) form; older/newer Oracle URL syntax variants.","solutions":["Use jdbc:oracle:thin:@... or jdbc:oracle:oci:@... URL syntax","Check that the driver type segment wasn't accidentally stripped before parsing","Verify the URL matches the forms the parser supports (@host:port:sid, @(DESCRIPTION=...), etc.)","Log/inspect the exact url value in the exception to see what was actually passed"],"exampleFix":"// before\njdbc:oracle:kprbz:@(DESCRIPTION=...)\n// after\njdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=h)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))","handlingStrategy":"validation","validationCode":"String norm = url.toLowerCase();\nif (!(norm.contains(\":thin:\") || norm.contains(\":oci:\") || norm.startsWith(\"thin\") || norm.startsWith(\"oci\"))) {\n    throw new IllegalArgumentException(\"unsupported oracle url: \" + url);\n}","typeGuard":"static boolean hasSupportedDriverType(String u) {\n    String n = u == null ? \"\" : u.toLowerCase();\n    return n.contains(\"thin\") || n.contains(\"oci\");\n}","tryCatchPattern":"try {\n    OracleNetConnectionDescriptorParser.parse(url);\n} catch (IllegalArgumentException e) {\n    // url lacks thin/oci token — reject or normalize the URL\n}","preventionTips":["Standardize on jdbc:oracle:thin:@... URLs","Do not pre-strip the driver-type segment before parsing","Reject non-thin/oci driver types at connection-string intake"],"tags":["jdbc","oracle","url-parsing","driver"],"backgroundTag":"invalid-url-format","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}