10 Replies Latest reply on Dec 9, 2003 1:53 PM by jkester

    j2ee.jar / axis / HttpServletRequest (newbie)

    troyrudolph

      Hi all,

      I've deployed Axis 1.1 RC2 in JBoss 3.0.6. I'm using J2ee 1.4, J2SDK 1.4.1_02, and Xerces.

      .Mostly, it seems to work, but when I invoke the EchoHeaders webservice (http://localhost:8080/axis/EchoHeaders.jws?method=list), it fails to compile EchoHeaders.jws. The error occurs because it can't find javax.servlet.http.HttpServletRequest.

      j2ee.jar is not in the JBoss classpath, but when I put it there, JBoss fails to start up.

      How do I configure the classpath so that JBoss can start successfully and compile things that require j2ee.jar?

      Thanks
      Troy

        • 1. Re: j2ee.jar / axis / HttpServletRequest (newbie)
          prabhakar

          You don't need j2ee.jar. You need servlet.jar (the servlet API).

          -prabhakar

          • 2. Re: j2ee.jar / axis / HttpServletRequest (newbie)
            mrslinkyman

            Has anyone found a solution to this for JBoss and Axis? The reply implies that servlet.jar is not found in JBoss which it must be in order to have JSPs compiling and working properly.

            • 3. Re: j2ee.jar / axis / HttpServletRequest (newbie)

              As pointed out earlier u dont need J2ee library from sun if u are using jboss, it comes with its own api for j2ee (which has appi for ejb, servlets and jsps and others.).
              So u dont need that , but make sure u have jboss-j2ee.jar (JBOSS J2EE API) file on yr classpath in addition to others.

              Have a look at this chapter.
              http://www.tusc.com.au/tutorialhtml/chap9.html
              and also
              www.tusc.com.au/tutorial/html/index.html
              and chapter-1 for configuration of jboss, what u need on yr classpth.

              I hope this

              Vishal.

              • 4. Re: j2ee.jar / axis / HttpServletRequest (newbie)
                mrslinkyman

                Yes, that makes more sense. But I don't think this is a specific classpath issue. If the jboss-j2ee.jar you mentioned is not on the classpath, will anything else run correctly? I am able to get other Web Services to run correctly using Axis. When the web service is written as a JWS file (a class file) and also references any package in javax.servlet.* it does not execute correctly. Regular JWS files that do not reference said packages execute correctly.

                • 5. Re: j2ee.jar / axis / HttpServletRequest (newbie)
                  jkester

                  Hello

                  I have the same problem. I use the jboss-3.2.2 release with tomcat 4.1.27.
                  I tried as well to add a symbolic link to te axis.war/WEB-INF/lib directory for the jboss server/default/lib/javax.servlet.jar. That failed, the whole axis application did not work. I agree that it seems that somehow the axis under tomcat under jboss can not find the proper classpath. Somewhere in a WAS post I read that it could be due to the getClassPath call containing %20% characters for spacings and that jars in these forms are not picked up ... Don't know, I use linux and intend not to use spaces. But I am wondering which is the library that is needed and where it should be put?

                  Regards, Jan

                  • 6. Re: j2ee.jar / axis / HttpServletRequest (newbie)
                    jkester

                    I have been looking around a bit already, and edited the source of JWSHandler. Just before the setting of the classpath, I added a debug:
                    log.debug(getDefaultClasspath(msgContext));
                    compiler.setClasspath(getDefaultClasspath(msgContext));
                    This is the classpath that the compiler will use to get the jws file compiled.
                    Now, running it with debug on gives me the following classpath:
                    /usr/local/jboss-3.2.2/bin/run.jar:/usr/local/jboss-3.2.2/bin/../client/getopt.jar:/usr/local/j2sdk1.4.1_01/lib/tools.jar:/usr/local/j2sdk1.4.1_01/jre/lib/ext/sunjce_provider.jar:/usr/local/j2sdk1.4.1_01/jre/lib/ext/dnsns.jar:/usr/local/j2sdk1.4.1_01/jre/lib/ext/localedata.jar:/usr/local/j2sdk1.4.1_01/jre/lib/ext/ldapsec.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/classes:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/axis-ant.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/axis.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/commons-discovery.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/commons-logging.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/jaxrpc.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/log4j-1.2.8.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/saaj.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/wsdl4j.jar:/usr/local/jboss-3.2.2/server/default/deploy/webapps/axis.war/WEB-INF/lib/xmlsec.jar:/usr/local/j2sdk1.4.1_01/jre/lib/rt.jar:/usr/local/j2sdk1.4.1_01/jre/lib/i18n.jar:/usr/local/j2sdk1.4.1_01/jre/lib/sunrsasign.jar:/usr/local/j2sdk1.4.1_01/jre/lib/jsse.jar:/usr/local/j2sdk1.4.1_01/jre/lib/jce.jar:/usr/local/j2sdk1.4.1_01/jre/lib/charsets.jar:/usr/local/j2sdk1.4.1_01/jre/classes.

                    I don't recognise any servlet.jar or j2ee.jar in here that holds the HttpServletRequest definition ... I guess that the default classpath of msgContext is not good enough :-(.
                    What should I do?

                    Regards, Jan

                    • 7. Re: j2ee.jar / axis / HttpServletRequest (newbie)
                      jkester

                      I have been putting this problem on the axis user mailing list as well and got some positive response (title "httpservletrequest not found under jboss"). One of the developers added a fix to the current cvs code. I compiled the latest cvs release and it seems a lot better already, though not perfect. Currently it fails for my es_ES localization setting, though it works for en_US, and the ?wsdl call does return an empty page. The call to the local endpoint (from the axis index page) works now!

                      Regards, Jan.

                      • 8. Re: j2ee.jar / axis / HttpServletRequest (newbie)
                        jkester

                        The blank page I had after a ?wsdl call, is due to the netscape 7.0. IE and netscape 7.1 and mozilla I believe 1.4 don't have this problem. A wget call also retrieves the wsdl file.
                        I only didn't get it working now for my es_ES.

                        Regards, Jan.

                        • 9. Re: j2ee.jar / axis / HttpServletRequest (newbie)
                          gilly

                          Copy (do not link to) javax.servlet.jar from the JBOSS_HOME/server/default/lib to JBOSS_HOME/server/default/deploy/axis/WEB-INF/lib. Your values for 'default' and 'axis' may differ - alter as appropriate.

                          Steve Guilford
                          MingleWood Data Systems, LLC.

                          • 10. Re: j2ee.jar / axis / HttpServletRequest (newbie)
                            jkester

                            I still think it is related to axis. When axis tries to compile the jws file, it gets a classpath reference. This reference does not contain the complete classpath. That said, use a version 1.2 and you will that this axis problem is solved. At least in my case.

                            Regards, Jan.