You are here


Tomcat Socket accept failed Too many open files

If you open many HTTP connections during the same time in your service in Tomcat, you will probably get such exception: Socket accept failed Too many open files.

How to fix:

open $tomcat/bin/

add this line:
ulimit -n 8192

ulimit -n //this will set unlimit

then restart tomcat and start with 'catalina start', Java will run with the given limit above.


Build JBoss AS 7.1.2.Final

In one project Jboss EAP 6.0.0 was required, but it is commercial product from Red Hat, before i get the lisence from Red Hat, i need go on working. Jboss EAP 6.0.0 was built on base of JBoss AS 7.1.2.Final , only a little bit different in Branch.

But there is no built version for JBoss AS 7.1.2.Final in Jboss website:

What i can find is the source code in GIT:


[WARN] Unknown module requested 'missingplugin'; all active GWT modules must be specified in the command line arguments

After i got some problem by debugging with GWT 2.0, I downgraded from 2 to 1.7, but I got this error when running "Web Application":
[WARN] Unknown module requested 'missingplugin'; all active GWT modules must be specified in the command line arguments

I did this, and solve the problem:
1. Internet Explorer | Tools | Internet Options | Delete Cookies
2. Internet Explorer | Tools | Internet Options | Delete Files
3. Internet Explorer | Tools | Internet Options | Clear History

In GWT debug browser windows will ask you about the Gear if you are using Google Gear.



Oracle and java.sql.SQLException: No suitable driver

Strange problem, just one part of simple code, works on my XP system, but not on Windows2003.

  1. Connection connection=null;
  2. try{
  3. connection = DriverManager.getConnection ("jdbc:odbc:thin@", "username", "password");
  4. PreparedStatement pstmt = con.prepareStatement ("Select * from sometable");
  5. ResultSet rset = pstmt.executeQuery();
  6. ....................

Very simple SQL code for one servlet, but when i run it in Tomcat, i got this exception:

  1. java.sql.SQLException: No suitable driver found for


"Cannot allocate memory" OutofMemory when call Ant to build Polish project in Tomcat

I have written one J2EE web service which was run in Tomcat, this service will call Ant to build one J2ME Polish project. It can be run without problem, aber will got such exception "ProGuard is unable to obfuscate: Cannot run
program "java": error=12, Cannot allocate memory" after several times' building. This is abvious OutofMemory exception.

Tomcat service was run on CentOS linux, the first thing what i thought is to increase the initial memory of Tomcat.

HTTPS Connection with Tomcat and WTK emulator

1. Tomcat Configuation

Creating HTTPS Connection

Firstly should create a temporarely SSL certificate to use the
Tomcat in an SSL mode.


MyEclipse+Hibernate-My Exceptions List

Environment: hibernate 2 and Oracle 9i:
This post will record the strange exceptions I have met.

Exception 1:

java.sql.SQLException: ORA-02289: sequence does not exist


Quickly to log your code with log4j in 3 minutes

If you are one lazy programmer like me and have no time to read the document of log4j but still want to use log4j, try to read the following.

At least you'd better know that log4j is one tools to help you debug and log what happened with your code, anywhere and anywhen. I was used to use System.out.println() to debug my code, and I have written one function to do that:


Integrate J2ME Mobile Clients into Web Service 2 -- Create Web Service and J2EE Client

2 Create Web Service

2.1 Create Web Service Project

Enter the %AXIS2_HOME%/samples (Here is D:\ProgramFiles\axis2\samples) , there are many Web Service good example here. If you are not clear about how to create one Web Service from nothing, just like me, those examples are good turorials. Now I will use one and modify it to be our first Web Service.

Integrate J2ME Mobile Clients into Web Service 1 -- Install Web Service

In this post I will build one Web Service with Axis2, and write one J2ME application as one Web Service client. We will know how Web Service works with mobile client.


Subscribe to RSS - J2EE