aspose file tools*
The moose likes Tomcat and the fly likes Compiling Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Compiling Tomcat" Watch "Compiling Tomcat" New topic
Author

Compiling Tomcat

Carl Parrish
Ranch Hand

Joined: May 03, 2002
Posts: 60
I'm trying to compile the tomcat. When I get to ant test I get the following error.

build-main:
[javac] Compiling 4 source files to /usr/opt/jakarta-tomcat-4.0.3-src/catalina/build/server/classes
[javac] Compiling 24 source files to /usr/opt/jakarta-tomcat-4.0.3-src/catalina/build/server/classes
[javac] /usr/opt/jakarta-tomcat-4.0.3-src/catalina/src/share/org/apache/catalina/core/ApplicationFilterChain.java:73: Class javax.servlet.Filter not found in import.
[javac] import javax.servlet.Filter;
[javac] ^
[javac] /usr/opt/jakarta-tomcat-4.0.3-src/catalina/src/share/org/apache/catalina/core/ApplicationFilterChain.java:74: Class javax.servlet.FilterChain not found in import.
[javac] import javax.servlet.FilterChain;
[javac] ^
[javac] /usr/opt/jakarta-tomcat-4.0.3-src/catalina/src/share/org/apache/catalina/core/ApplicationFilterChain.java:75: Class javax.servlet.FilterConfig not found in import.
[javac] import javax.servlet.FilterConfig;
<snip> ...</snip>
[javac] /usr/opt/jakarta-tomcat-4.0.3-src/catalina/src/share/org/apache/catalina/util/ssi/SsiInclude.java:106: Incompatible type for method. Can't convert org.apache.catalina.util.ssi.ResponseIncludeWrapper to javax.servlet.ServletResponse.
[javac] new ResponseIncludeWrapper(super.res, [javac] ^
[javac] /usr/opt/jakarta-tomcat-4.0.3-src/catalina/src/share/org/apache/catalina/util/ssi/SsiInclude.java:113: Exception javax.servlet.ServletException is never thrown in the body of the corresponding try statement.
[javac] } catch (ServletException e) {
[javac] ^
[javac] /usr/opt/jakarta-tomcat-4.0.3-src/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java:422: Method getParameterMap() not found in interface javax.servlet.http.HttpServletRequest.
[javac] Map parameters = hreq.getParameterMap();
[javac] ^
[javac] Note: 5 files use or override a deprecated API. Recompile with "-deprecation" for details.
[javac] 57 errors, 1 warning
BUILD FAILED
/usr/opt/jakarta-tomcat-4.0.3-src/catalina/build.xml:520: Compile failed, messages should have been provided.
So I'm assuming that I either have a problem with javax (only I don't see a jar file with that name) or with jmx. Also a potinal problem is that I got the jakarta-servletapi-4 from the 3.3.1 release (I couldn't find the source for it with the 4.0 release.). Can anyone advise me here?
Carl Parrish
Ranch Hand

Joined: May 03, 2002
Posts: 60
Okay I found the nightly for jakarta-servletapi-4
and now I have a *lot* less errors but I'm still failing the test
[snip]...[\snip]

[java] java.lang.IllegalArgumentException: Document base ../webapps/build/examples does not exist or is not a readable directory
[java] at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:187)
[java] at org.apache.naming.resources.FileDirContextTestCase.setUp(FileDirContextTestCase.java:117)
[java] 8) testListWebInfIndirect(org.apache.naming.resources.FileDirContextTestCase)
[java] java.lang.IllegalArgumentException: Document base ../webapps/build/examples does not exist or is not a readable directory
[java] at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:187)
[java] at org.apache.naming.resources.FileDirContextTestCase.setUp(FileDirContextTestCase.java:117)
[java]
[java] FAILURES!!!
[java] Tests run: 8, Failures: 0, Errors: 8
[java]
BUILD FAILED
/usr/opt/jakarta-tomcat-4.0.3-src/catalina/build.xml:606: Java returned: -1
Total time: 6 seconds
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

when you download the source, do you even get the examples directory?
[ May 07, 2002: Message edited by: Mike Curwen ]
Carl Parrish
Ranch Hand

Joined: May 03, 2002
Posts: 60
Yeah they are there. I chmod 777 that directory and went into build.properties to see if I could find anything pointing to it. (didn't). But so far I'm still getting the same errors. And the build fails.
Carl Parrish
Ranch Hand

Joined: May 03, 2002
Posts: 60
okay there isn't a build directory though just webapps/examples NOT webapps/build/examples as the test seems to be trying.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Compiling Tomcat