0

I am new to Eclipse. I wanted to run a simple HelloWorld servlet program in Apache-Tomcat. I am forced to use Eclipse and Tomcat combo. I am using Eclipse-Juno in Ubuntu 13.10 and Apache-Tomcat-6.0.39. I added the server to the Eclipse and typed my entire HelloWorld program by creating a new Dynamic web project. When i try to run my code using "Run on server", after asking which server to proceed, my eclipse window shutsdown forcefully. I can see a error log file in the eclipse folder. That shows:

#A fatal error has been detected by the Java Runtime Environment:

#SIGSEGV (0xb) at pc=0x00007f339758b680, pid=6672, tid=139862181361408

#JRE version: OpenJDK Runtime Environment (7.0_51) (build 1.7.0_51-b00)

#Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
Problematic frame:

#C  [libwebkitgtk-1.0.so.0+0x112b680]  void WTF::freeOwnedGPtr<_GdkEvent>((_GdkEvent*)+0x16b50

But when i try to run my code without eclipse it works well.

Here is my HelloWorld program. I am sure the problem is not with this code.

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet {

  private String message;

  public void init() throws ServletException
   {
       message = "Hello World";
   }

   public void doGet(HttpServletRequest request,
                HttpServletResponse response)
        throws ServletException, IOException
  {
      response.setContentType("text/html");
      PrintWriter out = response.getWriter();
      out.println("<h1>" + message + "</h1>");
  }

}

Why is this error occurring and why my eclipse shuts down automatically? Any help would be much appreciated.

Pragatheeswaran
  • 120
  • 1
  • 9

2 Answers2

2

There are 2 ways to solve this 400626 :

  1. Use a patched version of WebKitGTK (if you are comfortable with dpkg and resolution of dependencies, and if you trust or can check theses patches)
  2. Or add these two lines on your eclipse.ini (to Disable browser support):

-Dorg.eclipse.swt.browser.XULRunnerPath=/dev/null -Dorg.eclipse.swt.browser.DefaultType=mozilla

On my Kubuntu 13.10 x64 with Eclipse Kepler, the second solution solves the issue.

0

This could be Eclipse bug 392967. This is marked as fixed in Eclipse 4.3 (Kepler).

greg-449
  • 109,219
  • 232
  • 102
  • 145