Parsing XML to Map

package com.open.jacekkowalczyk; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.log4j.Logger; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /**  * Xml2Map!  */ public class Xml2Map {     private static Logger LOGGER = Logger.getLogger(Xml2Map.class);     public List<Map<String, String>> getListOfLevel1MapElelements(final File … Continue reading Parsing XML to Map

creating issues in bugzilla from java

final HttpClient httpClient = new HttpClient(); final XmlRpcClient rpcClient = new XmlRpcClient(); final XmlRpcCommonsTransportFactory factory = new XmlRpcCommonsTransportFactory(rpcClient); final XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); factory.setHttpClient(httpClient); rpcClient.setTransportFactory(factory); config.setServerURL(new URL("http://192.168.12.13/xmlrpc.cgi")); rpcClient.setConfig(config); // map of the login data final Map<String, String> loginMap = new HashMap<String, String>(); loginMap.put("login", userName); loginMap.put("password", password); loginMap.put("rememberlogin", "Bugzilla_remember"); // login to bugzilla final Object … Continue reading creating issues in bugzilla from java

Running liquibase from command line

Create liquibase.properties file next to the changeLogFile (which by default is named install.xml) promptOnNonLocalDatabase false url jdbc:postgresql://hostname/db_name username my_user password my_pass driver org.postgresql.Driver defaultSchemaName localizer Execute commands: $ cd my_project/src/main/resources $ ~/liquibase-3.0.0-bin/liquibase --driver=org.postgresql.Driver --classpath=/path/to/postgresql-9.0-801.jdbc4.jar --changeLogFile=install.xml --defaultsFile=liquibase.properties --logLevel=debug --logFile=/tmp/localizer-liquibase.log update -DschemaName=my_schema Liquibase Home is not set. Liquibase Home: /my/userhomedir/liquibase-3.0.0-bin Liquibase update Failed: Validation Failed: 8 change … Continue reading Running liquibase from command line