RE: [juddi-Users] setup with new database fail in getting connection using JNDI datasource
Hi, I am using Juddi 8.0. i set up everything. But it fails in getting connection. I am using JNDI datasource for my database using JDBC driver. Following is the piece of code from happyjuddi.jsp. try { out.println(ds); out.flush(); conn = ds.getConnection(); if (conn == null) throw new Exception(No Connection (conn=null)); out.print(font color=\green\); out.print(+ Got a JDBC Connection!); out.println(/font); } when i run this jsp browser displays upto as follows. It fails in getting connection at statement conn = ds.getConnection(); jUDDI DataSource Check + Got a JNDI Context! + Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB) [EMAIL PROTECTED] After that it does not do anything. Browser was being left for around 12 hours. i have seen that memory utilization goes up to full( 256 RAM). After that, i stopped my database. Immediately i get DBCP borrowObject failed: java.sql.SQLException: Server rejected. at tomcat server window and releases all memory. What could be the reason? is there any restriction on JDBC Driver to be used in Juddi setup.? why it creates org.apache.commons.dbcp.BasicDataSource object.? With Thanks and Regards, B. Subrahmanya Nayak Member Technical Staff, -Original Message- From: Subrahmanya, Noida Sent: Tuesday, June 17, 2003 06:11 PM To: [EMAIL PROTECTED] Subject: RE: [juddi-Users] setup with new database Hi , I have the user with admin. Tomcat Server - Server (Tomcat-Standalone - Host (localhost) - Context (/juddi) - Resources - Data Source But when i click DataSource in above tree structure i gives following exception. org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName' at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:356) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1759) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) What would be the reason?. It would be better if latest code would be made available in archive form. With Thanks and Regards, B. Subrahmanya Nayak -Original Message- From: Steve Viens [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 05:51 PM To: [EMAIL PROTECTED] Subject: RE: [juddi-Users] setup with new database Currently (unfortunately) the happyjuddi.jsp page will not help you debug connection problems when using the jUDDI connection pool option (i.e. 'juddi.useConnectionPool = true') - only when using JNDI DataSource. If you'ld like to attempt using a JNDI datasource (with Tomcat 4.1.24) instead of the jUDDI ConnectionPool I've included instructions (below). This info was posted to the list last week but I'd don't currently see it in the archive so I've included it below). === Tomcat 4.1.24 / jUDDI setup instructions = Earle, You most definitely are having a Tomcat DataSource configuration issue. I setup a JNDI DataSource via Tomcat's Admin application. What follows is instructions that I used to set up a DataSource for jUDDI under version 4.1.24. If you're using this version then start up tomcat and click on this link: http://localhost:8080/admin/login.jsp ..Or select the Tomcat Administration link on Tomcat's home page: http://localhost:8080/index.jsp You'll need to specify an admin User Name and Password which is specified in: {Tomcat-Dir}\tomcat4.1.24\conf\tomcat-users.xml I've got a 'user' specified as follows: user username=admin password=admin fullName=Steve Viens roles=admin,manager,standard/ So given the values above I use 'admin' and 'admin' to log in. Once you're in you've got to create a DataSource under the '/juddi' context. Tomcat Server - Server (Tomcat-Standalone - Host (localhost) - Context (/juddi) - Resources - Data Source Select Create new DataSource under the Data Source Actions menu. And enter values similar to the following: JNDI Name: jdbc/juddiDB Data Source URL: jdbc:mysql://localhost/juddi JDBC Driver Class: com.mysql.jdbc.Driver User Name: juddi Password: juddi Max Active Conn: 4 Max Idle Conn: 2 Max Wait for Conn: 5000 Validation Query: SELECT * FROM PUBLISHER Of course the values you use may differ. I'm using the MySQL database I'm connecting
Re: [PATCH] Digest Authentication
[EMAIL PROTECTED] wrote: Here I attach a patch for DigestAuthentication.java that should fix the problems with DIGEST authentication. -// in some cases qop has quotes, and in some not. We'll support both -if (currentTokenValue.startsWith(\) currentTokenValue.endsWith(\)) { - qop = removeQuotes(currentTokenValue); -} else { - qop = currentTokenValue; -} It appears that qop is not the only problem, the sun java plug-in (v1.4.1) sends the nc value quoted. This prevents applets logging in. It might be worth leaving qop = removeQuotes(currentTokenValue); change the nc line to call removeQuotes, i.e. nc = removeQuotes(currentTokenValue); and add a test to the start of removeQuotes method as follows: protected static String removeQuotes(String quotedString) { if ((!quotedString.startsWith(\)) || (!quotedString.endsWith(\))) return quotedString; if (quotedString.length() 2) { return quotedString.substring(1, quotedString.length() - 1); } else { return new String(); } } This would prevent the same problem happening on any of the digest fields. Barry. _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet JasperLoader.java
jfclere 2003/07/30 02:20:47 Modified:jasper2/src/share/org/apache/jasper/servlet JasperLoader.java Log: Put the dot in the if. Revision ChangesPath 1.10 +1 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JasperLoader.java Index: JasperLoader.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JasperLoader.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JasperLoader.java 11 Apr 2003 22:41:58 - 1.9 +++ JasperLoader.java 30 Jul 2003 09:20:47 - 1.10 @@ -153,8 +153,8 @@ } // (.5) Permission to access this class when using a SecurityManager - int dot = name.lastIndexOf('.'); if (securityManager != null) { +int dot = name.lastIndexOf('.'); if (dot = 0) { try { // Do not call the security manager since by default, we grant that package. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: securityManager in JasperLoader.java
Jean-Francois Arcand wrote: Hi Jean-Frederic, the current source have: Right: +++ [EMAIL PROTECTED]:~/jakarta-tomcat-jasper more CVS/Tag Ttomcat_4_branch +++ Should I port back the correction to the tomcat_4_branch? Cheers Jean-Frederic int dot = name.lastIndexOf('.'); if (securityManager != null) { if (dot = 0) { try { // Do not call the security manager since by default, we grant that package. if (!org.apache.jasper.runtime.equalsIgnoreCase(name.substring(0,dot))){ securityManager.checkPackageAccess(name.substring(0,dot)); } } catch (SecurityException se) { which is the correct way, althrough int dot = name.lastIndexOf('.'); should be moved to be inside the if, because dot is not used outside of it. Done :-) Thanks, -- Jeanfrancois jean-frederic clere wrote: Hi, One of my colleague has problems in JasperLoader.java: The System.getSecurityManager() is null when creating the class but not null later on. Why do we have the following code? (from jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JasperLoader.java): +++ if (System.getSecurityManager() != null) { if (dot = 0) { try { securityManager.checkPackageAccess(name.substring(0,dot)); } catch (SecurityException se) { String error = Security Violation, attempt to use + Restricted Class: + name; System.out.println(error); throw new ClassNotFoundException(error); } } } +++ We test System.getSecurityManager() but use securityManager! Cheers Jean-Frederic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exporting env vars using JK2
Hi, I am using mod_jk2 to connect Apache2 together with Tomcat 4.1.24. I am also using some other mods that set some environment variables before passing the request off to Tomcat. Unfortunately, there does not appear to be any way to get these env vars exported over the mod_jk2 connector and into the HttpServletRequest attributes. This used to be easy to do in the original mod_jk where you would just set: JkEnvVar SOME_ENV_VAR FOO Looking at the code, there does not even appear to be any support for this at all in mod_jk2, and the documentation for JK2 does not mention anything like this functionality at all. Some old patches google comes up with seems to indicate that many of the old mod_jk config options have been consolidated into the mod_jk2 JkSet option, but there is no mention of what happened to JkEnvVar. Some patches from two years or so ago mentions a Jk2Env option, but this seems to have disappeared since. Is there any alternative way in which env vars can be passed to the servlet environment that I have missed? If not, is this something that is going to make it into mod_jk2 in the future? Regards, Mats Henrikson Systems Development and Support University of Oxford - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21993] New: - startup.sh needs nohup to suceed
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21993. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21993 startup.sh needs nohup to suceed Summary: startup.sh needs nohup to suceed Product: Tomcat 4 Version: 4.1.24 Platform: Other OS/Version: Solaris Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I've tried to run (a script that in turn runs) startup.sh in the compile window of Emacs. This will cause Tomcat to not come up. I have than tried to include a sleep 10. That causes Tomcat to run partially, as I can see from the logs that are generated, but than it again fails. Running startup.sh under nohup helps. Appearently, startup.sh just triggers Tomcat to start, then exists. When the parent process of startup.sh happens to be teared down, that causes a SIGHUP signal to be send to the Tomcat startup process. My suggestion: Either make startup.sh a script that runs for as long as Tomcat runs, or truely daemonize right up front. (This is somewhat related to bug 11753.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 11753] - Synchronous startup script - startup.sh should wait until Tomcat is fully started
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11753. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11753 Synchronous startup script - startup.sh should wait until Tomcat is fully started --- Additional Comments From [EMAIL PROTECTED] 2003-07-30 14:14 --- (This bug is somewhat related to bug 21993, startup.sh needs nohup.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Implementing my own realm
I could really use some help. So I have created my own realm that extends the JNDIRealm, you can see that class further down. I also created the LDAPMessageFormat class. So I put these classes into a jar, which I put into server/lib folder in tomcat. In my server.xml instead of using the className for the org.apacheJNDIRealm, I put in the name of my realm. When I startup tomcat, I get this error, ServerLifecycleLister: Can't create mbean for realm [EMAIL PROTECTED] Does anyone know how to fix this problem? I would greatly appreciate any help. In case you are wondering, all the realm should do in addition to the JNDIRealm is to fix the bug, http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16541. Many thanks in advance! Jessica public class StrykerJNDIRealm extends JNDIRealm { /** * Set the message format pattern for selecting users in this Realm. * * @param userSearch The new user search pattern */ public void setUserSearch(String userSearch) { System.out.println(in StrykerJNDI realm); this.userSearch = userSearch; if (userSearch == null) userSearchFormat = null; else userSearchFormat = new LDAPMessageFormat(userSearch); } } public class LDAPMessageFormat extends MessageFormat { /** * @param pattern */ public LDAPMessageFormat(String pattern) { super(pattern); } public String format(String[] pattern) { String format = format((Object)pattern); return filterEncode(format); } /** * Put the codefilter/code into the proper form. LDAP servers require a ',' within an attribute * to be encoded by a '\'. It further requires a '\' to encode a '\' when using a search filter. * * @param String filter The codefilter/code to be encoded */ public String filterEncode(String filter) { int backslash = filter.indexOf('\\'); int nextSlash = 1; int equal = 0; int comma = 0; boolean firstTime = true; String charAfterBack = filter.substring(backslash + 1, backslash + 2); while (nextSlash 0 backslash 0) { // Section 4 of http://rfc.sunsite.dk/rfc/rfc2253.html states // // Implementations MUST allow a value to be surrounded by quote ('' // ASCII 34) characters, which are not part of the value. Inside the // quoted value, the following characters can occur without any // escaping: // ',', '=', '+', '', '', '#' and ';' // // So if none of these characters are currently being escaped return original filter if ((charAfterBack.compareTo(,)) != 0 (charAfterBack.compareTo(=)) != 0 (charAfterBack.compareTo(+)) != 0 (charAfterBack.compareTo()) != 0 (charAfterBack.compareTo()) != 0 (charAfterBack.compareTo(#)) != 0 (charAfterBack.compareTo(+)) != 0 (charAfterBack.compareTo(;)) != 0) return filter; /*String before = filter.substring(0, backslash + 1); String after = filter.substring(backslash + 1); nextSlash = after.indexOf('\\'); backslash = backslash + nextSlash + 1; filter = before + \\ + after;*/ // remove the backslash that is escaping String before = filter.substring(0, backslash); String after = filter.substring(backslash + 1); nextSlash = after.indexOf('\\'); backslash = backslash + nextSlash + 1; //find where to put the quotes around //beginning of quotes after the objectname = attribute = ..., attribute=..., if (firstTime) { equal = before.indexOf('='); equal = (before.substring(equal + 1)).indexOf('=') + equal + 1; firstTime = false; } else equal = before.indexOf('='); //end of quotes before comma separating attributes //making sure not to grab the comma that is being escaped comma = (after.substring(1)).indexOf(','); if (comma 0 equal 0) filter = before.substring(0, equal + 1) + \ + before.substring(equal + 1) + after.substring(0, comma + 1) + \ + after.substring(comma + 1); } return filter; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21999] New: - might be wrong example in server.xml
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21999. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21999 might be wrong example in server.xml Summary: might be wrong example in server.xml Product: Tomcat 5 Version: Nightly Build Platform: All OS/Version: All Status: NEW Severity: Minor Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] in server.xml: !-- You should set jvmRoute to support load-balancing via JK/JK2 ie : Engine name=Standalone defaultHost=localhost debug=0 jmvRoute=jvm1 -- should we use jvmRoute instead of jmvRoute? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JspUtil.java
kinman 2003/07/30 10:33:14 Modified:jasper2/src/share/org/apache/jasper JspCompilationContext.java jasper2/src/share/org/apache/jasper/compiler JspUtil.java Log: Refactor getDerivedPackageName and eliminate some duplicate code. Patch by Eric Carmichael . Revision ChangesPath 1.42 +6 -29 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- JspCompilationContext.java29 Jul 2003 23:22:23 - 1.41 +++ JspCompilationContext.java30 Jul 2003 17:33:14 - 1.42 @@ -399,33 +399,10 @@ private String getDerivedPackageName() { if (derivedPackageName == null) { -StringBuffer modifiedPackageName = new StringBuffer(); int iSep = jspUri.lastIndexOf('/'); -// Start after the first slash -int nameStart = 1; -for (int i = 1; i iSep; i++) { -char ch = jspUri.charAt(i); -if (i == nameStart !Character.isJavaIdentifierStart(ch)) { -modifiedPackageName.append('_'); -} -if (Character.isJavaIdentifierPart(ch) ch != '_') { -modifiedPackageName.append(ch); -} else if (ch == '/') { -if (JspUtil.isJavaKeyword(jspUri.substring(nameStart, i))) { -modifiedPackageName.append('_'); -} -nameStart = i+1; -modifiedPackageName.append('.'); -} else { -modifiedPackageName.append(JspUtil.mangleChar(ch)); -} -} -if (nameStart iSep - JspUtil.isJavaKeyword(jspUri.substring(nameStart, iSep))) { -modifiedPackageName.append('_'); -} -derivedPackageName = modifiedPackageName.toString(); -} +derivedPackageName = (iSep 0) ? +JspUtil.makeJavaPackage(jspUri.substring(1,iSep)) : ; + } return derivedPackageName; } 1.40 +21 -11 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java Index: JspUtil.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- JspUtil.java 29 Jul 2003 23:22:23 - 1.39 +++ JspUtil.java 30 Jul 2003 17:33:14 - 1.40 @@ -930,21 +930,28 @@ } } -//Make sure the class name consists of legal Java identifiers -String classNameComponents[] = path.substring(begin).split(/); +className += makeJavaPackage(path.substring(begin)); + + return className; +} + +/** + * Converts the given path to a Java package or fully-qualified class name + * + * @param path Path to convert + * + * @return Java package corresponding to the given path + */ +public static final String makeJavaPackage(String path) { +String classNameComponents[] = path.split(/); StringBuffer legalClassNames = new StringBuffer(); for (int i = 0; i classNameComponents.length; i++) { legalClassNames.append(makeJavaIdentifier(classNameComponents[i])); -if (isJavaKeyword(classNameComponents[i])) { -legalClassNames.append('_'); -} if (i classNameComponents.length - 1) { legalClassNames.append('.'); } } -className += legalClassNames.toString(); - - return className; +return legalClassNames.toString(); } /** @@ -969,6 +976,9 @@ } else { modifiedIdentifier.append(mangleChar(ch)); } +} +if (isJavaKeyword(modifiedIdentifier.toString())) { +modifiedIdentifier.append('_'); } return modifiedIdentifier.toString(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21978] - Certain tag file pathnames lead to compile errors
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21978. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21978 Certain tag file pathnames lead to compile errors [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-07-30 17:38 --- I thought about refactoring that part, but was too lazy to actually do it. Glad that you did though. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[GUMP] Build Failure - jk2
This email is autogenerated from the output from: http://cvs.apache.org/builds/gump/2003-07-30/jakarta-tomcat-jk-native2.html Buildfile: build.xml init.taskdef: guess.os: [echo] build.properties i386.Linux [echo] Linux:true Win32:${win32} Netware:${netware} Solaris:${solaris} HPUX:${hpux} init.win32.properties: init.win32.mc: init.win32: init.netware: init.os: guess.server: [echo] Apache2 /usr/local/apache2 true [echo] Apache13 /usr true [echo] IIS ${iis.home} ${iis.detect} [echo] Iplanet ${iplanet.home} ${iplanet.detect} [echo] AOLserver ${aolserver.home} ${aolserver.detect} [echo] JNI true init: apache20: [so] Compiling 39 out of 42 Compiling /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c [so] Compile failed 1 /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c [so] Command:libtool --mode=compile cc -c -o /home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/common/jk_channel_socket.o -I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common -I/usr/local/apache2/include -I/usr/local/apache2/include -I${apr-util.include} -I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/include -I/usr/java/j2sdk1.4.1_02/jre/../include -I/usr/java/j2sdk1.4.1_02/jre/../include/linux -g -W -D_REENTRANT -DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR -DHAVE_JNI /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c [so] Output: [so] rm -f /home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/common/.libs/jk_channel_socket.lo [so] cc -c -I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common -I/usr/local/apache2/include -I/usr/local/apache2/include -I\${apr-util.include} -I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/include -I/usr/java/j2sdk1.4.1_02/jre/../include -I/usr/java/j2sdk1.4.1_02/jre/../include/linux -g -W -D_REENTRANT -DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR -DHAVE_JNI /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c -fPIC -DPIC -o /home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/common/.libs/jk_channel_socket.lo [so] StdErr: [so] /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c: In function `jk2_channel_socket_resolve': [so] /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c:302: warning: this function may return with or without a value [so] /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c: At top level: [so] /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c:302: parse error before `else' [so] /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c:306: parse error before `' BUILD FAILED /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/build.xml:283: Compile failed /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c Total time: 8 seconds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Implementing my own realm
I've edited the mbeans-descriptors.xml and solve that problem at least. -Original Message- From: Gross, Jessica Sent: Wednesday, July 30, 2003 10:55 AM To: [EMAIL PROTECTED] Subject: Implementing my own realm I could really use some help. So I have created my own realm that extends the JNDIRealm, you can see that class further down. I also created the LDAPMessageFormat class. So I put these classes into a jar, which I put into server/lib folder in tomcat. In my server.xml instead of using the className for the org.apacheJNDIRealm, I put in the name of my realm. When I startup tomcat, I get this error, ServerLifecycleLister: Can't create mbean for realm [EMAIL PROTECTED] Does anyone know how to fix this problem? I would greatly appreciate any help. In case you are wondering, all the realm should do in addition to the JNDIRealm is to fix the bug, http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16541. Many thanks in advance! Jessica public class StrykerJNDIRealm extends JNDIRealm { /** * Set the message format pattern for selecting users in this Realm. * * @param userSearch The new user search pattern */ public void setUserSearch(String userSearch) { System.out.println(in StrykerJNDI realm); this.userSearch = userSearch; if (userSearch == null) userSearchFormat = null; else userSearchFormat = new LDAPMessageFormat(userSearch); } } public class LDAPMessageFormat extends MessageFormat { /** * @param pattern */ public LDAPMessageFormat(String pattern) { super(pattern); } public String format(String[] pattern) { String format = format((Object)pattern); return filterEncode(format); } /** * Put the codefilter/code into the proper form. LDAP servers require a ',' within an attribute * to be encoded by a '\'. It further requires a '\' to encode a '\' when using a search filter. * * @param String filter The codefilter/code to be encoded */ public String filterEncode(String filter) { int backslash = filter.indexOf('\\'); int nextSlash = 1; int equal = 0; int comma = 0; boolean firstTime = true; String charAfterBack = filter.substring(backslash + 1, backslash + 2); while (nextSlash 0 backslash 0) { // Section 4 of http://rfc.sunsite.dk/rfc/rfc2253.html states // // Implementations MUST allow a value to be surrounded by quote ('' // ASCII 34) characters, which are not part of the value. Inside the // quoted value, the following characters can occur without any // escaping: // ',', '=', '+', '', '', '#' and ';' // // So if none of these characters are currently being escaped return original filter if ((charAfterBack.compareTo(,)) != 0 (charAfterBack.compareTo(=)) != 0 (charAfterBack.compareTo(+)) != 0 (charAfterBack.compareTo()) != 0 (charAfterBack.compareTo()) != 0 (charAfterBack.compareTo(#)) != 0 (charAfterBack.compareTo(+)) != 0 (charAfterBack.compareTo(;)) != 0) return filter; /*String before = filter.substring(0, backslash + 1); String after = filter.substring(backslash + 1); nextSlash = after.indexOf('\\'); backslash = backslash + nextSlash + 1; filter = before + \\ + after;*/ // remove the backslash that is escaping String before = filter.substring(0, backslash); String after = filter.substring(backslash + 1); nextSlash = after.indexOf('\\'); backslash = backslash + nextSlash + 1; //find where to put the quotes around //beginning of quotes after the objectname = attribute = ..., attribute=..., if (firstTime) { equal = before.indexOf('='); equal = (before.substring(equal + 1)).indexOf('=') + equal + 1; firstTime = false; } else equal = before.indexOf('='); //end of quotes before comma separating attributes //making sure not to grab the comma that is being escaped comma = (after.substring(1)).indexOf(','); if (comma 0 equal 0) filter = before.substring(0, equal + 1) + \ + before.substring(equal + 1) + after.substring(0, comma + 1) + \ + after.substring(comma + 1); } return filter; } } - To unsubscribe,
DO NOT REPLY [Bug 22000] New: - Tomcat Service Start-up error (1053): the service did not respond to the start or control request in a timely fashion.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22000. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22000 Tomcat Service Start-up error (1053): the service did not respond to the start or control request in a timely fashion. Summary: Tomcat Service Start-up error (1053): the service did not respond to the start or control request in a timely fashion. Product: Tomcat 5 Version: 5.0.5 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I downloaded Tomcat 5.0.5 this morning and installed using the auto-installer. I then attempted to start and configure the Tomcat server from the Start/Programs/Apache Tomcat 5.0 location and got no response. I went to the Services program within Control Panel/Administrative Tools and attempted to start the service from there. I got the following error: Header: Microsoft Management Console Body: Error 1053: The service did not respond to the start or control request in a timely fashion. I've done warm and cold reboots and also changed the User and System environment variables to point to the new location (and then did a cold reboot) without success. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[PATCH] jakarta-servletapi-5: API updates
Hi, The attached file is to update the Servlet 2.4 API. Changes are: * Fix typos jsr154/src/share/javax/servlet/Filter.java jsr154/src/share/javax/servlet/FilterConfig.java jsr154/src/share/javax/servlet/ServletConfig.java jsr154/src/share/javax/servlet/ServletContextAttributeEvent.java jsr154/src/share/javax/servlet/ServletContextListener.java jsr154/src/share/javax/servlet/ServletOutputStream.java jsr154/src/share/javax/servlet/UnavailableException.java jsr154/src/share/javax/servlet/http/Cookie.java jsr154/src/share/javax/servlet/http/HttpServlet.java jsr154/src/share/javax/servlet/http/HttpServletRequest.java jsr154/src/share/javax/servlet/http/HttpServletResponse.java jsr154/src/share/javax/servlet/http/HttpSession.java jsr154/src/share/javax/servlet/http/HttpSessionListener.java * Add the condition to return null in "Returns" in getRequestDispatcher jsr154/src/share/javax/servlet/ServletContext.java jsr154/src/share/javax/servlet/ServletRequest.java * Clarification of internationalization: making clear the relationship among setLocale(), setContentType, and setCharacterEncoding jsr154/src/share/javax/servlet/ServletResponse.java -- Yutaka Yoshida Java/XML Software Group Sun Microsystems Inc.Index: jsr154/src/share/javax/servlet/Filter.java === RCS file: /home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/Filter.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Filter.java --- jsr154/src/share/javax/servlet/Filter.java 13 Aug 2002 16:21:42 - 1.1.1.1 +++ jsr154/src/share/javax/servlet/Filter.java 30 Jul 2003 18:01:54 - @@ -63,7 +63,7 @@ import java.io.IOException; /** - * A filter is an object than perform filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both. + * A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both. * brbr * Filters perform filtering in the codedoFilter/code method. Every Filter has access to ** a FilterConfig object from which it can obtain its initialization parameters, a @@ -114,7 +114,7 @@ * filter content or headers for output filtering br * 4. a) strongEither/strong invoke the next entity in the chain using the FilterChain object (codechain.doFilter()/code), br ** 4. b) strongor/strong not pass on the request/response pair to the next entity in the filter chain to block the request processingbr - ** 5. Directly set headers on the response after invokation of the next entity in ther filter chain. + ** 5. Directly set headers on the response after invocation of the next entity in ther filter chain. **/ public void doFilter ( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException; Index: jsr154/src/share/javax/servlet/FilterConfig.java === RCS file: /home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/FilterConfig.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 FilterConfig.java --- jsr154/src/share/javax/servlet/FilterConfig.java13 Aug 2002 16:21:42 - 1.1.1.1 +++ jsr154/src/share/javax/servlet/FilterConfig.java30 Jul 2003 18:01:54 - @@ -68,7 +68,7 @@ /** * * A filter configuration object used by a servlet container -* used to pass information to a filter during initialization. +* to pass information to a filter during initialization. * @see Filter * @since Servlet 2.3 * @@ -116,13 +116,13 @@ /** - * Returns the names of the servlet's initialization parameters + * Returns the names of the filter's initialization parameters * as an codeEnumeration/code of codeString/code objects, - * or an empty codeEnumeration/code if the servlet has + * or an empty codeEnumeration/code if the filter has * no initialization parameters. * * @return an codeEnumeration/code of codeString/code - * objects containing the names of the servlet's + * objects containing the names of the filter's * initialization parameters * * Index: jsr154/src/share/javax/servlet/ServletConfig.java === RCS file:
DO NOT REPLY [Bug 22000] - Tomcat Service Start-up error (1053): the service did not respond to the start or control request in a timely fashion.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22000. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22000 Tomcat Service Start-up error (1053): the service did not respond to the start or control request in a timely fashion. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2003-07-30 18:35 --- This works for me (and others). I won't be able to help unless you give steps to reproduce. The more likely is that your VM is incorrectly setup. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources BaseDirContext.java ProxyDirContext.java
remm2003/07/30 11:35:51 Modified:catalina/src/share/org/apache/naming/resources BaseDirContext.java ProxyDirContext.java Log: - Add code allowing configuring the resource cache size. - Code cleanup. Revision ChangesPath 1.2 +11 -11 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/BaseDirContext.java Index: BaseDirContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/BaseDirContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BaseDirContext.java 18 Jul 2002 16:47:32 - 1.1 +++ BaseDirContext.java 30 Jul 2003 18:35:50 - 1.2 @@ -161,7 +161,7 @@ /** * Max size of resources which will have their content cached. */ -protected int cacheObjectMaxSize = 32768; // 32 KB +protected int cacheMaxSize = 10240; // 10 MB // - Properties @@ -249,18 +249,18 @@ /** - * Set cacheObjectMaxSize. + * Return the maximum size of the cache in KB. */ -public void setCacheObjectMaxSize(int cacheObjectMaxSize) { -this.cacheObjectMaxSize = cacheObjectMaxSize; +public int getCacheMaxSize() { +return cacheMaxSize; } /** - * Get cacheObjectMaxSize. + * Set the maximum size of the cache in KB. */ -public int getCacheObjectMaxSize() { -return cacheObjectMaxSize; +public void setCacheMaxSize(int cacheMaxSize) { +this.cacheMaxSize = cacheMaxSize; } 1.12 +9 -8 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java Index: ProxyDirContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ProxyDirContext.java 12 Jun 2003 22:03:34 - 1.11 +++ ProxyDirContext.java 30 Jul 2003 18:35:50 - 1.12 @@ -115,7 +115,8 @@ if (dirContext instanceof BaseDirContext) { // Initialize parameters based on the associated dir context, like // the caching policy. -if (((BaseDirContext) dirContext).isCached()) { +BaseDirContext baseDirContext = (BaseDirContext) dirContext; +if (baseDirContext.isCached()) { try { cache = (ResourceCache) Class.forName(cacheClassName).newInstance(); @@ -123,9 +124,9 @@ //FIXME e.printStackTrace(); } -cacheTTL = ((BaseDirContext) dirContext).getCacheTTL(); -cacheObjectMaxSize = -((BaseDirContext) dirContext).getCacheObjectMaxSize(); +cache.setCacheMaxSize(baseDirContext.getCacheMaxSize()); +cacheTTL = baseDirContext.getCacheTTL(); +cacheObjectMaxSize = baseDirContext.getCacheMaxSize() / 20; } } hostName = (String) env.get(HOST); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util TomcatCSS.java
remm2003/07/30 11:36:32 Modified:catalina/src/share/org/apache/catalina/util TomcatCSS.java Log: - Use the Jakarta color. The Tomcat color is great for branding, but looks ugly ;-) Revision ChangesPath 1.3 +8 -8 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/TomcatCSS.java Index: TomcatCSS.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/TomcatCSS.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TomcatCSS.java29 Jul 2003 17:18:57 - 1.2 +++ TomcatCSS.java30 Jul 2003 18:36:32 - 1.3 @@ -68,14 +68,14 @@ public class TomcatCSS { public static final String TOMCAT_CSS = -H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;font-size:22px;} + -H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;font-size:16px;} + -H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;font-size:14px;} + +H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} + +H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} + +H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} + BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} + -B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;} + +B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} + P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} + A {color : black;} + -HR {color : #D2A41C;}; +HR {color : #525D76;}; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs deployer-howto.xml html-manager-howto.xml manager-howto.xml
remm2003/07/30 11:37:06 Modified:webapps/docs deployer-howto.xml html-manager-howto.xml manager-howto.xml Log: - Manager and deployer docs update. Revision ChangesPath 1.5 +32 -1 jakarta-tomcat-catalina/webapps/docs/deployer-howto.xml Index: deployer-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/deployer-howto.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- deployer-howto.xml14 Jul 2003 15:25:57 - 1.4 +++ deployer-howto.xml30 Jul 2003 18:37:06 - 1.5 @@ -80,7 +80,32 @@ section name=Deploying on a running Tomcat server pIf the host autoDeploy property is true, the host will attempt to deploy -and update web applications dynamically, as needed./p +and update web applications dynamically, as needed. The host will need to +have background processing enabled for automatic reloading to work, which +is the default./p + +pThis includes: +ul +liDeployment of WARs which are copied to the host appBase./li +liDeployment of expanded web applications which are copied to the host +appBase./li +liRedeployment of a web application which has been deployed from a WAR +when the WAR is updated: the expanded web application is removed, +and the WAR is expanded again. This will not happen if the host is +configured so that WARs are not expanded, in which case the webapp +will be simply redeployed./li +liRedeployment of the web application if the /WEB-INF/web.xml file is +updated./li +liRedeployment of the web application if the context XML file from which +the web application has been deployed is updated./li +liRedeployment of the web application if a context XML file (with a +name corresponding to the context path of the previously deployed +application) is added in the +code$CATALINA_HOME/conf/[enginename]/[hostname]//code folder./li +/ul +Note: Web application reloading can also be configured in the loader, in which +case loaded classes will be tracked for changes. +/p /section @@ -96,6 +121,12 @@ validates the webapp's deployment descriptor. The validator task (class codeorg.apache.catalina.ant.ValidatorTask/code) allows only one parameter: the base path of an expanded web application./p + +pThe deployer uses an unpacked web application as input (see the list of the +properties used by the deployer below). A web application which +is programatically deployed with the deployer may include Tomcat specific +deployment configuration, by including a Context configuration XML file in +code/META-INF/context.xml/code./p pThe deployer package includes a ready to use Ant script, with the following targets: 1.2 +4 -0 jakarta-tomcat-catalina/webapps/docs/html-manager-howto.xml Index: html-manager-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/html-manager-howto.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- html-manager-howto.xml15 Jan 2003 03:40:43 - 1.1 +++ html-manager-howto.xml30 Jul 2003 18:37:06 - 1.2 @@ -413,6 +413,10 @@ pUse the iBrowse/i button to select a WAR file to upload to the server from your local desktop system./p +pThe .WAR file may include Tomcat specific deployment configuration, by +including a Context configuration XML file in +code/META-INF/context.xml/code./p + pUpload of a WAR file could fail for the following reasons:/p ul liemFile uploaded must be a .war/em 1.7 +4 -0 jakarta-tomcat-catalina/webapps/docs/manager-howto.xml Index: manager-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/manager-howto.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- manager-howto.xml 25 Jun 2003 02:24:51 - 1.6 +++ manager-howto.xml 30 Jul 2003 18:37:06 - 1.7 @@ -286,6 +286,10 @@ later be undeployed (and the corresponding application directory removed) by use of the code/undeploy/code./p +pThe .WAR file may include Tomcat specific deployment configuration, by +including a Context configuration XML file in +code/META-INF/context.xml/code./p + pURL parameters include: ul licodeupdate/code: When set to true, any existing update will be - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs/config context.xml engine.xml host.xml resources.xml
remm2003/07/30 11:37:51 Modified:webapps/docs/config context.xml engine.xml host.xml resources.xml Log: - Document the background processing feature. - Document configuration of the resource cache. Revision ChangesPath 1.5 +22 -3 jakarta-tomcat-catalina/webapps/docs/config/context.xml Index: context.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/context.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- context.xml 15 Jan 2003 03:40:44 - 1.4 +++ context.xml 30 Jul 2003 18:37:51 - 1.5 @@ -47,10 +47,13 @@ pIn addition to nesting strongContext/strong elements inside a a href=host.htmlHost/a element, you can also store them in - individual files (with a .xml extension) in the codeappBase/code - directory for a Host. See + individual files (with a .xml extension) in the + code$CATALINA_HOME/conf/[enginename]/[hostname]//code directory. See a href=host.html#Automatic Application DeploymentAutomatic - Application Deployment/a for more information./p + Application Deployment/a for more information. This method allows dynamic + reconfiguration of the web application, since the main + codeconf/server.xml/code file cannot be reloaded without restarting + Tomcat./p pIn addition to explicitly specified Context elements, there are several techniques by which Context elements can be created automatically @@ -80,6 +83,22 @@ support the following attributes:/p attributes + + attribute name=backgroundProcessorDelay required=false +pThis value represents the delay in seconds between the +invocation of the backgroundProcess method on this context and +its child containers, including all wrappers. +Child containers will not be invoked if their delay value is not +negative (which would mean they are using their own processing +thread). Setting this to a positive value will cause +a thread to be spawn. After waiting the specified amount of time, +the thread will invoke the backgroundProcess method on this host +and all its child containers. A context will use background +processing to perform session expiration and class monitoring for +reloading. If not specified, the default value for this attribute is +-1, which means the context will rely on the background processing +thread of its parent host./p + /attribute attribute name=className required=false pJava class name of the implementation to use. This class must 1.4 +13 -0 jakarta-tomcat-catalina/webapps/docs/config/engine.xml Index: engine.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/engine.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- engine.xml15 Jan 2003 03:40:44 - 1.3 +++ engine.xml30 Jul 2003 18:37:51 - 1.4 @@ -39,6 +39,19 @@ attributes + attribute name=backgroundProcessorDelay required=false +pThis value represents the delay in seconds between the +invocation of the backgroundProcess method on this engine and +its child containers, including all hosts and contexts. +Child containers will not be invoked if their delay value is not +negative (which would mean they are using their own processing +thread). Setting this to a positive value will cause +a thread to be spawn. After waiting the specified amount of time, +the thread will invoke the backgroundProcess method on this engine +and all its child containers. If not specified, the default value for +this attribute is 10, which represent a 10 seconds delay./p + /attribute + attribute name=className required=false pJava class name of the implementation to use. This class must implement the codeorg.apache.catalina.Engine/code interface. 1.5 +17 -1 jakarta-tomcat-catalina/webapps/docs/config/host.xml Index: host.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/host.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- host.xml 28 Jun 2003 18:48:59 - 1.4 +++ host.xml 30 Jul 2003 18:37:51 - 1.5 @@ -78,6 +78,22 @@ Deployment/a for more information./p /attribute + attribute name=backgroundProcessorDelay required=false +pThis value represents the delay in seconds
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2003/07/30 11:42:05 Modified:webapps/docs changelog.xml Log: - Revert patch (sorry, I can't read or do anything mail related after the server switch): I prefer having a centralized management of the changelog (and if you'd like to do it, you need to put the entry under the right version number, otherwise, it's misleading - it's 5.0.6 now). Revision ChangesPath 1.12 +0 -4 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- changelog.xml 30 Jul 2003 04:55:37 - 1.11 +++ changelog.xml 30 Jul 2003 18:42:05 - 1.12 @@ -812,10 +812,6 @@ scode Fix javadoc generation for the connectors (costin) /scode - fix - bug21984/bug: Fix potential DoS condition when processing a malformed - request URI using the Jk-Coyote Connector (billbarker) - /fix /changelog - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager Constants.java StatusManagerServlet.java
remm2003/07/30 11:43:01 Modified:webapps/manager/WEB-INF/classes/org/apache/catalina/manager Constants.java StatusManagerServlet.java Log: - Cleanup. - Add a legend for the scoreboard. Revision ChangesPath 1.5 +4 -4 jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java Index: Constants.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Constants.java29 Jul 2003 12:19:27 - 1.4 +++ Constants.java30 Jul 2003 18:43:01 - 1.5 @@ -180,7 +180,7 @@ table border=\1\ cellspacing=\0\ cellpadding=\3\\n + tr\n + td class=\row-left\ width=\10%\ + -smallb{0}/b/smallnbsp;/td\n + +smallstrong{0}/strong/smallnbsp;/td\n + td class=\row-left\pre{1}/pre/td\n + /tr\n + /table\n + 1.8 +10 -6 jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java Index: StatusManagerServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- StatusManagerServlet.java 28 Jul 2003 17:28:43 - 1.7 +++ StatusManagerServlet.java 30 Jul 2003 18:43:01 - 1.8 @@ -432,6 +432,10 @@ writer.print(/table); +writer.print(p); +writer.print(P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive); +writer.print(/p); + } @@ -446,7 +450,7 @@ int stage = stageValue.intValue(); boolean fullStatus = true; -writer.write(tdb); +writer.write(tdstrong); switch (stage) { @@ -485,7 +489,7 @@ } -writer.write(/b/td); +writer.write(/strong/td); if (fullStatus) { writer.write(td); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util ExtensionValidator.java ManifestResource.java
luehe 2003/07/30 11:48:18 Modified:catalina/src/share/org/apache/catalina/util ExtensionValidator.java ManifestResource.java Log: Fixed NPE. Available and required extensions are now consistently NULL if not present. Previous code was inconsistent, assuming empty HashMap/ArrayList if no available/required extensions were present, but actually never allocating a HashMap/ArrayList in that case. Allocate HashMap/ArrayList objects only when needed. Revision ChangesPath 1.4 +113 -104 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java Index: ExtensionValidator.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ExtensionValidator.java 30 Aug 2002 18:41:26 - 1.3 +++ ExtensionValidator.java 30 Jul 2003 18:48:18 - 1.4 @@ -176,22 +176,21 @@ // - Public Methods /** - * Runtime validation of a Web Applicaiton. + * Runtime validation of a Web Applicaiton. * - * This method uses JNDI to look up the resources located under a - * codeDirContext/code. It locates Web Application MANIFEST.MF - * file in the /META-INF/ directory of the application and all - * MANIFEST.MF files in each JAR file located in the WEB-INF/lib - * directory and creates an codeArrayList/code of - * codeManifestResorcecode objects. These objects are then passed - * to the validateManifestResources method for validation. - * - * @param DirContext The JNDI root of the Web Application - * @param StandardContext The context from which the Logger and path - * to the application - * - * @return true if all required extensions satisfied + * This method uses JNDI to look up the resources located under a + * codeDirContext/code. It locates Web Application MANIFEST.MF + * file in the /META-INF/ directory of the application and all + * MANIFEST.MF files in each JAR file located in the WEB-INF/lib + * directory and creates an codeArrayList/code of + * codeManifestResorcecode objects. These objects are then passed + * to the validateManifestResources method for validation. + * + * @param dirContext The JNDI root of the Web Application + * @param context The context from which the Logger and path to the + *application * + * @return true if all required extensions satisfied */ public static synchronized boolean validateApplication( DirContext dirContext, @@ -203,7 +202,7 @@ // If the application context is null it does not exist and // therefore is not valid if (dirContext == null) return false; -// Find the Mainfest for the Web Applicaiton +// Find the Manifest for the Web Applicaiton try { NamingEnumeration wne = null; wne = dirContext.listBindings(/META-INF/); @@ -254,12 +253,13 @@ // Jump out of the check for this application because it // has no resources } -return validateManifestResources(appName,appManifestResources, logger); +return validateManifestResources(appName, appManifestResources, + logger); } /** - * Return an instance of the ExtensionValidator. - * The ExtensionValidator is a singleton. + * Return an instance of the ExtensionValidator. + * The ExtensionValidator is a singleton. */ public static ExtensionValidator getInstance() { if (validator == null) { @@ -283,86 +283,90 @@ * This method should also provide static validation of a Web Applicaiton * if provided with the necessary parameters. * - * @param String The name of the Application that will appear in the - * error messages - * @param ArrayList A list of codeManifestResource/code objects + * @param appName The name of the Application that will appear in the + *error messages + * @param resources A list of codeManifestResource/code objects * to be validated. - * @param Logger A logger to which failure messages are logged. + * @param logger A logger to which failure messages are logged. * * @return true if manifest resource file requirements are met - * */ private static boolean
Re:to: Tomcat under load problems - Use 'java -Xss' to increase default stack size
Yes - Tomcat is running as an http server too. We are running load tests to see if we can reproduce this problem. I==Date: Tue, 29 Jul 2003 21:48:23 -0500 From: Glenn Nielsen [EMAIL PROTECTED] Subject: Re: Tomcat under load problems - Use 'java -Xss' to increase default stack siz Content-Type: text/plain; charset=us-ascii; format=flowed I have been running Tomcat in production on serveral Solaris servers with -Xss reduced down to 128K for years. This is for jdk 1.3.1. We have had no problems with exceeding the stack size. I am not familiar enough with linux to get very specific. First thing is to see if it is application related. Try load testing Tomcat using some example applications to see if it still has stack problems. If there are no problems, then use OptimizeIt or JProbe to profile your application. That may give you some hints at what to look at. Is Tomcat being run as the http server or do you have it behind apache so apache can serve static content? You might try switching JVM's to see if that changes anything. Just a few stabs in the dark. Others who use linux may have more specific ideas on how to troubleshoot this. Regards, Glenn Rau NF wrote: Hi - My apologies for posting on this but we really need some help on this. We have seen this problem showing up on Tomcat 4.1.24 (/JDK 1.4.2 from Sun/Linux) after running tomcat for a few hours. Fatal: Stack size too small. Use 'java -Xss' to increase default stack size. We have set the stack size to 1024k (and also 1536k) and we still get this error. Heap size is -Xms/Xmx 1.5 Gb. We are running RedHat 8.x (Linux 2.4.18-19.8.0smp #1 SMP Thu Dec 12 04:36:25 EST 2002 i686 i686 i386 GNU/Linu) Not sure if this is an application bug (recursion) or something to do with Tomcat. There is no other error message/exception in any of the tomcat log files. Is there a way to track this down by enabling verbose Tomcat logging ? Any pointers will be *very, very* helpful Thanks S Rau __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jasper Cocoon's Eclipse Compiler Plugin
Hi, I'm experimenting with embedding Jasper/JSP 2.0 into production servlet 2.3 containers / JSP 1.2. That works surprisingly well, using an alternative lib directory and an additional classloader. (I want to run tagfiles in Websphere,Dynamo,... before 2005.) Anwyay, one of the obstacles is Jasper's requirement for the container's URLClassLoader for assembling a classpath for the compiler. The cocoon project has solved this by using an Eclipse Java compiler plugin that reads classes on demand from the thread context classloader. I.e. no jar location is needed. I've patched Jasper to use that compiler plugin instead of ant and it works very well so far. It's even much faster than javac. Is there interest to incorporate that compiler and remove the URLClassLoader requirement ? Matthias -- Matthias Ernst Software Engineer CoreMedia - Smart Content Technology - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util ExtensionValidator.java ManifestResource.java
luehe 2003/07/30 15:29:23 Modified:catalina/src/share/org/apache/catalina/util ExtensionValidator.java ManifestResource.java Log: More clean up and bug fix (system resources were identified but then ignored when checking if an app's dependencies could be resolved) Revision ChangesPath 1.5 +91 -98 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java Index: ExtensionValidator.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/ExtensionValidator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ExtensionValidator.java 30 Jul 2003 18:48:18 - 1.4 +++ ExtensionValidator.java 30 Jul 2003 22:29:23 - 1.5 @@ -117,56 +117,42 @@ * * This private constructor loads the container level extensions that are * available to all web applications. This method scans all extension - * directories available to via the java.ext.dirs System property. + * directories available via the java.ext.dirs System property. * * The System Class-Path is also scanned for jar files that may contain * available extensions. The system extensions are loaded only the * first time an instance of the ExtensionValidator is created. */ private ExtensionValidator() { - -// load the container level extensions -containerManifestResources = new ArrayList(); + // check for container level optional packages -String systemClasspath = System.getProperties(). - getProperty(java.class.path); +String systemClasspath = System.getProperties().getProperty(java.class.path); StringTokenizer strTok = new StringTokenizer(systemClasspath, File.pathSeparator); -ArrayList items = new ArrayList(); + // build a list of jar files in the classpath while (strTok.hasMoreTokens()) { String classpathItem = strTok.nextToken(); if (classpathItem.toLowerCase().endsWith(.jar)) { -items.add(classpathItem); +addSystemResource(new File(classpathItem)); } } + // get the files in the extensions directory -String extensionsDir = System.getProperties(). -getProperty(java.ext.dirs); -StringTokenizer extensionsTok = null; +String extensionsDir = System.getProperties().getProperty(java.ext.dirs); if (extensionsDir != null) { -extensionsTok = new StringTokenizer(extensionsDir, - File.pathSeparator); -} -while ((extensionsTok != null) extensionsTok.hasMoreTokens()) { -String targetDir = extensionsTok.nextToken(); -// check if the directory exits -if (((new File(targetDir)).exists()) -(new File(targetDir)).isDirectory()) { -// get a file list -File[] files = (new File(targetDir)).listFiles(); -// see if any file is a jar file -for (int loop = 0; loop files.length; loop++) { -if (files[loop].getName().toLowerCase().endsWith(.jar)) { -items.add(files[loop].getAbsolutePath()); -Manifest manifest = getManifest(files[loop]); -if (manifest != null) { -ManifestResource mre = new ManifestResource -(files[loop].getAbsolutePath(), manifest, - ManifestResource.SYSTEM); -containerManifestResources.add(mre); -} +StringTokenizer extensionsTok += new StringTokenizer(extensionsDir, File.pathSeparator); +while (extensionsTok.hasMoreTokens()) { +File targetDir = new File(extensionsTok.nextToken()); +if (!targetDir.exists() || !targetDir.isDirectory()) { +continue; +} +File[] files = targetDir.listFiles(); +for (int i = 0; i files.length; i++) { +if (files[i].getName().toLowerCase().endsWith(.jar)) { +addSystemResource(files[i]); } } } @@ -226,29 +212,30 @@ } // Locate the Manifests for all necessary Jar Files in the Application ArrayList jarEntries = new ArrayList(); -NamingEnumeration ne =
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteConnector.java mbeans-descriptors.xml
luehe 2003/07/30 17:19:42 Modified:catalina/src/share/org/apache/coyote/tomcat5 CoyoteConnector.java mbeans-descriptors.xml Log: Added new sslProtocol property + minor javadoc edits The protocol property is a little confusing, as it means different things in different classes: - In CoyoteConnector, it refers to the Coyote protocol name (i.e., HTTP/1.1 or AJP/1.3). - In Http11Processor and CoyoteServerSocketFactory, it refers to the SSL protocol variant. We may want to fix this. Revision ChangesPath 1.18 +32 -6 jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteConnector.java Index: CoyoteConnector.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteConnector.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- CoyoteConnector.java 29 Jul 2003 16:29:57 - 1.17 +++ CoyoteConnector.java 31 Jul 2003 00:19:42 - 1.18 @@ -819,10 +819,9 @@ /** - * Set the Coyote protocol which will be used - * by the connector. + * Set the Coyote protocol which will be used by the connector. * - * @param protocolHandlerClassName The new class name + * @param protocol The Coyote protocol name */ public void setProtocol(String protocol) { @@ -1317,9 +1316,11 @@ IntrospectionUtils.setProperty(protocolHandler, secure, + false); } + /* Set the configured properties. This only sets the ones that were - explicitly configured. Default values are the responsibility of - the protocolHandler. */ + * explicitly configured. Default values are the responsibility of + * the protocolHandler. + */ Iterator keys = properties.keySet().iterator(); while( keys.hasNext() ) { String name = (String)keys.next(); @@ -1519,6 +1520,31 @@ ServerSocketFactory factory = getFactory(); if (factory instanceof CoyoteServerSocketFactory) { ((CoyoteServerSocketFactory)factory).setCiphers(ciphers); +} +} + +/** + * Gets the SSL protocol variant to be used. + * + * @return SSL protocol variant + */ +public String getSslProtocol() { +ServerSocketFactory factory = getFactory(); +if (factory instanceof CoyoteServerSocketFactory) { +return ((CoyoteServerSocketFactory)factory).getProtocol(); +} +return null; +} + +/** + * Sets the SSL protocol variant to be used. + * + * @param sslProtocol SSL protocol variant + */ +public void setSslProtocol(String sslProtocol) { +ServerSocketFactory factory = getFactory(); +if (factory instanceof CoyoteServerSocketFactory) { +((CoyoteServerSocketFactory)factory).setProtocol(sslProtocol); } } 1.3 +4 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/mbeans-descriptors.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mbeans-descriptors.xml11 Jul 2003 01:04:43 - 1.2 +++ mbeans-descriptors.xml31 Jul 2003 00:19:42 - 1.3 @@ -32,6 +32,10 @@ description=Comma-separated list of SSL cipher suites to be enabled type=java.lang.String/ +attribute name=sslProtocol + description=SSL protocol variant to be used + type=java.lang.String/ + attribute name=connectionTimeout description=Timeout value on the incoming connection type=int/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]