You are here

J2EE

Tomcat Socket accept failed java.io.IOException: Too many open files

Blog Terms: 

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

How to fix:

open $tomcat/bin/catalina.sh

add this line:
ulimit -n 8192

or
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

Blog Terms: 

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:
http://www.jboss.org/jbossas/downloads/
https://repository.jboss.org/nexus/content/groups/public/org/jboss/as/jboss-as-dist/

What i can find is the source code in GIT:
https://github.com/jbossas/jboss-as/tree/7.1.2.Final

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

Blog Terms: 

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.

Ref:

Oracle and java.sql.SQLException: No suitable driver

Blog Terms: 

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

Connection connection=null;
try{
connection = DriverManager.getConnection ("jdbc:odbc:thin@192.168.2.107:1521:Schemaname", "username", "password");
PreparedStatement pstmt = con.prepareStatement ("Select * from sometable");
ResultSet rset = pstmt.executeQuery();
....................

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

java.sql.SQLException: No suitable driver found for

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

Blog Terms: 

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: java.io.IOException: Cannot run
program "java": java.io.IOException: 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

Blog Terms: 

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

Blog Terms: 

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

Blog Terms: 

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

Blog Terms: 


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.

Pages

Subscribe to RSS - J2EE