new bound datasoure on the fly is not visible to other applicaitons

2008-05-22 Thread shunhecun

hi,

On Tomcat, the new bound datasource on the fly is only visible for the
current application. Other applications can not find it on the fly.

Comparing to OC4J and Weblogic server, by calling the same codes, the new
bound datasource will be visible to all applications. 

Should Tomcat support this feature or it is a bug?

   Context initContext = new InitialContext();
   initContext.bind(datasourceName,dataSourceObject);


Regards,
cun
-- 
View this message in context: 
http://www.nabble.com/new-bound-datasoure-on-the-fly-is-not-visible-to-other-applicaitons-tp17401478p17401478.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 44725] Tomcat delete context.xml and web. xml if re-naming Folders in CONF

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44725


Andreas Sahlbach <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Comment #2 from Andreas Sahlbach <[EMAIL PROTECTED]>  2008-05-22 03:37:01 
PST ---
IMHO this is still a bug. 

A server should _never_ever_ delete any kind of configuration file. Disable it
somehow, move it somewhere else, rename it, whatever. But don't dare to delete
it. This configuration file can contain very valuable configurations, even
secrets that can be hard to recover. Deleting it is simply wrong.

And please point me to the part of the documentation that describes this
dreaded behaviour so that I can turn it off.Thank you.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 45063] New: JK-1.2. 26 IIS ISAPI filter issue when running different identities running apppools

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45063

   Summary: JK-1.2.26 IIS ISAPI filter issue when running different
identities running apppools
   Product: Tomcat 4
   Version: Unknown
  Platform: PC
OS/Version: Windows Server 2003
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connector:JK/AJP
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


We have seen that the Jakarta Redirect ISAPI filter can crash IIS 6.0 AppPools
in the following senario.

1- Two AppPools are running under the identity of different accounts. (Non
admin accounts.)
2- The first AppPool has started (someone hits the web app associated with it),
if the second AppPool tries to start up, it will fail since the filter is
currently controlled by the first AppPool account.

Basically it comes down to an illegal memory reference being made to the ISAPI
filter.  Since the ISAPI filter works if the user is part of the admin group,
we can suppose that there is a write permissions issue that is covered up by
using elevated accounts.

ChildEBP RetAddr  Args to Child  
0104bc94 7c83d281 046c 0004 
ntdll!RtlpWaitOnCriticalSection+0xdf
0104bcb4 6a6c400b 6a6e11ec 6a6bf741 01cc8310 ntdll!RtlEnterCriticalSection+0xa8
WARNING: Stack unwind information not available. Following frames may be wrong.
0104bcbc 6a6bf741 01cc8310  6a6e6168
isapi_redirect!TerminateFilter+0x810b
0104bcd0 6a6d2dbf 01cca890 01cc7f90 6a6e6168
isapi_redirect!TerminateFilter+0x3841
0104bcfc 6a6d30f6 01cc8310 0001 01cc7f90
isapi_redirect!TerminateFilter+0x16ebf
0104bd2c 6a6d2a66 01cc7f90 01cc82f8 0002
isapi_redirect!TerminateFilter+0x171f6
    
isapi_redirect!TerminateFilter+0x16b66


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r659117 - in /tomcat/connectors/trunk/jk: native/common/jk_global.h xdocs/miscellaneous/changelog.xml

2008-05-22 Thread rjung
Author: rjung
Date: Thu May 22 07:21:13 2008
New Revision: 659117

URL: http://svn.apache.org/viewvc?rev=659117&view=rev
Log:
Fix Cygwin build.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_global.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?rev=659117&r1=659116&r2=659117&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Thu May 22 07:21:13 
2008
@@ -138,7 +138,7 @@
 #include 
 #include 
 #include 
-#if !defined(_OSD_POSIX) && !defined(AS400) && !defined(CYGWIN) && 
!defined(HPUX11)
+#if !defined(_OSD_POSIX) && !defined(AS400) && !defined(__CYGWIN__) && 
!defined(HPUX11)
 #include 
 #endif
 #if !defined(HPUX11) && !defined(AS400)

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=659117&r1=659116&r2=659117&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu May 22 
07:21:13 2008
@@ -43,6 +43,9 @@
   
   
 
+  
+Fix Cygwin build. (rjung)
+  
   
 Add info to docs, that variables sent via JkEnvVar
 are not listed in request.getAttributeNames(). (rjung)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r658474 - in /tomcat/tc6.0.x/trunk: java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java webapps/docs/changelog.xml webapps/docs/config/http.xml

2008-05-22 Thread Filip Hanik - Dev Lists
removing (or changing signatures) for non-private methods, shouldn't 
they be @deprecated for a while?


Filip

[EMAIL PROTECTED] wrote:

Author: markt
Date: Tue May 20 15:54:32 2008
New Revision: 658474

URL: http://svn.apache.org/viewvc?rev=658474&view=rev
Log:
Fix remainder of https://issues.apache.org/bugzilla/show_bug.cgi?id=43094
Provide options for selecting keystore providers

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=658474&r1=658473&r2=658474&view=diff
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
 Tue May 20 15:54:32 2008
@@ -249,38 +249,39 @@
 /*
  * Gets the SSL server's keystore.
  */
-protected KeyStore getKeystore(String type, String pass)
+protected KeyStore getKeystore(String type, String provider, String pass)
 throws IOException {
 
 String keystoreFile = (String)attributes.get("keystore");

 if (keystoreFile == null)
 keystoreFile = defaultKeystoreFile;
 
-return getStore(type, keystoreFile, pass);

+return getStore(type, provider, keystoreFile, pass);
 }
 
 /*

  * Gets the SSL server's truststore.
  */
-protected KeyStore getTrustStore(String keystoreType) throws IOException {
+protected KeyStore getTrustStore(String keystoreType,
+String keystoreProvider) throws IOException {
 KeyStore trustStore = null;
 
-String trustStoreFile = (String)attributes.get("truststoreFile");

-if(trustStoreFile == null) {
-trustStoreFile = System.getProperty("javax.net.ssl.trustStore");
+String truststoreFile = (String)attributes.get("truststoreFile");
+if(truststoreFile == null) {
+truststoreFile = System.getProperty("javax.net.ssl.trustStore");
 }
 if(log.isDebugEnabled()) {
-log.debug("Truststore = " + trustStoreFile);
+log.debug("Truststore = " + truststoreFile);
 }
-String trustStorePassword = (String)attributes.get("truststorePass");
-if( trustStorePassword == null) {
-trustStorePassword = 
System.getProperty("javax.net.ssl.trustStorePassword");
+String truststorePassword = (String)attributes.get("truststorePass");
+if( truststorePassword == null) {
+truststorePassword = 
System.getProperty("javax.net.ssl.trustStorePassword");
 }
-if( trustStorePassword == null ) {
-trustStorePassword = getKeystorePassword();
+if( truststorePassword == null ) {
+truststorePassword = getKeystorePassword();
 }
 if(log.isDebugEnabled()) {
-log.debug("TrustPass = " + trustStorePassword);
+log.debug("TrustPass = " + truststorePassword);
 }
 String truststoreType = (String)attributes.get("truststoreType");
 if( truststoreType == null) {
@@ -292,9 +293,22 @@
 if(log.isDebugEnabled()) {
 log.debug("trustType = " + truststoreType);
 }
-if (trustStoreFile != null && trustStorePassword != null){
-trustStore = getStore(truststoreType, trustStoreFile,
-  trustStorePassword);
+String truststoreProvider =
+(String)attributes.get("truststoreProvider");
+if( truststoreProvider == null) {
+truststoreProvider =
+System.getProperty("javax.net.ssl.trustStoreProvider");
+}
+if (truststoreProvider == null) {
+truststoreProvider = keystoreProvider;
+}
+if(log.isDebugEnabled()) {
+log.debug("trustProvider = " + truststoreProvider);
+}
+
+if (truststoreFile != null && truststorePassword != null){
+trustStore = getStore(truststoreType, truststoreProvider,
+truststoreFile, truststorePassword);
 }
 
 return trustStore;

@@ -303,13 +317,17 @@
 /*
  * Gets the key- or truststore with the specified type, path, and password.
  */
-private KeyStore getStore(String type, String path, String pass)
-throws IOException {
+private KeyStore getStore(String type, String provider, String path,
+String pass) throws IOException {
 
 KeyStore ks = null;

 InputStream istream = null;
 try {
-ks = KeyStore.getInstance(type);
+if (provider == null) {
+

Re: svn commit: r658474 - in /tomcat/tc6.0.x/trunk: java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java webapps/docs/changelog.xml webapps/docs/config/http.xml

2008-05-22 Thread Mark Thomas

Filip Hanik - Dev Lists wrote:
removing (or changing signatures) for non-private methods, shouldn't 
they be @deprecated for a while?


We could do although I'd be surprised if anyone was actually using those 
protected methods.


Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 44725] Tomcat delete context.xml and web. xml if re-naming Folders in CONF

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44725


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Comment #3 from Mark Thomas <[EMAIL PROTECTED]>  2008-05-22 10:40:54 PST ---
The effects aren't documented for the simple reason that editing the
configuration directory structure (ie the engine name and host name) whilst
Tomcat is running isn't documented since it isn't supported.

I can't see any viable way of supporting such configuration changes whilst
Tomcat is running.

The docs you want are the host doc and the context docs. If you need more help,
please use the users list.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r658292 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-05-22 Thread Mark Thomas

Remy Maucherat wrote:

On Wed, 2008-05-21 at 00:16 +0100, Mark Thomas wrote:

[EMAIL PROTECTED] wrote:

 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747
   Use any META-INF/context.xml in a consistent manner and ensure it is used on
@@ -95,4 +92,6 @@
   -1: remm (would need convincing that this is really well tested, otherwise 
delay to next release)
   markt Exactly what would convince you that this was well tested above and
 beyond the local testing that I have done to convince myself that
-this patch does what I want it to.
\ No newline at end of file
+this patch does what I want it to.
+  remm I am not sure this was fully tested. For example, the order of redeployResources is 
+   likely significant, and it is changed in deployDirectory

\ No newline at end of file
You'd think the order mattered since someone went to the bother of 
specifying a LinkedHashMap but I didn't see anything in checkResources() - 
the only place the data is read - that depended on order. Do you see 
something I don't?


That someone who used a LinkedHashMap was me, and the order should be
significant (after checking, some operations are done on the rest of the
list, like: for (int j = i + 1; j < resources.length; j++)).


I spent some time looking at this code and I think I understand it better 
than I did when I wrote the patch and enough to agree that my patch will 
break things. I'll pull this patch and look at it some more. I have this 
nagging feeling it could all be simpler but I can't quite see how just yet.


Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r658292 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-05-22 Thread Remy Maucherat
On Thu, 2008-05-22 at 18:43 +0100, Mark Thomas wrote:
> I spent some time looking at this code and I think I understand it better 
> than I did when I wrote the patch and enough to agree that my patch will 
> break things. I'll pull this patch and look at it some more. I have this 
> nagging feeling it could all be simpler but I can't quite see how just yet.

If you could write a simpler auto deployer it would be nice. Do you
agree with keeping this for next release ?

Rémy



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r658292 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-05-22 Thread Mark Thomas

Remy Maucherat wrote:

On Thu, 2008-05-22 at 18:43 +0100, Mark Thomas wrote:
I spent some time looking at this code and I think I understand it better 
than I did when I wrote the patch and enough to agree that my patch will 
break things. I'll pull this patch and look at it some more. I have this 
nagging feeling it could all be simpler but I can't quite see how just yet.


If you could write a simpler auto deployer it would be nice. Do you
agree with keeping this for next release ?


I'm holding off on forming a final opinion until I see how complex the 
patch is. Simple -> this release, complex -> next release, somewhere in the 
middle -> propose it and see how people vote.


Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42747] Context className attribute ignored for contexts deployed from descriptors in web /META-INF/context.xml

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=42747





--- Comment #2 from Mark Thomas <[EMAIL PROTECTED]>  2008-05-22 12:13:08 PST ---
The patch to trunk had some issues. I am working on a better one.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r659212 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-05-22 Thread markt
Author: markt
Date: Thu May 22 12:13:08 2008
New Revision: 659212

URL: http://svn.apache.org/viewvc?rev=659212&view=rev
Log:
Withdraw patch for 42747 whilst I work on a better one

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=659212&r1=659211&r2=659212&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu May 22 12:13:08 2008
@@ -67,18 +67,6 @@
 have to support it.
   +0: remm Apparently httpd does that, so I am changing my vote to +0
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747
-  Use any META-INF/context.xml in a consistent manner and ensure it is used on
-  initial deployment
-  http://svn.apache.org/viewvc?rev=657995&view=rev
-  +1: markt
-  -1: remm (would need convincing that this is really well tested, otherwise 
delay to next release)
-  markt Exactly what would convince you that this was well tested above and
-beyond the local testing that I have done to convince myself that
-this patch does what I want it to.
-  remm I am not sure this was fully tested. For example, the order of 
redeployResources is 
-   likely significant, and it is changed in deployDirectory
-
 * After being done with an asynchronous sendfile, the socket should go to the 
poller (if assigned
   to a worker, it will block).
 Index: java/org/apache/tomcat/util/net/AprEndpoint.java



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r659215 - /tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

2008-05-22 Thread markt
Author: markt
Date: Thu May 22 12:17:38 2008
New Revision: 659215

URL: http://svn.apache.org/viewvc?rev=659215&view=rev
Log:
Revert changes for 42747 whilst I work on a better fix.

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

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=659215&r1=659214&r2=659215&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Thu May 22 
12:17:38 2008
@@ -21,7 +21,6 @@
 
 import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -815,26 +814,7 @@
 (dir.getAbsolutePath(), new Long(dir.lastModified()));
 
 try {
-Context context = null;
-if (deployXML && xml.exists()) {
-synchronized (digester) {
-try {
-context = (Context) digester.parse(xml);
-if (context == null) {
-
log.error(sm.getString("hostConfig.deployDescriptor.error",
-file));
-return;
-}
-} finally {
-digester.reset();
-}
-}
-context.setConfigFile(xml.getAbsolutePath());
-deployedApp.redeployResources.put
-(xml.getAbsolutePath(), new Long(xml.lastModified()));
-} else {
-context = (Context) Class.forName(contextClass).newInstance();
-}
+Context context = (Context) 
Class.forName(contextClass).newInstance();
 if (context instanceof Lifecycle) {
 Class clazz = Class.forName(host.getConfigClass());
 LifecycleListener listener =
@@ -843,6 +823,11 @@
 }
 context.setPath(contextPath);
 context.setDocBase(file);
+if (xml.exists()) {
+context.setConfigFile(xml.getAbsolutePath());
+deployedApp.redeployResources.put
+(xml.getAbsolutePath(), new Long(xml.lastModified()));
+}
 host.addChild(context);
 // If we're unpacking WARs, the docBase will be mutated after
 // starting the context
@@ -926,78 +911,7 @@
 if( log.isDebugEnabled() ) 
 log.debug(sm.getString("hostConfig.deployDir", file));
 try {
-// Checking for a /META-INF/context.xml
-InputStream istream = null;
-BufferedOutputStream ostream = null;
-File xml = new File
-(configBase, file + ".xml");
-if (deployXML && !xml.exists()) {
-try {
-File applicationContextXml =
-new File(dir, Constants.ApplicationContextXml);
-if (applicationContextXml.exists()) {
-istream = new FileInputStream(applicationContextXml);
-
-configBase.mkdirs();
-
-ostream =
-new BufferedOutputStream
-(new FileOutputStream(xml), 1024);
-byte buffer[] = new byte[1024];
-while (true) {
-int n = istream.read(buffer);
-if (n < 0) {
-break;
-}
-ostream.write(buffer, 0, n);
-}
-ostream.flush();
-ostream.close();
-ostream = null;
-istream.close();
-istream = null;
-}
-} catch (Exception e) {
-// Ignore and continue
-if (ostream != null) {
-try {
-ostream.close();
-} catch (Throwable t) {
-// Ignore
-}
-ostream = null;
-}
-if (istream != null) {
-try {
-istream.close();
-} catch (Throwable t) {
-// Ignore
-}
-istream = null;
-}
-}
-}
-
-Context context = null;
-if (deployX

DO NOT REPLY [Bug 45065] New: RequestDispatcher restricts access to ApplicationHttpRequest

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45065

   Summary: RequestDispatcher restricts access to
ApplicationHttpRequest
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
OS/Version: Windows Vista
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This exception is generated when a servlet calls Method.invoke() on the
ServletRequest object when the servlet is run with RequestDispatcher.forward

java.lang.IllegalAccessException: Class
com.jotobjects.demo.formexample.FormExampleShowBean can not access a member of
class org.apache.catalina.core.ApplicationHttpRequest with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.reflect.Method.invoke(Method.java:578)

When the servlet is run with normally with an HTTP request the Request class
is org.apache.catalina.connector.RequestFacade and the method can be invoked
with reflection.  But when the method is run with RequestDispatcher the
Request class is org.apache.catalina.core.ApplicationHttpRequest and
IllegalAccessException is raised.

Here is the code that causes the error -

java.lang.reflect.Method m =
  request.getClass().getDeclaredMethod("getPathInfo",null);
Object value = m.invoke(getRequest(),null);

Have tried starting with a SecurityManager with AllPermissions
but this does not change the outcome.

Same problem in Tomcat 5 and Tomcat 4.

The same codes works in Tomcat 3 and with Jetty


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 43683] Accessing Servlet while Reloading context gives 404 error

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43683


Joe Kislo <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Comment #7 from Joe Kislo <[EMAIL PROTECTED]>  2008-05-22 16:12:38 PST ---
Sorry for the delay testing the fix... It's been a busy couple of weeks.

So I checked out the code from svn trunk today (05-22-08) and tested it.  With
the test case I provided, everything was good... However when I tested it with
a more thorough test case (EG: a real web application :) ), i ran into some
crashes implying I was using an the OLD classloader.  

It seems like the Thread that is calling the init() function has the *wrong*
classloader attached to it (EG: the old servlet's class loader, instead of the
new one).  I've narrowed down the issue (this... took some time :) ) and have a
new test case for you.

Just replace the ServletRestartTest.war file with this new one (and re-extract
it).  There are now two classes, the ServletRestartTest servlet itself, and
another class (it happens to be blank) that I will try to load using the
Classloader.

Do the same test as before... run:
ab -c 10 -n 100 http://localhost:8080/ServletRestartTest/ServletRestartTest

then query the reload by going to this url at the same time:
http://localhost:8080/manager/reload?path=/ServletRestartTest

You'll see this:
[...]
servicing completed
servicing completed
destroy starting
destroy completed
init starting
May 22, 2008 7:02:13 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. 
Could not load OtherClass.  The eventual following stack trace is caused by an
error thrown for debugging purposes as well as to attempt to terminate the
thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at ServletRestartTest.init(ServletRestartTest.java:24)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:183)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
init completed
starting servicing
[...]

Let me know if I can be of any further assistance


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 43683] Accessing Servlet while Reloading context gives 404 error

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43683





--- Comment #8 from Joe Kislo <[EMAIL PROTECTED]>  2008-05-22 16:14:32 PST ---
Created an attachment (id=21990)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21990)
Testcase 2 - ServletRestartTest.war


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 45067] New: UDecoder. java stack dumps on valid URL encoding

2008-05-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45067

   Summary: UDecoder.java stack dumps on valid URL encoding
   Product: Tomcat 6
   Version: 6.0.16
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: major
  Priority: P2
 Component: Connectors
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Some URL-encoded text causes UDecoder to stack dump and not process a request
parameter.

I looked at the source code of UDecoder.java and it simply checks if a %
character is followed by 2 hex digits. It doesn't handle cases like the degree
symbol (e.g., 0-40°C) and the dagger (e.g., $199.99†) when text pasted into
a text field and submitted as part of a form. IE 7 URL encodeds the text like
%u2020, and UDecoder fails the isHexDigit test on the "u" character. Java's
URLdecode class also stack dumps on this...

A work-around would be appreciated.

The stack dump follows:
May 22, 2008 11:23:41 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: May 22, 2008 11:23:41 PM org.apache.tomcat.util.http.Parameters
processParameters WARNING: Parameters: Character decoding failed. Parameter
skipped. java.io.CharConversionException: isHexDigit at
org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88) at
org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49) at
org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:412) at
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:394)
at
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:346)
at org.apache.catalina.connector.Request.parseParameters(Request.java:2491) at
org.apache.catalina.connector.Request.getParameter(Request.java:1040) at
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355)
at javarex.beans.servlet.util.HttpServlet.doPost(HttpServlet.java:386) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
javarex.beans.servlet.ServletApplication.service(ServletApplication.java:141)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at
java.lang.Thread.run(Unknown Source)


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]