Posts

Logo design for Ryer Corporate Solutions

After nearly a gap of 4 years, upon the request of a friend, who plans to launch an IT startup based in Australia, I got down to designing a LOGO for him and unleashing my creativity. Please see here .

Checking out the blogeditor built by GWT

Try it here .

Facebook JAVA API

A Facebook API client implemented in Java, originally derived from the official Facebook client. Check it out here .

MySQL cries Time Out !!!

Problem: MySQL after being idle for some time like 180 seconds, experiences " Time Out" - Communications Link Failure, closes the connection and shuts itself off- No Entry !! 12:56:20,561 ERROR SchemaUpdate:188 - could not complete schema update com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket. (Socket.java:372) at java.net.Socket. (Socket.java:215) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253) at com.mysql.jdbc.MysqlIO. (M...

How to deal with exceptions of org.hibernate.cfg.Configuration.xmlHelper...?

The exact exception I came across - Exception in thread “main” java.lang.IllegalAccessError: tried to access field org.hibernate.cfg.Configuration.xmlHelper from class org.hibernate.cfg.AnnotationConfiguration at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:712) at org.hibernate.cfg.Configuration.addResource(Configuration.java:481) at....... It simply means you got to check the compatibility of the hibernate jar files present in your lib folder for the project at hand. http://www.hibernate.org/30.html If there are incompatibilities, this error gets thrown... r-she-yeah

com.mysql.jdbc.PacketTooBigException

Packet too Big Exception originates from MySQL when the packet of data is too big for MYSQL to handle. com.mysql.jdbc.PacketTooBigException: Packet for query is too large (4739923 > 1048576). After a whole day of nerves wrecked for this, I figured out that i need to increase the size of "max_allowed_packet variable" in two places at the client's and server's end - as stated by MYSQL (http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html) mysql> show variables like '%max_allowed_packet'; mysql> set global max_allowed_packet=52428800; File: /etc/my.cnf max_allowed_packet=50M The maximum allowed packet size is 1GB ie 100MB. Oh btw, 1 MB = 1048576 bytes. And viola, then restart the server. /etc/init.d/mysqld restart && tail -f /var/log/mysqld.log Yeah ! problem solved...

org.hibernate.MappingException Unknown entity: AFullyQualifiedClassName

I was struggling with this error after having generated the DAO classes using MyEclipse IDE. My hibernate configuration file was alright, the libs were in place (hibernate3.jar ,hibernate-annotations.jar) and so was the desired mapping path present... mapping resource="com/bmb/model/BlogFeed.hbm.xml" I was importing the proper classes for the annotations import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; But the compiler continued to shout : 15:13:48,959 DEBUG BlogFeedDAO:62 - getting BlogFeed instance with id: 1 Entity retrieval failed.15:13:48,961 ERROR BlogFeedDAO:68 - get failed org.hibernate.MappingException: Unknown entity: BlogFeed.class Finally after hours, I realized the mistake and changed the code from orange to green... public BlogFeed findById( java.lang.Integer id) { log.debug("getting BlogFeed instance with id: " + id); try { //error BlogFeed instance = (BlogFeed) getSession...