{"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":"error","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/244cde92a7df7f9b8b8b7a4075c35a12977e303e/bindings/java/src/main/java/tech/turso/jdbc4/JDBC4Connection.java#L266-L302","documentation":"Connection.createSQLXML() throws SQLFeatureNotSupportedException at JDBC4Connection.java:284. SQLXML objects hold XML-typed column values in databases with a native XML type; SQLite has no XML column type, so the driver provides no way to create these values. Store XML as TEXT strings and parse in the application.","triggerScenarios":"conn.createSQLXML() followed by sqlxml.setString(...) and setSQLXML(...); Hibernate/JPA with java.sql.SQLXML-typed attributes or hibernate @JdbcTypeCode(SqlTypes.XML); frameworks serializing objects to XML columns; database tools that probe XML support.","commonSituations":"Migrations from SQL Server (xml column type) or PostgreSQL (xml type) where JDBC uses SQLXML; JPA entities mapping XML documents; generic persistence layers that support 'any' JDBC type; conformance/introspection suites scanning connection capabilities.","solutions":["Store XML as TEXT and bind with setString; parse with your XML library after reading.","Change java.sql.SQLXML entity attributes to String.","Disable any ORM XML-column mapping strategy that binds via SQLXML.","Catch SQLFeatureNotSupportedException in capability-probing code and record XML as unsupported."],"exampleFix":"// before\nSQLXML xml = conn.createSQLXML(); // throws\nxml.setString(docXml);\nps.setSQLXML(1, xml);\n\n// after\nps.setString(1, docXml); // column type TEXT","handlingStrategy":"try-catch","validationCode":"// store XML as TEXT; parse in the application\n// ps.setString(index, xmlString) is the supported path","typeGuard":null,"tryCatchPattern":"try {\n    SQLXML xml = conn.createSQLXML();\n} catch (SQLFeatureNotSupportedException e) {\n    // XML type unsupported: bind as TEXT with setString\n}","preventionTips":["Avoid java.sql.SQLXML-typed entity attributes.","Serialize XML to String before persisting.","Record XML support as absent during capability probing.","Do not migrate native XML column types without a TEXT mapping plan."],"tags":["java","jdbc","turso","xml","sqlxml"],"backgroundTag":"jdbc-sqlxml-unsupported","analyzedSha":"244cde92a7df7f9b8b8b7a4075c35a12977e303e","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}