0 Replies Latest reply on Oct 26, 2006 7:41 PM by forgoodorforawesome

    Unable to find javac compiler error when starting jboss thro

    forgoodorforawesome Newbie

      Starting jboss through the command line I do not get this error. When I try and start it through eclipse, I get this exception:

      18:20:49,312 ERROR [Compiler] Javac exception
      Unable to find a javac compiler;
      com.sun.tools.javac.Main is not on the classpath.
      Perhaps JAVA_HOME does not point to the JDK
      at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
      at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:924)
      at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
      at org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:216)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1110)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:280)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:88)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
      at org.jboss.web.WebModule.startModule(WebModule.java:68)
      at org.jboss.web.WebModule.startService(WebModule.java:46)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)


      Here's my setup:

      XP Pro, SP2
      JBoss 4.0.3
      Eclipse 3.2.1

      JAVA_HOME is a system variable, set to the JDK: C:\jdk1.5.0_06
      PATH:
      %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\cvsnt;C:\jdk1.5.0_06;C:\apache-ant-1.6.5-bin

      My default JRE points to the jdk Under Preferences > Installed JREs

      The JRE that I selected for the JBoss 4.0 runtime is the JDK

      Under Window > Preferences > Java > Build Path, I added tools.jar.

      Any help would be appreciated.