pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: eitch (@eitch) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3221: Performance degradation of XML operations under Java 21 with custom parsers/transformers
Date: Tue, 29 Jul 2025 13:23:10 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
I'm running into a similar issue, as it seems a client has issues with their infrastructure where these frequent reloads leads to slow transactions. I've now tried to add a customer factory but i am running into a bug where it says my implementation is not implementing the interface. This is my class:
```java
import org.postgresql.xml.EmptyStringEntityResolver;
import org.postgresql.xml.NullErrorHandler;
import org.postgresql.xml.PGXmlFactoryFactory;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXTransformerFactory;
public class CachingPGXmlFactoryFactory implements PGXmlFactoryFactory {
@Override
public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException {
return this.documentBuilder;
}
@Override
public TransformerFactory newTransformerFactory() {
return this.transformerFactory;
}
@Override
public SAXTransformerFactory newSAXTransformerFactory() {
return this.saxTransformerFactory;
}
@Override
public XMLInputFactory newXMLInputFactory() {
return this.xmlInputFactory;
}
@Override
public XMLOutputFactory newXMLOutputFactory() {
return this.xmlOutputFactory;
}
@Override
public XMLReader createXMLReader() throws SAXException {
return this.xmlReader;
}
}
```
and i get the following exception when using the class:
```
Connection property xmlFactoryFactory must implement PGXmlFactoryFactory: li.strolch.persistence.postgresql.CachingPGXmlFactoryFactory
```
view thread (6+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #3221: Performance degradation of XML operations under Java 21 with custom parsers/transformers
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox