Posted by in Java TutorialsApr 16th, 2010 | No Comments
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>...
Posted by in Java TutorialsApr 17th, 2009 | No Comments
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...
Posted by in Java Tutorials, TutorialsApr 16th, 2009 | No Comments
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...
Posted by in Java Tutorials, TutorialsApr 16th, 2009 | No Comments
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...
Posted by in Web Forms using XMLApr 14th, 2009 | No Comments
A simple library to convert your HttpRequest to XML and XML to HashMap and use in JSP. XMLWebForms v1.0 is released now.
Posted by in NewsApr 12th, 2009 | No Comments
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.
Posted by in Data Service in JavaApr 11th, 2009 | No Comments
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
Posted by in Spring-Hibernate-Maven PluginApr 10th, 2009 | No Comments
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)
Posted by in TipsApr 7th, 2009 | No Comments
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...