Archive for the ‘Errors’ Category.
April 2, 2009, 9:57 PM
This is another nasty exception I came across today. I was developing a core java application that connects to internet via proxy. It was working fine with hardcoded values for username (domain\\myname as username and secret as password). When I accepted the same strings as command line arguments, the process did quit with this.
java.net.ProtocolException: Server redirected too many times (20)
Finally I came to know that I made a mistake with the username. Double slash is wrong when we give the string as command line argument. So, the server is keep on asking the username and password, which broke the process once the threshold 20 exceeded.
November 23, 2008, 1:31 AM

Today I had downloaded struts 1.2.7 and tried to write an application. (I know I am selecting a bit old.) I configured the datasource in struts. Alas. When I tried to start my server, tomcat 6.0, I got the error saying "java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource". With Googling I found struts-legacy.jar need to downloaded and copied to lib folder of Tomcat. (I couldnt get the recent version of struts-legacy. I found something in archive). Happily restarted the server. I saw java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool.. oof.. again I need to download commons-dbcp-1.2.2.jar and commons-pool.jar.
My search come to an end
It is working fine now.
April 20, 2008, 5:19 PM

Today I had a new install of Mandriva 2008 linux. I wrote a java code to test the mysql connectivity. It ended with the following exception.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
Alas, deeper google search gives me a solution that told about the mysql connectivity parameter in /etc/my.cnf
skip-networking
This parameter has been added for some security related reasons. Really I dont know what it is. I just removed that line, which solved this issue.
February 18, 2008, 10:53 PM

friends,This week started with some more problems
. Nothing to worry, problems only feed us! Otherwise, who will give us job!!! Today I was trying to unzip a zip file and read the contents inside the file, using java.util.zip.ZipFile. It was working fine till I increased the file size. The zip file is around 160MB, and the single file inside that zip file is 4.5GB contains raw text. I hit with the exception
java.util.zip.ZipException: invalid CEN header (encrypted entry)
Pathetic, I was totally helpless! Later I came to know that It is a open bug in java, which will not support above 3.2G! I am in darkness. Latermy lead had pointed out that is due to java’s non-compliance to zip64, which is fixed in jdk1.6, 24th build. I need to get it installed and get rid of this issue!
February 13, 2008, 10:05 PM
As I have told you in my previous post, I was trying to read from a table within a loop. I am opening a new connection, new statement and firing the query to get the resultset. It was working fine for a few records, finally it dies with this exception
java.sql.SQLException: ORA-01000: maximum open cursors exceeded
Alas, I forgot to close the resultset!!