[g...@vmgump]: Project tomcat-trunk-dbcp (in module tomcat-trunk) failed

2010-04-25 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-dbcp has an issue affecting its community integration.
This issue affects 3 projects,
 and has been outstanding for 32 runs.
The current state of this project is 'Failed', with reason 'Missing Build 
Outputs'.
For reference only, the following projects are affected by this:
- tomcat-trunk :  Java Servlet 3.0, Java Server Pages 2.2 & Expression 
Languag...
- tomcat-trunk-dbcp :  Java Servlet 3.0, Java Server Pages 2.2 & Expression 
Languag...
- tomcat-trunk-test :  Java Servlet 3.0, Java Server Pages 2.2 & Expression 
Languag...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-dbcp/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -ERROR- Multiple outputs defined by project tomcat-trunk-dbcp; an id attribute 
is required to select the one you want
 -ERROR- Unhandled Property: tomcat-dbcp.jar on: Ant on 
Project:tomcat-trunk-dbcp
 -INFO- Made directory [/srv/gump/public/workspace/tomcat-trunk/tomcat-deps]
 -INFO- Failed with reason missing build outputs
 -ERROR- Missing Output: 
/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-25042010.jar
 -ERROR- See Directory Listing Work for Missing Outputs
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-dbcp/gump_work/build_tomcat-trunk_tomcat-trunk-dbcp.html
Work Name: build_tomcat-trunk_tomcat-trunk-dbcp (Type: Build)
Work ended in a state of : Success
Elapsed: 5 secs
Command Line: /usr/lib/jvm/java-6-sun/bin/java -Djava.awt.headless=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only 
-Dcommons-collections.home=/srv/gump/public/workspace/commons-collections-3.x/collections
 -Dcommons-dbcp.home=/srv/gump/public/workspace/apache-commons/dbcp 
-Dtomcat-dbcp.jar=*Unset* 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps 
-Dcommons-pool.home=/srv/gump/public/workspace/apache-commons/pool 
build-tomcat-dbcp 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-6-sun/lib/tools.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/packages/jta-spec1_0_1/jta-spec1_0_1.jar
-
Buildfile: /srv/gump/public/workspace/tomcat-trunk/build.xml

build-prepare:
[mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/classes
[mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/build
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/bin
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/conf
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/lib
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/logs
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/temp
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/webapps

build-manifests:
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/manifests
 [copy] Copying 16 files to 
/srv/gump/public/workspace/tomcat-trunk/output/manifests

build-tomcat-dbcp:
 [copy] Copying 68 files to 
/srv/gump/public/workspace/tomcat-trunk/tomcat-deps
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/src/java/org/apache/tomcat/dbcp
 [move] Moving 64 files to 
/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/src/java/org/apache/tomcat/dbcp
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/classes
[javac] Compiling 64 source files to 
/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
  [jar] Building jar: /srv/gump/public/workspace/tomcat-trunk/*Unset*
  [jar] Building jar: 
/srv/gump/public/workspace/tomc

Re: svn commit: r937288 - in /tomcat/trunk/java/org/apache/catalina: Context.java core/StandardContext.java startup/ContextConfig.java startup/LocalStrings.properties

2010-04-25 Thread Pid
On 24/04/2010 00:07, Mark Thomas wrote:
> On 23/04/2010 16:51, Pid wrote:
>> Are ServletContainerInitializer implementations also discovered from the
>> common classloader automatically?
> 
> They should be, providing the JAR isn't listed as one of the JARs to
> skip for annotations. But I haven't tested it...

I'm not getting an SCI onStartup method to fire at all at the moment, in
a WEB-INF/lib/sci-test.jar, in WEB-INF/classes, or in the common
classloader.

> I'd need to check the spec but AFAICR the spec says they only *have* to
> be found in the web app.

I'd formed the impression that the intention is/was that they could be
found in the entire classloader tree, from the reference to the
discovery mechanism being semantically equivalent to the jar services
mechanism and the suggestion that a JSP container could be implemented
this way.  I'm finding Servlet 3.0 a little opaque in parts.


p


> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 




signature.asc
Description: OpenPGP digital signature


Re: svn commit: r937288 - in /tomcat/trunk/java/org/apache/catalina: Context.java core/StandardContext.java startup/ContextConfig.java startup/LocalStrings.properties

2010-04-25 Thread Mark Thomas
On 25/04/2010 10:53, Pid wrote:
> On 24/04/2010 00:07, Mark Thomas wrote:
>> On 23/04/2010 16:51, Pid wrote:
>>> Are ServletContainerInitializer implementations also discovered from the
>>> common classloader automatically?
>>
>> They should be, providing the JAR isn't listed as one of the JARs to
>> skip for annotations. But I haven't tested it...
> 
> I'm not getting an SCI onStartup method to fire at all at the moment, in
> a WEB-INF/lib/sci-test.jar, in WEB-INF/classes, or in the common
> classloader.

Just tried a clean TC7 build. Looks like I've managed to break this.
Looking at a fix now...

>> I'd need to check the spec but AFAICR the spec says they only *have* to
>> be found in the web app.
> 
> I'd formed the impression that the intention is/was that they could be
> found in the entire classloader tree, from the reference to the
> discovery mechanism being semantically equivalent to the jar services
> mechanism and the suggestion that a JSP container could be implemented
> this way.  I'm finding Servlet 3.0 a little opaque in parts.

Having re-read section 8.2, the implication is that they should be found
in the entire tree. The default configuration should do this.

Mark



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r937778 - /tomcat/trunk/conf/catalina.properties

2010-04-25 Thread markt
Author: markt
Date: Sun Apr 25 11:21:41 2010
New Revision: 937778

URL: http://svn.apache.org/viewvc?rev=937778&view=rev
Log:
Update ignore list now ecj-x.x.x.jar is used directly

Modified:
tomcat/trunk/conf/catalina.properties

Modified: tomcat/trunk/conf/catalina.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/catalina.properties?rev=937778&r1=93&r2=937778&view=diff
==
--- tomcat/trunk/conf/catalina.properties (original)
+++ tomcat/trunk/conf/catalina.properties Sun Apr 25 11:21:41 2010
@@ -89,7 +89,7 @@ tomcat.util.scan.DefaultJarScanner.jarsT
 bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
 annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
 catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
-jasper.jar,jasper-el.jar,jasper-jdt.jar,\
+jasper.jar,jasper-el.jar,ecj-3.5.1.jar,\
 tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
 tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
 commons-beanutils.jar,commons-collections.jar,commons-dbcp.jar,\



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r937779 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

2010-04-25 Thread markt
Author: markt
Date: Sun Apr 25 11:24:41 2010
New Revision: 937779

URL: http://svn.apache.org/viewvc?rev=937779&view=rev
Log:
Fix SCI when there is more than one JAR on the classpath

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=937779&r1=937778&r2=937779&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Sun Apr 25 
11:24:41 2010
@@ -1346,7 +1346,7 @@ public class ContextConfig
 }
 
 if (sci == null) {
-break;
+continue;
 }
 
 initializerClassMap.put(sci, new HashSet>());



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r937781 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

2010-04-25 Thread markt
Author: markt
Date: Sun Apr 25 11:26:29 2010
New Revision: 937781

URL: http://svn.apache.org/viewvc?rev=937781&view=rev
Log:
Fix leftover bug from changing the design

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=937781&r1=937780&r2=937781&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Sun Apr 25 
11:26:29 2010
@@ -1358,7 +1358,7 @@ public class ContextConfig
 if (types != null) {
 for (Class type : types) {
 Set scis =
-typeInitializerMap.get(type.getCanonicalName());
+typeInitializerMap.get(type);
 if (scis == null) {
 scis = new HashSet();
 typeInitializerMap.put(type, scis);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r937787 - in /tomcat/trunk: conf/ java/org/apache/jasper/ java/org/apache/jasper/compiler/ java/org/apache/jasper/resources/ java/org/apache/jasper/servlet/ java/org/apache/jasper/util/ we

2010-04-25 Thread markt
Author: markt
Date: Sun Apr 25 12:19:19 2010
New Revision: 937787

URL: http://svn.apache.org/viewvc?rev=937787&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48358
Add the ability to limit the number of JSPs loaded at any one time.

Added:
tomcat/trunk/java/org/apache/jasper/util/Entry.java   (with props)
tomcat/trunk/java/org/apache/jasper/util/JspQueue.java   (with props)
Modified:
tomcat/trunk/conf/web.xml
tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java
tomcat/trunk/java/org/apache/jasper/JspC.java
tomcat/trunk/java/org/apache/jasper/Options.java
tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/jasper-howto.xml

Modified: tomcat/trunk/conf/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=937787&r1=937786&r2=937787&view=diff
==
--- tomcat/trunk/conf/web.xml (original)
+++ tomcat/trunk/conf/web.xml Sun Apr 25 12:19:19 2010
@@ -185,6 +185,14 @@
   
   
   
+  
+  
+  
+  
+  
+  
+  
+  
   
   
   

Modified: tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java?rev=937787&r1=937786&r2=937787&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java (original)
+++ tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java Sun Apr 25 
12:19:19 2010
@@ -186,6 +186,12 @@ public final class EmbeddedServletOption
 private boolean displaySourceFragment = true;
 
 
+/**
+ * The maxim number of loaded jsps per web-application. If there are more
+ * jsps loaded, they will be unloaded.
+ */
+private int maxLoadedJsps = -1;
+
 public String getProperty(String name ) {
 return settings.getProperty( name );
 }
@@ -383,6 +389,14 @@ public final class EmbeddedServletOption
 }
 
 /**
+ * Should any jsps be unloaded? If set to a value greater than 0 eviction 
of jsps
+ * is started. Default: -1
+ * */
+public int getMaxLoadedJsps() {
+return maxLoadedJsps;
+}
+
+/**
  * Create an EmbeddedServletOptions object using data available from
  * ServletConfig and ServletContext. 
  */
@@ -663,6 +677,17 @@ public final class EmbeddedServletOption
 }
 }
 
+String maxLoadedJsps = config.getInitParameter("maxLoadedJsps");
+if (maxLoadedJsps != null) {
+try {
+this.maxLoadedJsps = Integer.parseInt(maxLoadedJsps);
+} catch(NumberFormatException ex) {
+if (log.isWarnEnabled()) {
+log.warn(Localizer.getMessage("jsp.warning.maxLoadedJsps", 
""+this.maxLoadedJsps));
+}
+}
+}
+
 // Setup the global Tag Libraries location cache for this
 // web-application.
 tldLocationsCache = new TldLocationsCache(context);

Modified: tomcat/trunk/java/org/apache/jasper/JspC.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=937787&r1=937786&r2=937787&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/JspC.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspC.java Sun Apr 25 12:19:19 2010
@@ -444,6 +444,10 @@ public class JspC implements Options {
 return true;
 }
 
+public int getMaxLoadedJsps() {
+return -1;
+}
+
 /**
  * {...@inheritdoc}
  */

Modified: tomcat/trunk/java/org/apache/jasper/Options.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/Options.java?rev=937787&r1=937786&r2=937787&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/Options.java (original)
+++ tomcat/trunk/java/org/apache/jasper/Options.java Sun Apr 25 12:19:19 2010
@@ -221,4 +221,10 @@ public interface Options {
  */
 public Map getCache();
 
+/**
+ * The maxim number of loaded jsps per web-application. If there are more
+ * jsps loaded, they will be unloaded. If unset or less than 0, no jsps
+ * are unloaded.
+ */
+public int getMaxLoadedJsps();
 }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java?rev=937787&r1=937786&r2=937787&view=diff
==

DO NOT REPLY [Bug 48358] JSP-unloading reloaded

2010-04-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48358

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #9 from Mark Thomas  2010-04-25 08:21:56 EDT ---
Thanks for the patch. It has been applied to 7.0.x and will be included in
7.0.0.

I had to make a few changes:
- correct indentation
- add documentation
- add AL2 headers

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49183] Odd code in setclasspath.sh

2010-04-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49183

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Mark Thomas  2010-04-25 08:40:15 EDT ---
See the svn history for why. Since someone who has access to os400 provided the
patch and I don't have access to that OS to test any changes, I am not going to
second guess them because something looks 'odd'.

"If it ain't broke, don't fix it."

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49184] New: Index out of bounds exception thrown when dynamically adding Filter

2010-04-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49184

   Summary: Index out of bounds exception thrown when dynamically
adding Filter
   Product: Tomcat 7
   Version: trunk
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: bugzi...@pidster.com


When dynamically adding a filter to a context an exception is thrown.

java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.catalina.core.StandardContext.addFilterMapBefore(StandardContext.java:2629)
at
org.apache.catalina.core.ApplicationFilterRegistration.addMappingForServletNames(ApplicationFilterRegistration.java:75)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49184] Index out of bounds exception thrown when dynamically adding Filter

2010-04-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49184

--- Comment #1 from Pid  2010-04-25 08:55:42 EDT ---
Created an attachment (id=25349)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25349)
Corrects index in arraycopy operation

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r937791 - in /tomcat/trunk: java/org/apache/jasper/ java/org/apache/jasper/compiler/ java/org/apache/jasper/servlet/ webapps/docs/

2010-04-25 Thread markt
Author: markt
Date: Sun Apr 25 12:56:32 2010
New Revision: 937791

URL: http://svn.apache.org/viewvc?rev=937791&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48689
Access TLD files through a new JarResource interface to make extending Jasper 
simpler, particularly in OSGi environments.
Patch provided by Jarek Gawor.

Added:
tomcat/trunk/java/org/apache/jasper/compiler/JarResource.java   (with props)
tomcat/trunk/java/org/apache/jasper/compiler/JarURLResource.java   (with 
props)
tomcat/trunk/java/org/apache/jasper/compiler/TldLocation.java   (with props)
Modified:
tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java
tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=937791&r1=937790&r2=937791&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Sun Apr 25 
12:56:32 2010
@@ -30,10 +30,12 @@ import javax.servlet.ServletContext;
 import javax.servlet.jsp.tagext.TagInfo;
 
 import org.apache.jasper.compiler.Compiler;
+import org.apache.jasper.compiler.JarResource;
 import org.apache.jasper.compiler.JspRuntimeContext;
 import org.apache.jasper.compiler.JspUtil;
 import org.apache.jasper.compiler.Localizer;
 import org.apache.jasper.compiler.ServletWriter;
+import org.apache.jasper.compiler.TldLocation;
 import org.apache.jasper.servlet.JasperLoader;
 import org.apache.jasper.servlet.JspServletWrapper;
 import org.apache.juli.logging.Log;
@@ -57,7 +59,7 @@ public class JspCompilationContext {
 
 private final Log log = LogFactory.getLog(JspCompilationContext.class); // 
must not be static
 
-protected Map tagFileJarUrls;
+protected Map tagFileJarUrls;
 protected boolean isPackagedTagFile;
 
 protected String className;
@@ -91,7 +93,7 @@ public class JspCompilationContext {
 protected boolean isTagFile;
 protected boolean protoTypeMode;
 protected TagInfo tagInfo;
-protected URL tagFileJarUrl;
+protected JarResource tagJarResource;
 
 // jspURI _must_ be relative to the context
 public JspCompilationContext(String jspUri,
@@ -121,7 +123,7 @@ public class JspCompilationContext {
 }
 
 this.rctxt = rctxt;
-this.tagFileJarUrls = new HashMap();
+this.tagFileJarUrls = new HashMap();
 this.basePackageName = Constants.JSP_PACKAGE_NAME;
 }
 
@@ -131,12 +133,12 @@ public class JspCompilationContext {
  ServletContext context,
  JspServletWrapper jsw,
  JspRuntimeContext rctxt,
- URL tagFileJarUrl) {
+ JarResource tagJarResource) {
 this(tagfile, false, options, context, jsw, rctxt);
 this.isTagFile = true;
 this.tagInfo = tagInfo;
-this.tagFileJarUrl = tagFileJarUrl;
-if (tagFileJarUrl != null) {
+this.tagJarResource = tagJarResource;
+if (tagJarResource != null) {
 isPackagedTagFile = true;
 }
 }
@@ -288,12 +290,12 @@ public class JspCompilationContext {
 
 if (res.startsWith("/META-INF/")) {
 // This is a tag file packaged in a jar that is being compiled
-URL jarUrl = tagFileJarUrls.get(res);
-if (jarUrl == null) {
-jarUrl = tagFileJarUrl;
+JarResource jarResource = tagFileJarUrls.get(res);
+if (jarResource == null) {
+jarResource = tagJarResource;
 }
-if (jarUrl != null) {
-result = new URL(jarUrl.toExternalForm() + res.substring(1));
+if (jarResource != null) {
+result = jarResource.getEntry(res.substring(1));
 } else {
 // May not be in a JAR in some IDE environments
 result = context.getResource(canonicalURI(res));
@@ -333,12 +335,12 @@ public class JspCompilationContext {
  * The map is populated when parsing the tag-file elements of the TLDs
  * of any imported taglibs. 
  */
-public URL getTagFileJarUrl(String tagFi

DO NOT REPLY [Bug 48689] Jar abstraction for Jasper

2010-04-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from Mark Thomas  2010-04-25 08:57:13 EDT ---
Thanks for the patch. It has been applied to 7.0.x and will be included in
7.0.0 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49183] Odd code in setclasspath.sh

2010-04-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49183

Sebb  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |

--- Comment #2 from Sebb  2010-04-25 10:15:21 EDT ---
I've had a look at the svn history for the file in Tomcat7 and Tomcat6 - in
both cases the file was added with the code already there.

However, I eventually found the change, which was:

r303487 17/11/04 yoavs Bugzilla 31132: better -x/-r handling for OS/400 in
startup scripts.

Now the text of the bug does NOT include the eval, whereas the patch does.
So it looks to me as if the eval is probably spurious.

In any case, I think it would be helpful to provide a link to the Bugzilla
issue in case the question comes up again later. 

The existing comment is incomplete, because -r is also affected by the same
problem.

Docn patch to follow.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Memory leak detection and JVMTI

2010-04-25 Thread Sylvain Laurent
I don't understand what would be the purpose of this feature. Is it in order to 
really force a GC when clicking on the "Find leaks" button of the manager ? If 
it's for that, I don't think it's worth the trouble. People really interested 
in fixing their leaking webapps should take a snapshot of the heap and analyze 
it to confirm (as advised by the manager page) and find the origin of the leak.

Just my personal feeling...

Sylvain


On 22 avr. 2010, at 11:43, Rainer Jung wrote:

> Just a short note: I stumbled over the "ForceGarbageCollection" JVMTI 
> function today. It reliably triggers a full GC and the call only returns 
> after having run the GC. It will do so, even when System.gc() is disabled. It 
> looks like it doesn't respect ExplicitGCInvokesConcurrent, so it will always 
> do a stop-the-world collection leading to possibly long stop times but also 
> to defragmented tenured space.
> 
> As always, it is not expected, that the finalizers will be run.
> 
> Maybe something we could add to tcnative. Since the call is stateless, adding 
> it should be simple, just implementing Agent_OnLoad to initialize the JVMTI 
> environmnt using GetEnv() and then making ForceGarbageCollection(env) 
> publicly accessible. One must also register the JVMTi agent using e.g. the 
> "-agentlib" startup option.
> 
> I don't know, whether that would lead to a problem with duplicate library 
> loading, in which case one would have to separate it from tcnative.
> 
> Caution: this is all form looking at docs and code, no tests done yet.
> 
> Regards,
> 
> Rainer
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Closing Jakarta mailing lists: servletapi-dev and watchdog-dev

2010-04-25 Thread Rahul Akolkar
[Please reply to gene...@jakarta or atleast include it]

Jakarta has two mailing lists that were at some point relevant to the
Tomcat folks and have been unused since Nov '02. I am proposing we
close the lists, with forwards in place to d...@tomcat.

If there are compelling reasons to maintain the lists, please respond
within the next month. If they must be maintained, I'll suggest they
be moved under the purview of the Tomcat PMC.

No sooner than May 25th, I will request infra close these lists.

-Rahul

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49183] Odd code in setclasspath.sh

2010-04-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49183

--- Comment #3 from Konstantin Kolinko  2010-04-25 
23:07:58 EDT ---
The alone "eval" makes perfect sense to me.
It is a noop operation that is needed there to be between 'then' and 'else'.
See e.g. the ':' operation aka colon in POSIX shell:
http://www.opengroup.org/onlinepubs/009695399/utilities/colon.html

catalina.sh and tool-wrapper.sh do a check for "-r setclasspath.sh", so we can
do the same here, though I doubt that this difference is of any practical
importance.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Moving VirtualWebappLoader into WebappLoader for trunk?

2010-04-25 Thread Konstantin Kolinko
2010/4/23 Rainer Jung :
> There is a previously undocumented VirtualWebappLoader, which extends
> WebappLoader and allows to add search paths (repositories) to the webapp
> class loader.
>
>(...)
> Since the feature seems to be nice e.g. for
> loading or overwriting configs from outside of the war I'm wondering whether
> we should actually put it into WebappLoader.
>
> If so, we should:
>
> - deprecate VirtualWebappLoader in TC 6
>
> - remove it in TC 7
>
> - decide, whether we stick to the notation "virtualClasspath" used at the
> moment, or "externalRepositories" or similar, which would be more consistent
> with the class internals. I have a tendency for "externalRepositories".
>

1. The class is commented as "This is not meant to be used for
production. Its meant to ease development with IDE's without the need
for fully republishing jars in WEB-INF/lib"

Essentially it is a wrapper for API that is already provided by
WebappLoader, so it is already supported. E.g., just recently we have
fixed some class loader locking bugs that occur when running with
external repositories  (well, fixed in 5.5.  In 6.0 that BZ 48903
patch waits for the third vote).

I am +1 to move the implementation to WebappLoader and
+1 to use the same naming as WebappLoader/WebappClassLoader are using:
"external repositories".

2. Regarding proposed "deprecation" or "removal":

I am -0 to deprecating this class in 6.0, unless this feature is
backported there.

In 7.0 we can just remove this class, and add a note to
site/trunk/xdocs/migration.xml.  I prefer to remove it.


3. Regarding the performance of these external repositories I have some doubts.

It is implemented by passing the JARs an URLClassLoader. I hope that
these JARs are not reopened and scanned for each class that is being
loaded (have not tested/debugged here, so it is a speculation). It is
a bit strange to combine two JAR handling mechanics in the same
WebappClassLoader class.

BTW:
I know that WebappClassLoader#closeJARs() closes JARs after some time
(after webapp started and after some time (90 seconds + average time
between background cycles) after last class load activity, IIRC) and
then reopens them all next time a class from the webapp is loaded.
If we face something like that I would like to have it in our
hands/have it controllable. If it is provided by a base class
(URLClassLoader), we might not have much control there.


4. VirtualWebappLoader serves as an example how to configure 
element in the context file.  The configuration attributes for
WebappLoader are usually provided by StandardContext class, so it is
reasonable to add these new attributes there as well.


PS. Among the classes in o/a/catalina/** of trunk the
WebappClassLoader is the second by its size (116 Kb/3241 lines), and
StandardContext is the first (184 Kb/5994 lines).

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Question about context aliases

2010-04-25 Thread Konstantin Kolinko
2010/4/23 Mark Thomas :
> On 23/04/2010 12:30, Rainer Jung wrote:
>> On 23.04.2010 12:04, Mark Thomas wrote:
>>> On 23/04/2010 10:51, Rainer Jung wrote:
 On 22.04.2010 18:51, Mark Thomas wrote:
> On 22/04/2010 17:40, Rainer Jung wrote:
>> Experimenting on the extreme side of things: when trying to use
>> aliases="/=/some/path" I can't get any resource to load:
>>
>> - there is /some/path/test.properties
>> - servletContext().getResourceAsStream("/test.properties") returns
>> null.
>>
>> It works, once I use aliases="/myapp=/some/path" and
>> servletContext().getResourceAsStream("/myapp/test.properties").
>>
>> Is that expected?
>
> Nope. Thats broken.

 I see, it was because you need to remove the trailing slash and for "/"
 the trailing slash is the leading one too.

 Now using an alias with "/" naively seems to make not much sense (the
 webapps will break unless you move everything there).
>>>
>>> Indeed. You might as well just change the docBase.
>>>
 I thought about
 using slash in order to overwrite stuff. So the expected behaviour for
 an alias using "/" would be to only use the alias results, if something
 was actually found under the alias.

 I prepared a patch for that:

 http://people.apache.org/~rjung/patches/BaseDirContext_Alias_20100423a.patch


 What do you think?
>>>
>>> I think that this, combined the support for resources in JARs under
>>> META-INF/resources is adding too much complexity. Let's keep things
>>> simple unless there is a use case the current functionality can't meet.
>>
>> OK, so should we disallow "/" as an alias, or fix the trailing slash
>> thing and let the user live with the resulting behaviour? I'd say it
>> then makes more sense to disallow "/" (log a startup error) and document
>> that and the hint about docBase. I can make the adjustments if you like
>> (and agree).
>
> Agree, disallowing / seems the right way to go here. Go for it!
>

If there are resources in the web application for the same path as
covered by an alias, these webapp resources will be ignored?   I.e.,
configuring an alias in context.xml can be used to overwrite parts of
the web application?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Tomcat 4.1.31 - HTTPS not working intermittently | “Page Cannot be Displayed”

2010-04-25 Thread :)
We are facing this error intermittently. If we restart the server it works
for some time and again the problem start.

We also have another load balanced server with similar configuration and
that is working fine.

The server is running on Linux box. If we do the "ps -ef" its listing the
TOMCAT process.

URL : https://xyz.abc.com:9234/axis/servlet/AxisServlet

Following the configuration in server.xml file.

 

  




   - Is it the problem with our load balancer which is forwarding most
   requests to this server?
   - Is it any way related to the "maxProcessors" or "acceptCount"
   attributes defined in the above configuration?
   - Is it the problem with the port number??
   - Does it have to do any thing with the certificate. The certificate is
   generated using Java Keytool. ( However, the other load balanced server is
   also using the same certificate and working fine)

Please suggest in resolving this issue. thanks

jai





-- 
Smile Often ;)