1 Reply Latest reply on Feb 17, 2007 1:22 PM by jwenting

    Error while running JBoss server

    sandy_123

      Hi All,
      I'm using Eclipse 3.1.1 and JBoss Eclipse IDE 1.6 and JBossAS 4.0.0.I've written a web application which consists of a servlet.When i try to debug that servlet I'm getting an error like

      java.lang.NoSuchMethodError: main
      Exception in thread "main"

      Why am i getting that error?What should i do?

      Thanks in advance,
      Sandy.

        • 1. Re: Error while running JBoss server

          Seems you're trying to debug the servlet by running it as an application. That's not the way to do it.
          You need to connect to the web application (the servlet module) running inside JBoss and set some breakpoints.
          Then do an HTTP request to the servlet (using a web browser usually) and see the breakpoint being hit.

          You may need to change your JBoss startup script to enable remote debugging first for that to work (certainly if JBoss isn't running inside Eclipse).