RE: 5.0.29 JSP compilation fails when using JDK 1.5.0
Hi, Patches suitably modified and committed on CVS HEAD for Tomcat 5.5.4 as well. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Jess Holle [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:00 AM To: Tomcat Developers List Cc: Shapira, Yoav Subject: Re: 5.0.29 JSP compilation fails when using JDK 1.5.0 I accidentally got Windows end-of-line sequences in the last set of patches. Here's a better set. -- Jess Holle Jess Holle wrote: Okay, I now (belatedly) understand the problem. The issue is that by default Jaspper is setting the target release to 1.3 but leaving the source release unspecified -- resulting in the JDK 1.5 javac default source release, 1.5 -- and javac won't allow this mixture. I am attaching a set of patches that (1) defaults the source release to 1.3 as well and (2) allows this to be controlled in a completely independent and analogous manner to target release. I would appreciate seeing this in 5.0.30 :-) -- Jess Holle This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 5.0.29 JSP compilation fails when using JDK 1.5.0
I accidentally got Windows end-of-line sequences in the last set of patches. Here's a better set. -- Jess Holle Jess Holle wrote: Okay, I now (belatedly) understand the problem. The issue is that by default Jaspper is setting the target release to 1.3 but leaving the source release unspecified -- resulting in the JDK 1.5 javac default source release, 1.5 -- and javac won't allow this mixture. I am attaching a set of patches that (1) defaults the source release to 1.3 as well and (2) allows this to be controlled in a completely independent and analogous manner to target release. I would appreciate seeing this in 5.0.30 :-) -- Jess Holle --- Options.java-5.0.29 2004-10-19 09:56:58.0 -0500 +++ Options.java2004-10-19 09:57:00.0 -0500 @@ -117,11 +117,16 @@ public String getCompiler(); /** - * Compiler target VM, e.g. 1.1,1.2,1.3, or 1.4. + * Compiler target VM, e.g. 1.1, 1.2, 1.3, 1.4, or 1.5. */ public String getCompilerTargetVM(); /** + * Compiler source VM, e.g. 1.3, 1.4, or 1.5. + */ +public String getCompilerSourceVM(); + +/** * The cache for the location of the TLD's * for the various tag libraries 'exposed' * by the web application. --- Compiler.java-5.0.292004-10-19 09:56:54.0 -0500 +++ Compiler.java 2004-10-19 09:57:08.0 -0500 @@ -386,6 +386,11 @@ info.append( compilerTargetVM= + options.getCompilerTargetVM() + \n); } +if (options.getCompilerSourceVM() != null) { +javac.setSource(options.getCompilerSourceVM()); +info.append( compilerSourceVM= + options.getCompilerSourceVM() + \n); +} + // Build includes path PatternSet.NameEntry includes = javac.createInclude(); --- EmbeddedServletOptions.java-5.0.29 2004-10-19 09:57:12.0 -0500 +++ EmbeddedServletOptions.java 2004-10-19 09:57:06.0 -0500 @@ -144,6 +144,11 @@ private String compilerTargetVM = 1.3; /** + * The compiler source VM (1.3 by default). + */ +private String compilerSourceVM = 1.3; + +/** * Cache for the TLD locations */ private TldLocationsCache tldLocationsCache = null; @@ -303,6 +308,14 @@ return compilerTargetVM; } +/** + * @see Options#getCompilerSourceVM + */ +public String getCompilerSourceVM() +{ + return compilerSourceVM; +} + public boolean getErrorOnUseBeanInvalidClassAttribute() { return errorOnUseBeanInvalidClassAttribute; } @@ -571,6 +584,11 @@ this.compilerTargetVM = compilerTargetVM; } +String compilerSourceVM = config.getInitParameter(compilerSourceVM); +if(compilerSourceVM != null) { +this.compilerSourceVM = compilerSourceVM; +} + String javaEncoding = config.getInitParameter(javaEncoding); if (javaEncoding != null) { this.javaEncoding = javaEncoding; --- JspC.java-5.0.292004-10-19 09:57:10.0 -0500 +++ JspC.java 2004-10-19 09:57:02.0 -0500 @@ -98,6 +98,8 @@ private static final String SWITCH_CLASS_NAME = -c; private static final String SWITCH_FULL_STOP = --; private static final String SWITCH_COMPILE = -compile; +private static final String SWITCH_SOURCE = -source; +private static final String SWITCH_TARGET = -target; private static final String SWITCH_URI_BASE = -uribase; private static final String SWITCH_URI_ROOT = -uriroot; private static final String SWITCH_FILE_WEBAPP = -webapp; @@ -145,6 +147,7 @@ private String compiler = null; private String compilerTargetVM = 1.3; +private String compilerSourceVM = 1.3; private boolean classDebugInfo = true; private Vector extensions; @@ -276,6 +279,10 @@ } } else if (tok.equals(SWITCH_ENCODING)) { setJavaEncoding(nextArg()); +} else if (tok.equals(SWITCH_SOURCE)) { +setCompilerSourceVM(nextArg()); +} else if (tok.equals(SWITCH_TARGET)) { +setCompilerTargetVM(nextArg()); } else { if (tok.startsWith(-)) { throw new JasperException(Unrecognized option: + tok + @@ -479,6 +486,22 @@ compilerTargetVM = vm; } +/** + * @see Options#getCompilerSourceVM. + */ +public String getCompilerSourceVM() +{ + return compilerSourceVM; +} + +/** + * @see Options#getCompilerSourceVM. + */ +public void setCompilerSourceVM( String vm ) +{ + compilerSourceVM = vm; +} + public TldLocationsCache getTldLocationsCache() { return tldLocationsCache; } @@ -1156,5 +1179,4 @@ // pass straight through } } - } - To unsubscribe,
Re: 5.0.29 JSP compilation fails when using JDK 1.5.0
Okay, I now (belatedly) understand the problem. The issue is that by default Jaspper is setting the target release to 1.3 but leaving the source release unspecified -- resulting in the JDK 1.5 javac default source release, 1.5 -- and javac won't allow this mixture. I am attaching a set of patches that (1) defaults the source release to 1.3 as well and (2) allows this to be controlled in a completely independent and analogous manner to target release. I would appreciate seeing this in 5.0.30 :-) -- Jess Holle --- JspC.java 2004-10-05 13:30:36.0 -0500 +++ JspC.java-new 2004-10-18 15:11:30.851472700 -0500 @@ -98,6 +98,8 @@ private static final String SWITCH_CLASS_NAME = -c; private static final String SWITCH_FULL_STOP = --; private static final String SWITCH_COMPILE = -compile; +private static final String SWITCH_SOURCE = -source; +private static final String SWITCH_TARGET = -target; private static final String SWITCH_URI_BASE = -uribase; private static final String SWITCH_URI_ROOT = -uriroot; private static final String SWITCH_FILE_WEBAPP = -webapp; @@ -145,6 +147,7 @@ private String compiler = null; private String compilerTargetVM = 1.3; +private String compilerSourceVM = 1.3; private boolean classDebugInfo = true; private Vector extensions; @@ -276,6 +279,10 @@ } } else if (tok.equals(SWITCH_ENCODING)) { setJavaEncoding(nextArg()); +} else if (tok.equals(SWITCH_SOURCE)) { +setCompilerSourceVM(nextArg()); +} else if (tok.equals(SWITCH_TARGET)) { +setCompilerTargetVM(nextArg()); } else { if (tok.startsWith(-)) { throw new JasperException(Unrecognized option: + tok + @@ -479,6 +486,22 @@ compilerTargetVM = vm; } +/** + * @see Options#getCompilerSourceVM. + */ +public String getCompilerSourceVM() +{ + return compilerSourceVM; +} + +/** + * @see Options#getCompilerSourceVM. + */ +public void setCompilerSourceVM( String vm ) +{ + compilerSourceVM = vm; +} + public TldLocationsCache getTldLocationsCache() { return tldLocationsCache; } @@ -1156,5 +1179,4 @@ // pass straight through } } - } --- Options.java2004-10-05 13:30:36.0 -0500 +++ Options.java-new2004-10-18 14:46:30.631270600 -0500 @@ -117,11 +117,16 @@ public String getCompiler(); /** - * Compiler target VM, e.g. 1.1,1.2,1.3, or 1.4. + * Compiler target VM, e.g. 1.1, 1.2, 1.3, 1.4, or 1.5. */ public String getCompilerTargetVM(); /** + * Compiler source VM, e.g. 1.3, 1.4, or 1.5. + */ +public String getCompilerSourceVM(); + +/** * The cache for the location of the TLD's * for the various tag libraries 'exposed' * by the web application. --- Compiler.java 2004-10-05 13:30:36.0 -0500 +++ Compiler.java-new 2004-10-18 14:44:05.863104200 -0500 @@ -386,6 +386,11 @@ info.append( compilerTargetVM= + options.getCompilerTargetVM() + \n); } +if (options.getCompilerSourceVM() != null) { +javac.setSource(options.getCompilerSourceVM()); +info.append( compilerSourceVM= + options.getCompilerSourceVM() + \n); +} + // Build includes path PatternSet.NameEntry includes = javac.createInclude(); --- EmbeddedServletOptions.java 2004-10-05 13:30:36.0 -0500 +++ EmbeddedServletOptions.java-new 2004-10-18 14:42:33.480264200 -0500 @@ -144,6 +144,11 @@ private String compilerTargetVM = 1.3; /** + * The compiler source VM (1.3 by default). + */ +private String compilerSourceVM = 1.3; + +/** * Cache for the TLD locations */ private TldLocationsCache tldLocationsCache = null; @@ -303,6 +308,14 @@ return compilerTargetVM; } +/** + * @see Options#getCompilerSourceVM + */ +public String getCompilerSourceVM() +{ + return compilerSourceVM; +} + public boolean getErrorOnUseBeanInvalidClassAttribute() { return errorOnUseBeanInvalidClassAttribute; } @@ -571,6 +584,11 @@ this.compilerTargetVM = compilerTargetVM; } +String compilerSourceVM = config.getInitParameter(compilerSourceVM); +if(compilerSourceVM != null) { +this.compilerSourceVM = compilerSourceVM; +} + String javaEncoding = config.getInitParameter(javaEncoding); if (javaEncoding != null) { this.javaEncoding = javaEncoding; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 5.0.29 JSP compilation fails when using JDK 1.5.0
Any chance of a 5.0.30 with this resolved in the near future? [I take it you're back from vacation, Yoav, as I see CVS commit notices with your name on them.] -- Jess Holle Shapira, Yoav wrote: Hi, Thanks for spotting and reporting this issue. While Tomcat 5.0.x doesn't officially support J2SE 5.0, we don't want to make things worse with new releases ;) So my apologize for this issue. I'm really busy today and tomorrow at work, and then I'm traveling this weekend [it's a long holiday weekend in the US]. If someone could at least post a .diff patch to fix this, I'd be grateful and I'll try to commit it quickly. If we wait for me, this issue might have to wait a few days ;) Thanks, Yoav Shapira Millennium Research Informatics -Original Message- From: Jess Holle [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 3:55 PM To: Tomcat Developers List Subject: 5.0.29 JSP compilation fails when using JDK 1.5.0 Tomcat 5.0.28 compiled JSP pages when run using JDK 1.5.0 just fine (out-of-the-box). Also, 5.0.28 seems to work fine under JDK 1.5.0 in general. Tomcat 5.0.29 can no longer compile JSP pages when running under JDK 1.5.0! Given that 1.5.0 has been released and 5.0.28 works fine, I believe this is a serious regression in 5.0.29 that should by itself prevent it from getting a stable rating -- though I'd love to quickly see a 5.0.30 including a fix for this :-) [Tomcat 5.0.29 does seem to work alright under 1.5.0 if you pre-compile all JSP pages via an Ant project...] Note that the startup environment, JSP pages, etc, are identical in both cases. In both cases I use catalina.50.bat start. Also note that the JSP pages use no 1.5 features whatsoever -- I'm just trying to run with JDK 1.5.0. Also, both results hold both for development Jasper settings (fork=false, development=true, reloading=true) and production Jasper settings (fork=true, development=false, reloading=false). The symptom when this fails is the following console message: javac: target release 1.3 conflicts with default source release 1.5 I am *guessing* this may have something to do with the following change log entry: 30984 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30984: Added compilerTargetVM option to Jasper. (yoavs) -- Jess Holle This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 5.0.29 JSP compilation fails when using JDK 1.5.0
Hi, Thanks for spotting and reporting this issue. While Tomcat 5.0.x doesn't officially support J2SE 5.0, we don't want to make things worse with new releases ;) So my apologize for this issue. I'm really busy today and tomorrow at work, and then I'm traveling this weekend [it's a long holiday weekend in the US]. If someone could at least post a .diff patch to fix this, I'd be grateful and I'll try to commit it quickly. If we wait for me, this issue might have to wait a few days ;) Thanks, Yoav Shapira Millennium Research Informatics -Original Message- From: Jess Holle [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 3:55 PM To: Tomcat Developers List Subject: 5.0.29 JSP compilation fails when using JDK 1.5.0 Tomcat 5.0.28 compiled JSP pages when run using JDK 1.5.0 just fine (out-of-the-box). Also, 5.0.28 seems to work fine under JDK 1.5.0 in general. Tomcat 5.0.29 can no longer compile JSP pages when running under JDK 1.5.0! Given that 1.5.0 has been released and 5.0.28 works fine, I believe this is a serious regression in 5.0.29 that should by itself prevent it from getting a stable rating -- though I'd love to quickly see a 5.0.30 including a fix for this :-) [Tomcat 5.0.29 does seem to work alright under 1.5.0 if you pre-compile all JSP pages via an Ant project...] Note that the startup environment, JSP pages, etc, are identical in both cases. In both cases I use catalina.50.bat start. Also note that the JSP pages use no 1.5 features whatsoever -- I'm just trying to run with JDK 1.5.0. Also, both results hold both for development Jasper settings (fork=false, development=true, reloading=true) and production Jasper settings (fork=true, development=false, reloading=false). The symptom when this fails is the following console message: javac: target release 1.3 conflicts with default source release 1.5 I am *guessing* this may have something to do with the following change log entry: 30984 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30984: Added compilerTargetVM option to Jasper. (yoavs) -- Jess Holle This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]