Resolved Solution for “telnet could not open connection to the host on port 3306″

Check the following: Step 1. Make sure mysql is up and running Windows – Check in task manager for mysqld-nt Linux based (Ubuntu, debian etc.,) – service mysql status or ps -elf | grep mysql Step 2. Make sure the port is in LISTEN mode Windows – netstat -a | find LISTEN Linux – netstat -a | grep LISTEN or netstat -a | grep mysql Step 3. Make sure your firewall is not blocking Windows – Somewhere in network connections – OH ! you can goole and find where to set windows firewall rules Linux (ubunti) – ufw allow 3306 Step 4. Telnet – telnet <ip>...
read more

Setting up JackRabbit with Database

There are not many resources on the net that shows how to setup up JackRabbit with database. At least I couldn’t find it. There are many reasons you would want to choose to implement the storage in database rather than file system. Well I’m not going to talk about that here. You read an interesting discussion on TheServerSide. I’m listing here the bare minium Java Code and the Repository Configuration XML required. The sample code creates root node and the few child nodes. The sample code also shows how to setup property and attachments at different nodes. Few Notes RegistryHelper.registerRepository...
read more

Delete more than one table

String query = "show tables like 'a%'"; String tables = null; try { Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(query);   while (rs.next()) { String tableName= rs.getString(1); if (tables == null) tables = tableName; else tables += "," + tableName; } st.close();   st = conn.createStatement(); st.executeUpdate("drop table " + tables); st.close(); } catch (SQLException e) { System.out.println("Unable to execute...
read more

Connect to database

try { String url = "jdbc:mysql://localhost:3306/mydb"; Class.forName ("com.mysql.jdbc.Driver").newInstance (); Connection conn = DriverManager.getConnection (url, user, pwd); } catch (Exception e){ System.out.println("Unable to establish connection " + e.getMessage()); } MySQL: URL : jdbc:mysql://myserver:port/mydb DriverName – com.mysql.jdbc.Driver Library Jar Download – http://dev.mysql.com/downloads/connector/j/5.1.html Oracle: URL : jdbc:oracle:thin:@myserver:1521:myinstance DriverName...
read more

Web Forms with XML

A simple library to convert your HttpRequest to XML and XML to HashMap and use in JSP. XMLWebForms v1.0 is released now.
read more

Site update in progress

I’m currently in progress of updating the website.  I will update the site as I find time.  Please subscribe here to learn more about the site updates.
read more

First Release – DataService in Java

I’m release the frist version of Java Data Service. It provides data in XML to the presentation layer. You can configure the data source in XML and connect to more than one source. Features in v 0.1 beta Define Data sources – for now its only RSS, ATOM feeds Read data using Data service Define data collaboration plug-in Features under development Define Database data source, JNDI for database Updatable data service
read more

First Release – Spring-Hibernate Plug-in

Spring-Hibernate Eclipse plug-in Version 1.0 is available now. Features in this release 1.Spring, Hibernate configuration files 2. Maven POM Limitations 1. No option input package name 2. No option to include security (j2ee)
read more

WebServer setup at Home (Modem, Wireless router)

Last time when I want to set home network, I spent 3-4 days to figure out how to do it. I referred to dslwebserver. It is a very good source. However I couldnt manage to setup successfully. So here is how I did my setup. My Requirement : Simple, Iwant to run webserver in my home. My Hardware : I have ADSL2+ modem, a wireless router and couple of laptops and computers. My Network :  Phone line —> Modem –> Wireless router –> PC’c Home Webserver setup How to configure : Turn DHCP off in Modem (My Modem IP address – 10.1.1.1) Configure WAN Setting in...
read more