You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Arieh Markel <Ar...@Central.Sun.COM> on 2000/04/25 20:42:28 UTC

Problem with latest build ? - proposed PATCH to jasper.compiler.Compiler

I have just downloaded the latest build (20000425).

Following instructions found in a posting in which Sam Ruby explained
how the packages are built from source, I proceeded to follow, but
ran into the following while compiling the following:

/ws/sx1.0-tools/jakarta/v3.1_f/jakarta-tomcat/src/share/org/apache/jasper/compil
er/Compiler.java:312: Exception org.apache.jasper.compiler.ParseException must 
be caught, or it must be declared in the throws clause of this method.
        while (tmpReader.skipUntil("<%@") != null) {
                                  ^
Note: 
/ws/sx1.0-tools/jakarta/v3.1_f/jakarta-tomcat/src/share/org/apache/tomcat/util/x
ml/XmlMapper.java uses or overrides a deprecated API.  Recompile with 
"-deprecation" for details.
1 error, 1 warning
BUILD FATAL ERROR: Compile failed, messages should have been provided.


Inspection of the code indicates that indeed, skipUntil throws the 
ParseException.


With the proposed patch that follows, I proceeded to complete the build
successfully.





===================================================================
RCS file: RCS/Compiler.java,v
retrieving revision 1.1
diff -u -b -r1.1 Compiler.java
--- Compiler.java	2000/04/25 18:33:47	1.1
+++ Compiler.java	2000/04/25 18:35:17
@@ -309,6 +309,8 @@
 
 	// A lot of code replicated from Parser.java
 	// Main aim is to "get-it-to-work".
+	try
+	{
 	while (tmpReader.skipUntil("<%@") != null) {
 
 	    tmpReader.skipSpaces();
@@ -336,6 +338,10 @@
 	    }
 	}
 	return null;
+	} catch (ParseException ex) {
+	    // Ignore the exception here, it will be caught later.
+	    return null;
+	}
     }
 }
 


Arieh
--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Re: Problem with latest build ? - proposed PATCH to jasper.compiler.Compiler

Posted by MANDAR RAJE <ma...@pathfinder.eng.sun.com>.
That was my mistake. I did not put back Compiler.java into
the main workspace. Sorry. Have done the putback now and
it should work.

Mandar.

Arieh Markel wrote:
> 
> I have just downloaded the latest build (20000425).
> 
> Following instructions found in a posting in which Sam Ruby explained
> how the packages are built from source, I proceeded to follow, but
> ran into the following while compiling the following:
> 
> /ws/sx1.0-tools/jakarta/v3.1_f/jakarta-tomcat/src/share/org/apache/jasper/compil
> er/Compiler.java:312: Exception org.apache.jasper.compiler.ParseException must
> be caught, or it must be declared in the throws clause of this method.
>         while (tmpReader.skipUntil("<%@") != null) {
>                                   ^
> Note:
> /ws/sx1.0-tools/jakarta/v3.1_f/jakarta-tomcat/src/share/org/apache/tomcat/util/x
> ml/XmlMapper.java uses or overrides a deprecated API.  Recompile with
> "-deprecation" for details.
> 1 error, 1 warning
> BUILD FATAL ERROR: Compile failed, messages should have been provided.
> 
> Inspection of the code indicates that indeed, skipUntil throws the
> ParseException.
> 
> With the proposed patch that follows, I proceeded to complete the build
> successfully.
> 
> ===================================================================
> RCS file: RCS/Compiler.java,v
> retrieving revision 1.1
> diff -u -b -r1.1 Compiler.java
> --- Compiler.java       2000/04/25 18:33:47     1.1
> +++ Compiler.java       2000/04/25 18:35:17
> @@ -309,6 +309,8 @@
> 
>         // A lot of code replicated from Parser.java
>         // Main aim is to "get-it-to-work".
> +       try
> +       {
>         while (tmpReader.skipUntil("<%@") != null) {
> 
>             tmpReader.skipSpaces();
> @@ -336,6 +338,10 @@
>             }
>         }
>         return null;
> +       } catch (ParseException ex) {
> +           // Ignore the exception here, it will be caught later.
> +           return null;
> +       }
>      }
>  }
> 
> 
> Arieh
> --
>  Arieh Markel                           Sun Microsystems Inc.
>  Network Storage                        500 Eldorado Blvd. MS UBRM11-194
>  e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
>  Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
>  (e-mail me with subject SEND PUBLIC KEY to get public key)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org