{"record":{"id":"20b5e16c5da57854","repo":"tursodatabase/turso","slug":"createsqlxml-not-supported","errorCode":null,"errorMessage":"createSQLXML not supported","messagePattern":"createSQLXML not supported","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"warning","filePath":"bindings/java/src/main/java/tech/turso/jdbc4/JDBC4Connection.java","lineNumber":284,"sourceCode":"  @Override\n  public Clob createClob() throws SQLException {\n    throw new SQLFeatureNotSupportedException(\"createClob not supported\");\n  }\n\n  @Override\n  public Blob createBlob() throws SQLException {\n    throw new SQLFeatureNotSupportedException(\"createBlob not supported\");\n  }\n\n  @Override\n  public NClob createNClob() throws SQLException {\n    throw new SQLFeatureNotSupportedException(\"createNClob not supported\");\n  }\n\n  @Override\n  @SkipNullableCheck\n  public SQLXML createSQLXML() throws SQLException {\n    throw new SQLFeatureNotSupportedException(\"createSQLXML not supported\");\n  }\n\n  @Override\n  public boolean isValid(int timeout) throws SQLException {\n    if (isClosed()) {\n      return false;\n    }\n\n    try (Statement statement = createStatement()) {\n      return statement.execute(\"select 1;\");\n    }\n  }\n\n  @Override\n  public void setClientInfo(String name, String value) throws SQLClientInfoException {\n    // TODO\n  }\n","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/tursodatabase/turso/blob/bad083fafbefdeae9a42ec19bdaaad8918dcf411/bindings/java/src/main/java/tech/turso/jdbc4/JDBC4Connection.java#L266-L302","documentation":"Connection.createSQLXML() unconditionally throws SQLFeatureNotSupportedException. The driver does not implement the SQLXML interface; there is no XML datatype at the engine level, and XML documents are simply stored as TEXT strings.","triggerScenarios":"Direct conn.createSQLXML() calls; code ported from SQL Server/DB2/PostgreSQL where XML columns map to SQLXML objects; ORM mapping XML attributes via SQLXML; frameworks serializing objects to XML before storage.","commonSituations":"Migrating applications with SQL XML columns; Hibernate/XML-mapping utilities; code that round-trips documents via setSQLXML/getSQLXML.","solutions":["Serialize the XML to a String and store it in a TEXT column with setString.","Parse it back with a Java XML parser after getString; the engine never interprets the content.","Remove SQLXML-typed fields from entity mappings when targeting this driver.","If XML querying (XPath etc.) is needed, do it in application code after fetching the text."],"exampleFix":"// before\nSQLXML xml = conn.createSQLXML(); // throws\nxml.setString(docXml);\nps.setSQLXML(2, xml);\n\n// after\nps.setString(2, docXml); // store XML as TEXT; parse in app code","handlingStrategy":"fallback","validationCode":"// store XML as TEXT; the engine has no XML type\nps.setString(parameterIndex, xmlString);","typeGuard":null,"tryCatchPattern":"try {\n    SQLXML xml = conn.createSQLXML();\n    xml.setString(docXml);\n    ps.setSQLXML(i, xml);\n} catch (SQLFeatureNotSupportedException e) {\n    ps.setString(i, docXml); // fallback: serialize XML to string\n}","preventionTips":["Serialize XML with a standard library (JAXB, Jackson XML) and store the string.","Drop SQLXML-typed mappings when migrating XML columns to this driver.","Do XML parsing/validation in application code after reading the TEXT value.","Keep serialization at the repository boundary so drivers without XML types stay swappable."],"tags":["java","jdbc","sqlxml","xml","lob","unsupported-feature"],"backgroundTag":"lob-not-supported","analyzedSha":"bad083fafbefdeae9a42ec19bdaaad8918dcf411","analyzedAt":"2026-08-16T23:12:11.798Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}