You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by st953x27 <st...@drexel.edu> on 2001/04/18 18:00:55 UTC

RE: Multiple Problems - Won't Build,Setting Velocity up with Apache Jserv 1.1

Hi Geir,

Here are the compile time error messages :

C:\velocity-1.0\build>build
Buildfile: build.xml

env:
     [echo] build.compiler = ${build.compiler}
     [echo] java.home = C:\jdk1.3\jre
     [echo] user.home = C:\WINNT\Profiles\jmenkevi
     [echo] java.class.path = 
c:\jdk1.3\jre\lib\classes12.zip;c:\jdk1.3\jre\lib\
ext\jsdk.jar;c:\classes\cos.jarc:\classes\classes12.zip;c:\classes\cos.jar;c:\
cl
asses\servlet.jar;c:\jsdk2.0\lib\jsdk.jar;c:\classes\velocity-1.0.jar;C:\jdk1.
3\
lib\tools.jar;.\lib\ant-1.3.jar;.\lib\ant-1.3-optional.jar;.\lib\xerces-1.3.0.
ja
r;.\lib\werken.xpath.jar;.\lib\antlr-runtime.jar
     [echo]

prepare:

compile:
    [javac] Compiling 144 source files to C:\velocity-1.0\bin\classes
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:120: cannot resolve symbol
    [javac] symbol  : method getContextPath  ()
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.getContextPath();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:135: cannot resolve symbol
    [javac] symbol  : method getHeaders  (java.lang.String)
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.getHeaders( name );
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:175: cannot resolve symbol
    [javac] symbol  : method isUserInRole  (java.lang.String)
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.isUserInRole( role );
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:180: cannot resolve symbol
    [javac] symbol  : method getUserPrincipal  ()
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.getUserPrincipal();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:205: getSession(boolean) in javax.servlet.http.HttpServletRequest 
cannot
 be applied to ()
    [javac]         return req.getSession();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:220: cannot resolve symbol
    [javac] symbol  : method isRequestedSessionIdFromURL  ()
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.isRequestedSessionIdFromURL();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:241: cannot resolve symbol
    [javac] symbol  : method getAttributeNames  ()
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.getAttributeNames();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:319: cannot resolve symbol
    [javac] symbol  : method setAttribute  (java.lang.String,java.lang.Object)
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         req.setAttribute( name, o );
    [javac]            ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:324: cannot resolve symbol
    [javac] symbol  : method removeAttribute  (java.lang.String)
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         req.removeAttribute( name );
    [javac]            ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:329: cannot resolve symbol
    [javac] symbol  : method getLocale  ()
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.getLocale();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:334: cannot resolve symbol
    [javac] symbol  : method getLocales  ()
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.getLocales();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:339: cannot resolve symbol
    [javac] symbol  : method isSecure  ()
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.isSecure();
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
ap.java:344: cannot resolve symbol
    [javac] symbol  : method getRequestDispatcher  (java.lang.String)
    [javac] location: interface javax.servlet.http.HttpServletRequest
    [javac]         return req.getRequestDispatcher( path );
    [javac]                   ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:119: cannot resolve symbol
    [javac] symbol  : method encodeURL  (java.lang.String)
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         return resp.encodeURL( url );
    [javac]                    ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:124: cannot resolve symbol
    [javac] symbol  : method encodeRedirectURL  (java.lang.String)
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         return resp.encodeRedirectURL( url );
    [javac]                    ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:169: cannot resolve symbol
    [javac] symbol  : method addDateHeader  (java.lang.String,long)
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         resp.addDateHeader( name, date );
    [javac]             ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:179: cannot resolve symbol
    [javac] symbol  : method addHeader  (java.lang.String,java.lang.String)
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         resp.addHeader( name, value );
    [javac]             ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:189: cannot resolve symbol
    [javac] symbol  : method addIntHeader  (java.lang.String,int)
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         resp.addIntHeader( name, value );
    [javac]             ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:240: cannot resolve symbol
    [javac] symbol  : method setBufferSize  (int)
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         resp.setBufferSize( size );
    [javac]             ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:245: cannot resolve symbol
    [javac] symbol  : method getBufferSize  ()
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         return resp.getBufferSize();
    [javac]                    ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:251: cannot resolve symbol
    [javac] symbol  : method flushBuffer  ()
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         resp.flushBuffer();
    [javac]             ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:256: cannot resolve symbol
    [javac] symbol  : method isCommitted  ()
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         return resp.isCommitted();
    [javac]                    ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:261: cannot resolve symbol
    [javac] symbol  : method reset  ()
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         resp.reset();
    [javac]             ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:266: cannot resolve symbol
    [javac] symbol  : method setLocale  (java.util.Locale)
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         resp.setLocale( loc );
    [javac]             ^
    [javac] 
C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletResponseW
rap.java:271: cannot resolve symbol
    [javac] symbol  : method getLocale  ()
    [javac] location: interface javax.servlet.http.HttpServletResponse
    [javac]         return resp.getLocale();
    [javac]                    ^
    [javac] 25 errors

BUILD FAILED

C:\velocity-1.0\build\build.xml:142: Compile failed, messages should have been 
p
rovided.

Total time: 14 seconds



Thanks,

Jim

>===== Original Message From velocity-user@jakarta.apache.org =====
>st953x27 wrote:
>>
>> Hi All,
>>
>> I'm currently having a two-fold problem.  First and foremost, I can't get 
the
>> build to properly work.  I have JDK1.3, JSDK2.2 installed on WinNT4 service
>> pack 6 trying to use velocity v1.0.  When I run the build batch file I get 
a
>> bunch of compile time errors, all pointing to the 
HttpServletResponseWrapper
>> and HttpServletRequestWrapper  classes.  All of the errors are the same,
>> "cannot resolve symbol" and the '.' is the character that is being pointed 
at.
>>  Here are the line numbers where the errors are occuring : (request) 120, 
135,
>> 175, 180, 205, 220, 241, 319, 324, 329, 334, 339, 344, (response) 119, 124,
>> 169, 179, 189, 240, 245, 251, 256, 261, 266, 271.
>
>Those compile time errors might be helpful, so feel free to include
>them. :)
>
>My guess is that we will discover that you are compiling against a
>servlet jar that is old (the jserv bit gives me the hint...)
>
>>
>> Secondly, I attempted to manually edit the velocity.properties file in the 
jar
>> to point to a template directory where I had the sample.vm file sitting.  
Then
>> I loaded the jar file into the classpath of Apache Jserv 1.1, but I get an
>> exception in the VelocityServlet stating that it could find the template.
>> Does anybody have any information pertaining to loading velocity on apache
>> jserv and is there a way to edit the velocity.properties file in the jar
>> without having to use the build batch file?  Also is there a way to set up
>> template directory on a project-by-project (zone-by-zone) basis, so I won't
>> have to have all of my templates sitting in the same directory?  Any help 
you
>> can offer is greatly appreciated.
>
>*In the jar?*  You probably want to avoid doing that.
>
>In the future, we need to see the actual error messages and log messages
>to provide any help.
>
>Note that I would be astounded if the velocity servlet support worked in
>JServ, but Velocity itself should work fine.  You will need to compile
>against a modern servlet.jar if you want to build.
>
>As for the zone-by-zone, it is my understanding that JServ doesn't
>support separation of classloader like a modern servlet runner will.
>That is necessary if you wish to have separation of template directories
>w/o resorting to some scheme that uses a separate directory for each
>project, all rooted in the same template root.
>
>My recommendation is start the move to Tomcat now.  JServ is really no
>longer supported.
>
>geir
>
>--
>Geir Magnusson Jr.                               geirm@optonline.net
>Developing for the web?  See http://jakarta.apache.org/velocity/


Re: Multiple Problems - Won't Build,Setting Velocity up with ApacheJserv 1.1

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
st953x27 wrote:
> 
> Hi Geir,
> 
> Here are the compile time error messages :
> 
> C:\velocity-1.0\build>build
> Buildfile: build.xml
> 
>
[SNIP]

> prepare:
> 
> compile:
>     [javac] Compiling 144 source files to C:\velocity-1.0\bin\classes
>     [javac]
> C:\velocity-1.0\bin\src\org\apache\velocity\app\HttpServletRequestWr
> ap.java:120: cannot resolve symbol
>     [javac] symbol  : method getContextPath  ()
>     [javac] location: interface javax.servlet.http.HttpServletRequest
>     [javac]         return req.getContextPath();
>     [javac]                   ^

[SNIP]


Yep.  Seems unhappy about the state of affairs wrt the servlet.jar. 
There is one in build/lib that is right.  Did you replace that? Move
that?  Can you delete your environment's classpath to null (empty) for a
moment and try again?

geir

-- 
Geir Magnusson Jr.                               geirm@optonline.net
Developing for the web?  See http://jakarta.apache.org/velocity/