You are here


Could not deploy project to Tomcat with MyEclipse

Sometimes project can not be deployed to Tomcat with MyEclipse, and met such exception:

XXX could not be redeployed because it could not be completely removed in the undeployment phase. the most common cuase of this problem is attempting to redeploy while the server is running,which has locked one or more files.


1. Check Properties->MyEclipse->Project Facets->Web->Context Root

The value should be same as your current project name.



org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console

When I followed the tutorial Hello, OSGi, Part 1: Bundles for beginners to build and run my first OSGi application, there was the exception in the console: org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console


Encrypting passwords in Tomcat


Apache Tomcat is by far the most popular (open source) web server and Java servlet container. It has been around for a long time and – at the time of writing this post – has reached version 7.0.29. As Apache rightfully claims on its web site, Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations. Therefore, one might imagine that such a widely used server would out-of-the-box already prove to be very secure .



JBoss or Tomcat, maybe TomEE?

First the facts, neither is better. As you already mentioned, Tomcat provides a servlet container that supports the Servlet specification (Tomcat 7 supports Servlet 3.0). JBoss AS, a 'complete' application server supports Java EE 6 (including Servlet 3.0) in its current version.


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.


Subscribe to RSS - J2EE