9 Replies Latest reply on Sep 24, 2004 8:48 AM by rcls0001

    Unable to find a javac compiler for JSPs

    scawa

      I am using:
      JBoss 4.0.0RC1
      Eclipse 3.0.1
      JBossIDE 1.3.30

      I have installed JBoss correctly and am able to run the Web application from the command line and have the JSPs compile correctly.

      When I start JBoss from the JBoss IDE, however and attempt to call an uncompiled JSP I receive the following message (I have not included the stack trace).

      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


      JAVA_HOME is set correctly in the environment System variables and does point to the JDK home rather than the jre

      I CAN run the JBoss apps server and get correctly compiled JSP's by running through the MyEclipse Workbench plugin. However, I would like to keep development enviornment consistent. I am attempting to create development operating procedures that will be adopted by the entire company; and will abandon the JBoss IDE in favor of MyEclipse (which is more feature rich, but not Free), if this problem is not overcome.


      Steve McConnell

        • 1. Re: Unable to find a javac compiler for JSPs
          rcls0001

          I finally figured out how to resolve this problem once and for all. In my last posting, I mentioned that deleting the JBoss server directory and replacing it with a fresh copy worked for me. I reproduced the problem on anther PC and was able to understand exactly how to resolve this issue.

          Eclipse generally uses a JRE and when I added J2SDK1.4.2_03 to the list of "Installed JREs", it automatically adds "\jre" to the directory name. For example, if you set the "JRE Home Directory" to C:\j2sdk1.4.2_03, the path Eclipse will use is C:\j2sdk1.4.2_03\jre\lib. If this is the case, tools.jar is not added to the system libraries to use.

          To add tools.jar, perform the following steps:

          - In Eclipse, select "Preferences" from the "Window" menu.
          - Expand "Java" from the tree and select "Installed JREs".
          - Select the JRE you are using and click the "Edit" button.
          - In the "Edit JRE" dialogue (yeah, I'm Canadian, we spell it like this), uncheck "Use default system libraries".
          - Click on the "Add External JARs..." button and open tools.jar from your SDK directory. This will add the tools.jar file to the system libraries to use.

          Once you redeploy your ear and view the jsp page, JBoss will now be able to compile the jsp because it has access to tools.jar.

          I hope this posting is able to help the people having this issue because it sure caused me a lot of headaches.

          --
          Steven Ercolani

          • 2. dont waste your time
            natpjboss

            PROFESSIONAL SUMMARY


            Mr. Sanju Thomas is a software proefssional having two years of extensive experience in
            developing and implementing business components in sun and related technologies. He was part
            of many major projects done in java and j2ee technologies. He has got deep knowlege in object oriented analysis and design. He posses the capability to understand the business needs quickly. Mr. Sanju Thomas is a very good team player and communicator.





            TECHNICAL SKILLS

            Operating System : WindowsX, Linux.
            Languages : Java, C++.
            Scripting languages : Java Script, VB Script.
            Packages : Office XP.
            Software Engineering : UML.
            Application Server : JBoss 4.0.
            Web Server : Apcahe Tomcat 5.0.
            Directory Server : Open LDAP.
            RDBMS : IBM DB2-UDB.
            Deployment Tool : Jakarta ANT.
            Testing Tools : JUnit.
            Build Tools : Apache ANT 1.6.
            IDEs : Eclipse 3.0, IntelliJ IDEA 4.5.


            SUN AND RELATED TECHNOLOGIES :

            EJB 2.0, JAAS, JDBC, JNDI, Servlets, JSP, RMI, JMS, JavaHelp 2.0, Log4J, JDOM.

            Entry level knowledge in Struts.



            PROFESSIONAL EXPERIENCE

            Organization : Optiwise Solutions Private Limited.

            JBoss™ integration in Optiwise™
            Period :Aug 2003 to Aug 2004


            Overview of the project:

            Optiwise™ is an Information System Tool and Methodology for Product Architecture Management. It is used for the design, communication, documentation, optimization and management of the product concept, product platforms, and product architecture. Optiwise™ can be utilized as a corporate-level strategic product management tool, with communication support for distributed R&D. With Optiwise™ the architecture of a product family is managed through dependencies between definition items such as market requirements, product features, modules, components and interfaces.

            JBoss integration in Optiwise™ is done in one project life cycle, long over one year. The project was intended to release a new version of Optiwise™ in JBoss application server. So that, the cost of the Optiwise™ can be reduced through avoiding the license fee of BEA Weblogic.

            Mr. Sanju Thomas worked in the high level desigh and coding of this project. He was responsible for the design, development and deployment of EJBs. He worked in implementing JAAS based security for Optiwise system


            Generic adapter integration in Optiwise

            Organization : Optiwise Solutions Private Limited.
            Period :jan 2003 to aug 2003

            Overview of the project:

            SQL Adapter integration to Optiwise™ was a module in whole Optiwise™ system. It was an attempt to design an interface between six legacy systems (Oracle, MS-SQL, MS-Access, Fire-Bird, Visual Fox-pro, and IBM-DB2) and Optiwise™. This adapter will provide GUI interface to the Optiwise user to read and write data from/to the underlaying repository. Through the implementation of this adapter, the tool Optiwise become more suitable to fit into hectrogenious environment.

            Mr. Sanju Thomas was responsible to the high level design and coding of this poject. In this project he worked extensivly with JDBC and java and he actively involved in testing and documentation of the work.



            Help system for Optiwise Graphics Engine.

            Organization : Optiwise Solutions Private Limited.
            Period : sep 2002 to dec 2002

            Optiwise Graphics Engine provides access to the enterprise data in a location transparent manner.
            It is a tool to populate real time data into the Optiwise client GUI console. Its a comprehensive help system that support context sesitive help. The help system is implemented using Java Help 2.0 API. Its designed in such a way that, it can be plugged into any other system with out any major changes in the implementaion.

            Mr. Sanju Thomas was involved in the coding and content development. He actively participated in the testing and documentation process of the project.



            EDUCATION and TRAINING

            Master of Computer Applications, Pondicherry Unversity, UT of Pondicherry, India.
            Year : 2002
            GPA :7.60/10

            Bachelor of Commerce, Kerala University, Kerala, India.
            Year : 1999
            GPA : 6.2/10

            CERTIFICATION

            IBM Certified Specialist in DB2 UDB 7.1
            Year: 2002

            • 3. 3856721
              rcls0001

              While using the XML facility of JbossIDE 1.4 in Eclipse 3.0 (xdoclet 1.2.1), opening up any of the merged files lists the following error in the XML file:

              The markup in the document following the root element must be well-formed.


              An example of one of my merge files:

              <error-page>
               <error-code>400</error-code>
               <location>/error/error400.jsp</location>
              </error-page>
              
              <error-page>
               <error-code>403</error-code>
               <location>/error/error403.jsp</location>
              </error-page>
              
              <error-page>
               <error-code>404</error-code>
               <location>/error/error404.jsp</location>
              </error-page>
              



              This is obviously true for merge files since they don't have a root element, but how do I disable validation on these merge files?

              I noticed JbossIDE installed the Xalan2.6.0 in the plugins directory of Eclipse.

              This type of 'problem' displays the 'red cross' on the project folder in Eclipse and makes life difficult when diagnosing more serious errors.

              Any thoughts would be great.
              Many Thanks.


              • 4. Re: Unable to find a javac compiler for JSPs
                scawa

                Unfortunately, that did not do it.

                I have a fairly standard deployment and setup, so I wonder

                - Why others are not reporting the same problem
                - If others are having the same problem, why they aren't reporting it
                - Is anyone using JBoss IDE?

                It seems like a GREAT product, but it's frustrating when one runs against a problem like this.....


                Steve McConnell

                • 5. Re: Unable to find a javac compiler for JSPs
                  kurtkrumm

                  By default, Eclipse and most plugins use the default JRE as configured in preferences. Also by default, this is the public system JRE and not the JDK jre. Try navigating to window->preferences->java->installed JREs. Most likely you will have on entry and (on Windows) it will be c:\Program Files\ etc etc. Click search, navigate to your jdk (on windows default) c:\j2sdk1.4.2_05 and then that will be available to eclipse. click the checkbox to set it as default and you should be all set.

                  I'm not 100% sure this will work for JbossIDE and I don't know why myEclipse works. I usually avoid the hassle of running the app server within eclipse and just use handy batch files to start and stop. I find it less buggy, more flexible, and slightly better performing than dealing with the IDE. Also, remote debugging works spectacularly IMHO.

                  • 6. Re: Unable to find a javac compiler for JSPs
                    scawa

                    Unfortunately, that did not do it.

                    I have a fairly standard deployment and setup, so I wonder

                    - Why others are not reporting the same problem
                    - If others are having the same problem, why they aren't reporting it
                    - Is anyone using JBoss IDE?

                    It seems like a GREAT product, but it's frustrating when one runs against a problem like this.....


                    Steve McConnell

                    • 7. Re: Unable to find a javac compiler for JSPs

                      Sorry that we haven't replied -- Do you think you could file a bug report on sourceforge for this? I haven't looked over the offending code yet, but it looks to be a valid bug.

                      Thanks =)

                      • 8. Re: Unable to find a javac compiler for JSPs
                        demulderc

                        Have you set "As JRE Library Use" in Window->Preferences->Java->BuildPath to "JRE_LIB variable" ?

                        • 9. Re: Unable to find a javac compiler for JSPs
                          brett_s_r

                          My fix for this is to ensure tools.jar is in the bootstrap classpath in the server configuration. It is not included as a JRE library by default.