{{theTime}}

Search This Blog

Total Pageviews

Method to build Document using xml file.

import javax.xml.parsers ;

private Document buildXmlDocument(File file) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
DocumentBuilder builder = null ;
try {
builder = factory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
e.printStackTrace();
}
Document doc = null;
try {
doc = builder.parse(file);
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return doc ;
}

No comments:

Mysql - java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed

Add allowPublicKeyRetrieval=true to the JDBC URL. jdbc:mysql://localhost:3306/db?allowPublicKeyRetrieval=true&useSSL=false