7 Replies Latest reply on Dec 4, 2003 7:28 PM by Jon Barnett

    re: pakage org.jboss.util.id.does not exist error

    java101a Newbie

      Hi,
      I am using jboss-3.2.2 and trying to compile a code that gives me the following error:

      pakage org.jboss.util.id.does not exist error

      I do have jboss-common.jar in the classpath. Is there something else I am missing?

      I also get the following error while compiling,
      package org.apache.catalina does not exist error

      I don't know what .jar file to point to for the above error.
      I would really appreciate if somebody could help me. Thank you.

        • 1. Re: re: pakage org.jboss.util.id.does not exist error
          Jon Barnett Master

          Use JBOSS_HOME/client/jbossall-client.jar for the first.

          I don't know what you are compiling for the second that is dependent directly on Tomcat libraries, however, it should be found in JBOSS_HOME/server/default/deploy/jbossweb-tomcat41.sar/catalina.jar.

          • 2. Re: re: pakage org.jboss.util.id.does not exist error
            java101a Newbie

            Hi Jonlee,
            This is my current classpath, but is still not working.

            SET CLASSPATH=%CLASSPATH%;c:\j2sdk1.4.2_02\lib\tools.jar;c:\jboss-3.2.2\lib\jboss-common.jar;c:\apache-ant-1-5.4\lib\ant.jar;c:\j2sdk1.4.2_02\lib\servlet.jar;c:\jboss-3.2.2\client\jbossall-client.jar;c:\jboss-3.2.2\lib\jboss-common.jar;c:\jboss-3.2.2\server\default\deploy\jbossweb-tomcat41.sar\catalina.jar

            • 3. Re: re: pakage org.jboss.util.id.does not exist error
              Jon Barnett Master

              I wouldn't include the servlet.jar from the JDK and I would drop the jboss-common.jar for the time being. You haven't given an indication of what you are trying to compile, the code fragment or the exact list of errors so it makes it difficult to determine what the remedy would be. Some of that information might be useful.

              • 4. Re: re: pakage org.jboss.util.id.does not exist error
                java101a Newbie

                Hi Jonlee,

                The "import org.apache.catalina.Session" statement is simply being used in a program that connects all the other java files to my database. I am not sure if this information is going to be helpful.

                The other errors are as follows:

                import org.jboss.util.id.GUID;
                ^
                cannot resolve symbol
                symbol : class GUID

                cannot resolve symbol
                symbol : method getAttribute (java.lang.String)
                location: interface javax.servlet.http.HttpSession
                s.empid = (String)session.getAttribute("test");
                ^
                I am not sure if this info is that helpful. Sorry.

                • 5. Re: re: pakage org.jboss.util.id.does not exist error
                  Jon Barnett Master

                  Your classpath looks too cluttered. You may want to reduce the size as perhaps the classpath may be truncated or otherwise mangled.

                  However, the GUID class is definitely in jbossall-client.jar.

                  Secondly, the other problem does not indicate anything to do with catalina. You should use the javax.servlet.jar with JBoss (JBOSS_HOME/server/default/lib).

                  I would comment out the catalina import until you sort out the other problems.

                  • 6. Re: re: pakage org.jboss.util.id.does not exist error
                    java101a Newbie

                    Hi Jonlee,

                    Adding jboss-clientall.jar and catalina.jar in my classpath did work. Just wanted to apologize because I am using JCreator LE and apparently I forgot to add these files in my JCreator IDE configuration. I believe we don't have to do that in text pad that is why I forget to that.

                    I found the same compilation error that I have been getting posted on one of the web forums somebody had
                    --------------------------------------------------------
                    cannot resolve symbol
                    symbol : method getAttribute (java.lang.String)
                    location: interface javax.servlet.http.HttpSession
                    String strPage = (String)gmacSession.getAttribute("util_page_location") ;
                    ---------------------------------------------
                    The solution they have posted is as follows,

                    "The HttpSession class, it does not define the method getAttribute. This method is of class ServletRequest ,so u can access this method using this class's object or HttpServletRequest object."

                    How do I do that though?

                    • 7. Re: re: pakage org.jboss.util.id.does not exist error
                      Jon Barnett Master

                      That doesn't look right to me but I haven't seen more of your code fragment. Normally, in a servlet, you go through a two-stage process. This is an example:

                      import javax.servlet.http.HttpServletRequest;
                      
                      import javax.servlet.http.HttpServletResponse;
                      
                      import javax.servlet.http.HttpSession;
                      
                      ...
                       public final void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
                      
                       {
                      
                       HttpSession session = request.getSession(false);
                      
                       response.setContentType("text/html");
                      
                       String[] stored = (String[])session.getAttribute("STORED");

                      You would tailor your getSession to suit your mode.

                      Hope that helps.