Re: JNDI, resource and LDAP Trouble
I have tried this before - with little success. The code does not through any exception now - but the DirContext object (ctx) is null and by that unusable: DirContext ctx = (DirContext) newCtx.lookup(java:comp/env/blah); if (ctx != null){ System.out.println (True); } else { System.out.println (False); } The code we use is // Initialize context. context = new InitialContext(); Context envCtx = (Context) context.lookup(java:comp/env); // Initialize object from lookup. Object object = envCtx.lookup(getJndiLookup()); if (object != null) { // Initialize session. return (Session) object; } else { // Print debug. LogLog.debug(Invalid message object returned from JDNI lookup.); } getJndiLokup returns a string, e.g. mail/Session. As long as this matches up with context.xml resources section, all works. Only problem we've had is that the classes required for whatever resource need to be in tomcat/lib as the resource is initialized at tomcat startup. Are you sure you check all the log files for exceptions? I have also tried to list the bindings on comp/env - but there I also get a NullPointerException: NamingEnumeration ne = newCtx.listBindings(java:comp/env); while(ne.hasMore()) { Binding b = (Binding) ne.next(); System.out.println(b.getName() + + b.getObject()); } Any good suggestion to what is going on? I think that I read that you could enable debugging on a resource definition - but I seem not to find it any again. NOTE: If I use the more regular approach to connect to the ldap server in another servlet - then I have no trouble at all (just to verify the credentials): Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.ldap.LdapCtxFactory); env.put(Context.PROVIDER_URL, ldap:// 192.168.7.1:389/dc=blah,dc=com); env.put(Context.SECURITY_AUTHENTICATION, simple); env.put(Context.SECURITY_PRINCIPAL, cn=blah); env.put(Context.SECURITY_CREDENTIALS, blahblah); DirContext ctx = null; try { ctx = new InitialDirContext(env); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } Our apps use spring security - we have ldap working there and it works a treat. Don't know if that's an option for you Chris
Re: pure tomcat failover (no loadbalacing)
On Wed, 27 Apr 2011 21:15:36 +0100, Guillaume Favier wrote: On Wed, Apr 27, 2011 at 8:55 PM, Felix Schumacher felix.schumac...@internetallee.de wrote: Am Mittwoch, den 27.04.2011, 19:20 +0100 schrieb Guillaume Favier: Felix, Dis you check my workaround ? On Wed, Apr 27, 2011 at 7:01 PM, Felix Schumacher felix.schumac...@internetallee.de wrote: Am Mittwoch, den 27.04.2011, 10:21 +0200 schrieb Felix Schumacher: On Wed, 27 Apr 2011 09:58:45 +0200, Felix Schumacher wrote: On Tue, 26 Apr 2011 21:24:16 +0100, Guillaume Favier wrote: Thanks for your answer Felix, Well, after rethinking my original answer, I think you will have to define two clusters: worker.list=cluster1,cluster2 ... worker.c2t2.type=ajp13 worker.c2t2.host=localhost worker.c2t2.port=9002 worker.c2t2.redirect=c1t1 Aargh, this should be worker.c2t2.redirect=c2t1 Ok, last correction. redirect takes the name of the jvmRoute, not that of the worker. So those two configuration entries should be worker.c2t2.redirect=tomcat1 worker.c1t1.redirect=tomcat2 argh you're right, but with my work around you can avoid dealing with the route, it is a bit more scalable. I implement a workaround by dealing with lbfactor : worker.c1t1.lbfactor=100 worker.c1t1.redirect=cluster1 worker.c1t2.lbfactor=1 worker.c1t2.redirect=cluster1 #worker.c1t2.activation=disabled It is very unlikely that i get 100 request on one server. This does looks good but a pretty complex configuration if we move up to three server. And complexity will increase with the number of server. Seems that load balancing is easier than failover. I don't think lbfactor is the right solution for your problem, but I haven't checked it. I think your setup will pass 100 requests to worker c1t1 and then 1 request to worker c1t2 (probably simplified it quite a lot). That will trigger your servlets from your failover instance, which you wanted to circumvent. I am not convinced either by my workaround of your solution but for now that is the best solution. Still looking for a better one. I will put an lbfactor of 10 that will prevent any request on c1t2. And if c1t1 faill, c1t2 will take all request. - I have a defacto working failover. And scalable because i can have a c1t3 with lbfactor of 1. As said already, I don't think lbfactor can be used as a replacement to activation, no matter what factors you choose. I suspect, that you are mounting the tomcatX workers directly instead of the clusters. If your are doing that, you will have no loadbalancing nor failover. If you are mounting two clusters, as I haven showed in my examples, there really is no difference in complexity between loadbalancing with lbfactor and failover. Wondering about your config Felix As stated in my correction above, redirect takes the name of the jvmRoute and I doubt, that your tomcat instance is called cluster1, so that statement will be wrong. I got it, and thanks for pointing that out, if I had rtfm correctly earlier, I might have spare quite a lot of time. You are right that loadbalancing is simpler than my example with two clusters, but that is because your original requirement were more complex then simple loadbalancing. If you have the memory resources for simple loadbalancing I would go for it. I can't afford it, as I spotted in my original mail : 1 webapp is around 400M, at any time I have 6-8webapp (and increasing) started on each server. I would go from 5-6gig to potentialy 10-12 : i am pretty sure some people might disagree with that (me, for one), with this solution almost all the memory is used (few spare), if something failed : I have enough time to react. Regard gui Regards Felix gui Regards Felix Bye Felix You will have to set jvmRoute in your tomcats to tomcat1 and tomcat2. To mount your webapps, you can use JkMount /ABC* cluster1 JkMount /DEF* cluster2 Regards Felix On Tue, Apr 26, 2011 at 8:36 PM, Felix Schumacher felix.schumac...@internetallee.de wrote: On Mon, 25 Apr 2011 09:40:59 +0100, Guillaume Favier wrote: Hi, I have 2 tomcat 5.5 server. Each of them handling a set (50+) of third party webapps name /ABC* and /DEF*. Each of these webapp is quite memory consumming when started (more than 300M). I would like all connection to ABC* webapps be handled by tomcat server 1, and connection to webapps DEF* to be handled by tomcat server 2. My objectives are : * server 1 to be failover of server2 and server2 failover of server1. * any webapp should be instanciate on only one server otherwise it might trigger a memory overload So I set up my httpd.conf as is : JkWorkersFile conf/worker.properties JkOptions +ForwardKeySize
RE: (Issue) Tomcat 7.0.12 silent install
There is no 32-bit-only Windows service installer My bad. I'm using the 32/64-bit Windows service installer. I installed a 64-bit JRE and then executed a silent install and that worked. The concern with running a 64-bit JVM is that it may behave slightly different than the 32-bit JVM (what we're currently using) and we are on a tight schedule to get our application up and running for production on a Windows 2008 server. We would prefer to use a 32-bit JVM. Is there documented procedure for installting Tomcat using the 32-bit zip file? John -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, April 27, 2011 4:55 PM To: Tomcat Users List Subject: RE: (Issue) Tomcat 7.0.12 silent install From: John Marcinek [mailto:john.marci...@pb.com] Subject: RE: (Issue) Tomcat 7.0.12 silent install I've been installing the 32-bit version of Tomcat (sorry, don't think I mentioned that). There is no 32-bit-only Windows service installer, but there are 32- or 64-bit specific .zip files. Exactly which one are you using? I'm a little puzzled as to why the 64-bit JVM is necessary since I was able to successfully install Tomcat 7.0 using the wizard I suspect the silent installer just looks at the OS type and assumes the JVM matches, but I'm not positive about that. I don't know what the impact is of using a 64-bit JVM with Tomcat. Pretty much none, other than slightly increased memory usage, but with the option of a greatly expanded heap if needed. The application that will run under Tomcat uses JSPs that have not been compiled and tested with a 64 bit JDK. There's no such thing as compiling for a 32- or 64-bit JVM; both use the same byte codes in the same class files. I assume a JDK for compiling the JSPs under Tomcat can be specifed separately from the JVM that Tomcat runs on. Generally not; JSPs are normally compiled on first reference, under the JVM Tomcat is running on. You can pre-compile them, but that's really only for the performance purists. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
If the installer can't find the JVM then things could go wrong. When I install Tomcat on the 64-bit system using the wizard I had to tell the installer the location of the 32-bit JRE. Doing a silent install fails since it can't find the JRE. I then installed the 64-bit JRE. The Tomcat installer picked that right up. You'd have to check the nsis script to see how JVM detection is done Where would I find the NSIS script? John -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Wednesday, April 27, 2011 5:27 PM To: Tomcat Users List Subject: Re: (Issue) Tomcat 7.0.12 silent install On 27/04/2011 21:55, Caldarale, Charles R wrote: From: John Marcinek [mailto:john.marci...@pb.com] Subject: RE: (Issue) Tomcat 7.0.12 silent install I've been installing the 32-bit version of Tomcat (sorry, don't think I mentioned that). There is no 32-bit-only Windows service installer, but there are 32- or 64-bit specific .zip files. Exactly which one are you using? I'm a little puzzled as to why the 64-bit JVM is necessary since I was able to successfully install Tomcat 7.0 using the wizard I suspect the silent installer just looks at the OS type and assumes the JVM matches, but I'm not positive about that. The Windows installer is now smarter than that. It looks at the JVM, determines 32-bit or 64-bit and then installs the native binaries and service wrapper that match the JVM. If the installer can't find the JVM then things could go wrong. You'd have to check the nsis script to see how JVM detection is done - I don't recall off-hand. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connection pool race condition
You could use Windows' service dependency management ( http://support.microsoft.com/kb/193888) to start Tomcat only after Oracle reports that it's running. This might still cause problems if Oracle does the same as SQL Server and continues recovering after its official startup has finished. In that case, I'd try to write a small service that polled Oracle every few seconds till it started, then reported itself as started, and make Tomcat dependent on that. Service creation in Windows isn't too hard, but it's another moving part to support! - Peter On 27 April 2011 21:18, chris derham ch...@derham.me.uk wrote: All, So we have various tomcat services setup on windows. When windows updates are auto installed, sometimes they force a reboot of the server. When this happens, the tomcats win the race with the database (Oracle) to startup. Then the connection pool can't start, and then the war file is flagged as shutdown. We have tried to make the tomcat services dependent on the oracle service (both db service and tns listener), but same happens. Just tried to turn the connection pool initial size down to zero, but the app fetches some config at startup. I guess we could recode to lazily fetch this upon first access. Just curious if anyone has hit this, and if there is a way to delay the tomcat service startup. Tomcat 7.0.12 Windows server 2008 r2 64 bit java -version java version 1.6.0_24 Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode) We have connection pool setup in catalina_base\conf\context.xml Resource name=jdbc/xts auth=Container type=javax.sql.DataSource username=username password=password driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@localhost:1521:xe maxActive=20 maxIdle=2 minIdle=1 initialSize=2 / 27-Apr-2011 19:48:22 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 27-Apr-2011 19:48:31 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Destroying Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Shutting down log4j 27-Apr-2011 20:25:36 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class liquibase.integration.servlet.LiquibaseServletListener java.lang.RuntimeException: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at liquibase.integration.servlet.LiquibaseServletListener.contextInitialized(LiquibaseServletListener.java:159) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:159) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158) at javax.naming.InitialContext.lookup(InitialContext.java:392) Thanks Chris
Re: Connection pool race condition
On 4/28/2011 8:36 AM, Peter Crowther wrote: You could use Windows' service dependency management ( http://support.microsoft.com/kb/193888) to start Tomcat only after Oracle reports that it's running. This might still cause problems if Oracle does the same as SQL Server and continues recovering after its official startup has finished. In that case, I'd try to write a small service that polled Oracle every few seconds till it started, then reported itself as started, and make Tomcat dependent on that. Service creation in Windows isn't too hard, but it's another moving part to support! Is there something the app can do to reset the pool once it starts? If so, what about a ServletcontextListener that tests the oracle connection at startup, and doesn't allow it to continue until it's ready? Or is that just not possible? - Peter On 27 April 2011 21:18, chris derhamch...@derham.me.uk wrote: All, So we have various tomcat services setup on windows. When windows updates are auto installed, sometimes they force a reboot of the server. When this happens, the tomcats win the race with the database (Oracle) to startup. Then the connection pool can't start, and then the war file is flagged as shutdown. We have tried to make the tomcat services dependent on the oracle service (both db service and tns listener), but same happens. Just tried to turn the connection pool initial size down to zero, but the app fetches some config at startup. I guess we could recode to lazily fetch this upon first access. Just curious if anyone has hit this, and if there is a way to delay the tomcat service startup. Tomcat 7.0.12 Windows server 2008 r2 64 bit java -version java version 1.6.0_24 Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode) We have connection pool setup in catalina_base\conf\context.xml Resource name=jdbc/xts auth=Container type=javax.sql.DataSource username=username password=password driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@localhost:1521:xe maxActive=20 maxIdle=2 minIdle=1 initialSize=2 / 27-Apr-2011 19:48:22 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 27-Apr-2011 19:48:31 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Destroying Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Shutting down log4j 27-Apr-2011 20:25:36 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class liquibase.integration.servlet.LiquibaseServletListener java.lang.RuntimeException: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at liquibase.integration.servlet.LiquibaseServletListener.contextInitialized(LiquibaseServletListener.java:159) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:159) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158) at javax.naming.InitialContext.lookup(InitialContext.java:392) Thanks Chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail:
Re: pure tomcat failover (no loadbalacing)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Felix and Guillaume, I think you guys are working too hard for this. Isn't it as simple as using a redirect from each worker to the other, with no clustering or anything like that? You don't even need to set jvmRoute, etc. since there's no cluster. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25fNIACgkQ9CaO5/Lv0PBNDgCgiVLMqKNj6WEX4GrHrpNVHekL bn4An2SDMZPE37tkcLCxnknf2/9TUyAD =+X7N -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Accessing (session) Manager in servlet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Juriy, On 4/27/2011 4:08 PM, Juriy Bura wrote: I need to access the Manager from the servlet (or filter) in Tomcat to load the custom session by custom session ID. Wait, what? Answering your next question: why do I need it. There's an old bug in Flash that causes it to send cookies from IE and not from the current browser. So, if I'm in FF and I'm trying to upload the file with SWFUpload I end up with the wrong session and an error. Wait, what? I want to add the magic parameter to POST that should override the default (wrong) session id, then load the custom session instead of one loaded by Tomcat. I can't use URL rewriting since cookies are resolved first, and when flash sends wrong cookie from IE, Tomcat doesn't try to load the session from url-rewritten address. Have you tried disabling cookie-based session handling? That might solve all your problems. I'd appreciate any other hint how to access Manager from context or a solution of the original problem. Why do you need to access the Manager? What do you mean by Manager? The class/object or the webapp? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25fi8ACgkQ9CaO5/Lv0PCcJgCgrtfqO9SsxqgFhnx1GuHo2re7 PaYAoLUlUF4wFApmvv3XfRgq+BEaQ/Mi =2Ivn -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Logrotate killing Tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alex, On 4/27/2011 3:31 PM, Alex Carvalho da Silva wrote: It's a catalina.out log. There isn't anything before that. There is 4 instance running and only with this I have problem. I discovered that this problem occurs when logrotate runs, but there isn't tomcat script on the /etc/logrotate.d/ Sounds like your Tomcat process is stopping and you're just guessing that it's logrotate. If logrotate isn't set up to do anything with Tomcat, why do you think logrotate is stopping Tomcat? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25fogACgkQ9CaO5/Lv0PAuqgCfWqZ7yVhcDya+FN2sqbwxDnQ6 FE8An39Z3zmoTRvhzIvKEmg9Jddzy9WX =mY06 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tolerate expired certificates
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 4/26/2011 4:40 PM, Thomas Hill wrote: thanks for your reply. So does this mean no way on Tomcat 5.5? (as I won't switch to a newer version, especially 7.x any time soon) There is another way to install your trust manager: we used this TrustManager with a foolish service that never renewed their certificates and we kept getting similar errors -- although this was for server certs and not client certs. I suppose the same technique works for both, since a TrustManager has methods to cover both cases. Try something like this: TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { public X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted(X509Certificate[] certs, String authType) { } public void checkServerTrusted(X509Certificate[] certs, String authType) { } } }; SSLContext sc = SSLContext.getInstance(SSL); sc.init(null, trustAllCerts, new java.security.SecureRandom()); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); That last line is specific to ignoring problems with /server/ certs when contacting them through the HttpsURLConnection class. You'll have to poke around to find out how to set the SSLContext and/or SocketFactory for Tomcat's Connectors. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25gFEACgkQ9CaO5/Lv0PBi2QCfUfpZcMoBsvSvIYYRU9xL6l6q kGUAnA1ZZqzTTGxq0SbHxxCewwOEvQfV =tFuG -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access session between multiple contexts?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/27/2011 8:58 AM, Caldarale, Charles R wrote: From: Gregor Schneider [mailto:rc4...@googlemail.com] Subject: How to access session between multiple contexts? I have enabled the SingleSignOnValve (although authorization is handled via some Spring-stuff) but I thought it is needed to share the session among different contexts. No, the SSO valve does not cause sessions to be shared across contexts - that would be a spec violation. All it does is replicate authentication/authorization information across the associated contexts of a given Host. I would think you could use a listener in each context that could propagate session changes across webapps via some data structures maintained by a shared class. Don't know if such exists already, or if you'd have to create it. Gregor could cheat and write a session-data-fetch servlet in the main webapp and call it from the ancillary webapp. Just use URL-based session ids when you call and it should work. Gregor, what are your options for simply adding your code to the CMS webapp and not bothering with the added complexity of a second webapp? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25gSAACgkQ9CaO5/Lv0PA5eQCgpms5Uohaj9gAvN6UH+z4XRfL 6UgAoICuqOqbfOrZ9MJFCNC1A4otla5i =9A/9 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 7: is it possible to config tomcat common classloader to point to other location?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yongqin, On 4/26/2011 6:57 PM, Yongqin Xu wrote: I am using TC 7, and the doc says, TC common classloader load $CATALINA_HOME/lib for thosecommonly shared lib jar files. Is it possible for me to config it pointing to other location? I know ifI define $CATALINA_BASE to point to a outside location, will $CATALINA_BASE/lib be used for TCcommon classloader to pick up there? Take a look at conf/catalina.properties: common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar Looks like both are used. You can define this property to be anything you'd like, including adding another directory somewhere else without disturbing anything. Note that changing catalina.properties will be surprising to anyone who tries to debug your Tomcat installation after you move-on to another job. So, be sure to explicitly document what you're doing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25glkACgkQ9CaO5/Lv0PDdTQCdGIjx93eqJl8/qr6ZjjcW41kQ zXMAn0sSANteGM+OWHCvvWxBK2os+13a =kfal -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CPing/CPong issue ever with mod_jk 1.2.31
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fernando, On 4/25/2011 4:51 PM, Fernando Mercês wrote: These lines are from mod_jk.log file. Can anyone help me on how to interpret these entry fields? Particularly the second field between brackets and the fifth field between parenthesis. I would like to know what is this. [Mon Apr 18 09:02:33.223 2011] [380:34] [error] ajp_connect_to_endpoint::jk_ajp_common.c (985): (inter02-cadun-i3) cping/cpong after connecting to the backend server failed (errno=145) [380:34] is [pid:tid] of the process and thread. ajp_connect_to_endpoint::jk_ajp_common.c (985) is the file and line number on which the error occurred. So, if you look at jk_ajp_common.c on line 985, you'll find that it's in the ajp_connect_to_endpoint function: if (rc == JK_FALSE) jk_log(l, JK_LOG_ERROR,// Line 985 (%s) cping/cpong after connecting to the backend server failed (errno=%d), ae-worker-name, ae-last_errno); All of this is in the code: you only have to look at two source files to discover what I have posted. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25hjoACgkQ9CaO5/Lv0PAa1gCgqa0hbG0N+zrrPfcB+iJ0VWbQ r+YAn2uW3ALK3yNM61uZG2GPLf+QRn+d =ywky -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SessionExample from the examples webapp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 János, On 4/27/2011 4:26 PM, János Löbb wrote: Adding some -claspath based upon man javac, I reduced the number of errors to two. Save yourself some time and use the build scripts that come with Tomcat: they are capable of building TC with no errors because they include all the dependencies, etc. in whatever classpath is necessary at the time. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25hsIACgkQ9CaO5/Lv0PA7kQCgws+TcyXomdCY9LvXkhhxxL2i RRwAnRM2L2FGGLGvJF0/Ep21ZJzb2vO7 =947o -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SessionExample from the examples webapp
Hi Chris, Thanks a lot for the suggestion. Where should I look for those scripts ? In the meantime I solved - hopefully - my problem. For some reason the javac did not recognized the util folder or the util package declaration in HTMLFilter.java in the util folder. So I moved it out from the util folder one level up and commented out the package declaration. The this line of javac worked: bml0065:tomcat administrator$ sudo javac -classpath lib/servlet-api.jar:webapps/examples/WEB-INF/classes -verbose webapps/examples/WEB-INF/classes/SessionExample.java [parsing started webapps/examples/WEB-INF/classes/SessionExample.java] [parsing completed 18ms] [search path for source files: lib/servlet-api.jar,webapps/examples/WEB-INF/classes] [search path for class files: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar,/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar,/System/Library/Java/Extensions/AppleScriptEngine.jar,/System/Library/Java/Extensions/dns_sd.jar,/System/Library/Java/Extensions/j3daudio.jar,/System/Library/Java/Extensions/j3dcore.jar,/System/Library/Java/Extensions/j3dutils.jar,/System/Library/Java/Extensions/jai_codec.jar,/System/Library/Java/Extensions/jai_core.jar,/System/Library/Java/Extensions/mlibwrapper_jai.jar,/System/Library/Java/Extensions/MRJToolkit.jar,/System/Library/Java/Extensions/QTJava.zip,/System/Library/Java/Extensions/vecmath.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar,/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar,lib/servlet-api.jar,webapps/examples/WEB-INF/classes] [loading java/io/IOException.class(java/io:IOException.class)] [loading java/io/PrintWriter.class(java/io:PrintWriter.class)] [loading java/util/Date.class(java/util:Date.class)] [loading java/util/Enumeration.class(java/util:Enumeration.class)] [loading java/util/ResourceBundle.class(java/util:ResourceBundle.class)] [loading javax/servlet/ServletException.class(javax/servlet:ServletException.class)] [loading javax/servlet/http/HttpServlet.class(javax/servlet/http:HttpServlet.class)] [loading javax/servlet/http/HttpServletRequest.class(javax/servlet/http:HttpServletRequest.class)] [loading javax/servlet/http/HttpServletResponse.class(javax/servlet/http:HttpServletResponse.class)] [loading javax/servlet/http/HttpSession.class(javax/servlet/http:HttpSession.class)] [loading javax/servlet/GenericServlet.class(javax/servlet:GenericServlet.class)] [loading javax/servlet/Servlet.class(javax/servlet:Servlet.class)] [loading java/lang/Object.class(java/lang:Object.class)] [loading javax/servlet/ServletConfig.class(javax/servlet:ServletConfig.class)] [loading java/io/Serializable.class(java/io:Serializable.class)] [loading java/lang/Override.class(java/lang:Override.class)] [loading java/lang/annotation/Annotation.class(java/lang/annotation:Annotation.class)] [loading java/lang/annotation/Target.class(java/lang/annotation:Target.class)] [loading java/lang/annotation/ElementType.class(java/lang/annotation:ElementType.class)] [loading java/lang/annotation/Retention.class(java/lang/annotation:Retention.class)] [loading java/lang/annotation/RetentionPolicy.class(java/lang/annotation:RetentionPolicy.class)] [checking SessionExample] [loading java/lang/Error.class(java/lang:Error.class)] [loading java/lang/Exception.class(java/lang:Exception.class)] [loading java/lang/Throwable.class(java/lang:Throwable.class)] [loading java/lang/RuntimeException.class(java/lang:RuntimeException.class)] [loading java/lang/String.class(java/lang:String.class)] [loading javax/servlet/ServletResponse.class(javax/servlet:ServletResponse.class)] [loading java/io/Writer.class(java/io:Writer.class)] [loading javax/servlet/ServletRequest.class(javax/servlet:ServletRequest.class)] [loading webapps/examples/WEB-INF/classes/HTMLFilter.java] [parsing started webapps/examples/WEB-INF/classes/HTMLFilter.java] [parsing completed 4ms] [loading java/lang/StringBuilder.class(java/lang:StringBuilder.class)] [loading
Re: (Issue) Tomcat 7.0.12 silent install
On 28/04/2011 12:25, john.marci...@pb.com wrote: If the installer can't find the JVM then things could go wrong. When I install Tomcat on the 64-bit system using the wizard I had to tell the installer the location of the 32-bit JRE. Doing a silent install fails since it can't find the JRE. I then installed the 64-bit JRE. The Tomcat installer picked that right up. You'd have to check the nsis script to see how JVM detection is done Where would I find the NSIS script? http://svn.apache.org/viewvc/tomcat/trunk/res/tomcat.nsi?view=log Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: SessionExample from the examples webapp
From: János Löbb [mailto:janos.l...@yale.edu] Subject: Re: SessionExample from the examples webapp Where should I look for those scripts ? The link is on the Tomcat 7 doc page: http://tomcat.apache.org/tomcat-7.0-doc/building.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
From: john.marci...@pb.com [mailto:john.marci...@pb.com] Subject: RE: (Issue) Tomcat 7.0.12 silent install Is there documented procedure for installting Tomcat using the 32-bit zip file? 1) download 2) unzip 3) run service.bat - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
From: john.marci...@pb.com [mailto:john.marci...@pb.com] Subject: RE: (Issue) Tomcat 7.0.12 silent install If the installer can't find the JVM then things could go wrong. When I install Tomcat on the 64-bit system using the wizard I had to tell the installer the location of the 32-bit JRE. Sounds like the 32-bit JRE wasn't installed properly, so the registry entries weren't there to point to the installation location. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access session between multiple contexts?
Hi Chris, first, thanks for your answer, I really do apprecciate it! On Thu, Apr 28, 2011 at 5:00 PM, Christopher Schultz ch...@christopherschultz.net wrote: Gregor could cheat and write a session-data-fetch servlet in the main webapp and call it from the ancillary webapp. Just use URL-based session ids when you call and it should work. Well, as I wrote before, the CMS (Jahia) runs in the ROOT-context. I'd like, if possible, Jahia being untouched, so that I can deploy any hotfixes without having to worry about my tweaks. Gregor, what are your options for simply adding your code to the CMS webapp and not bothering with the added complexity of a second webapp? Well, we do have a support-contract with Jahia Group, and we've opened tickets for that issue, but to no avail. They told us some options using session-attributes, but therefore I have to - you guess it - the session... I don't even know what security-mechanism they are using: Seems some mixture of Spring / CAS, both components where I don't know my ways through. What I've been expecting was to get a cooking-receipe where they have a helloworld-servlet in it's own context, which is integrated into their security-mechanism, but they just don't provide it - for whatever reason I just can't see. Well, we decided for Jahia and signed the contracts already, so there are not too many options. Jahia itself is using portlets heavily, which can be deployed into Jahia as war-files. So my last shot is to migrate our legacy-servlets into portlets, but that's a whole bunch of work, which is blowing up our estimates. I'm just wondering if no other Jahia client has the requirement to connect to any legacy servlets: Maybe they all dumped their old stuff and developed from scratch.. Thanks anyway! Gregor -- just because you're paranoid, don't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ skype:rc46fi - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: pure tomcat failover (no loadbalacing)
Christopher Schultz ch...@christopherschultz.net schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Felix and Guillaume, I think you guys are working too hard for this. Isn't it as simple as using a redirect from each worker to the other, with no clustering or anything like that? You don't even need to set jvmRoute, etc. since there's no cluster. If you are willing to run all webapps on both servers, you are right. But the original requirement was to have one set of webapps on one server and one set on the other, with failover in case of downtime of either one. Felix - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25fNIACgkQ9CaO5/Lv0PBNDgCgiVLMqKNj6WEX4GrHrpNVHekL bn4An2SDMZPE37tkcLCxnknf2/9TUyAD =+X7N -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
When run on a 64-bit Windows system the NSIS script does not check the 32-bit registry path for a JRE. 32-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment 64-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment The difference being that the 32-bit entries are off the Wow6432Node key. John -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Thursday, April 28, 2011 12:04 PM To: Tomcat Users List Subject: Re: (Issue) Tomcat 7.0.12 silent install On 28/04/2011 12:25, john.marci...@pb.com wrote: If the installer can't find the JVM then things could go wrong. When I install Tomcat on the 64-bit system using the wizard I had to tell the installer the location of the 32-bit JRE. Doing a silent install fails since it can't find the JRE. I then installed the 64-bit JRE. The Tomcat installer picked that right up. You'd have to check the nsis script to see how JVM detection is done Where would I find the NSIS script? http://svn.apache.org/viewvc/tomcat/trunk/res/tomcat.nsi?view=log Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Upgrade to apache-tomcat-6.0.32 using JSVC; does not startup
- Upgraded from apache-tomcat-6.0.29 to apache-tomcat-6.0.32 - Recompiled JSVC - Startup failed with message Cannot find daemon loader - As suggested in the tomcat/apache forums, we added 'commons-daemon.jar' to the startup classpath, and changed both the ownership and permissions without success We've successfully upgraded tomcat several times before without any issues. Has anyone else experienced issues upgrading to tomcat 6.0.32/jsvc on SUN Solaris? If so, is there any ideas (other than the ones listed above) that you can offer? $ uname -a SunOS sftpd001 5.10 Generic_142900-03 sun4u sparc SUNW,SPARC-Enterprise $ echo $JAVA_HOME /usr/jdk/jdk1.5.0_23 - error message from logs/catalina.err Switching umask back to 022 from 077 Using default JVM in /usr/jdk/jdk1.5.0_23/jre/lib/sparc/client/libjvm.so Attemtping to load library /usr/jdk/jdk1.5.0_23/jre/lib/sparc/client/libjvm.so JVM library /usr/jdk/jdk1.5.0_23/jre/lib/sparc/client/libjvm.so loaded JVM library entry point found (0xFEC5C7C0) +-- DUMPING JAVA VM CREATION ARGUMENTS - | Version: 0x010004 | Ignore Unrecognized Arguments: False | Extra options: 2 | -verbose (0x) | -Djava.class.path=./bin/bootstrap.jar:./bin/commons-daemon.jar (0x) +--- | Internal options: 4 | -Dcommons.daemon.process.id=11596 (0x) | -Dcommons.daemon.process.parent=11595 (0x) | -Dcommons.daemon.version=1.0.5 (0x) | abort (0x0001475c) +--- Java VM created successfully Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader java_init failed Service exit with a return value of 1 Thanks, leon_thorn...@ncci.com The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. This message may be an attorney-client communication and/or work product and as such is privileged and confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connection pool race condition
this is the way to go, just setup a service dependency On 4/28/2011 7:36 AM, Peter Crowther wrote: You could use Windows' service dependency management ( http://support.microsoft.com/kb/193888) to start Tomcat only after Oracle reports that it's running. This might still cause problems if Oracle does the same as SQL Server and continues recovering after its official startup has finished. In that case, I'd try to write a small service that polled Oracle every few seconds till it started, then reported itself as started, and make Tomcat dependent on that. Service creation in Windows isn't too hard, but it's another moving part to support! - Peter On 27 April 2011 21:18, chris derhamch...@derham.me.uk wrote: All, So we have various tomcat services setup on windows. When windows updates are auto installed, sometimes they force a reboot of the server. When this happens, the tomcats win the race with the database (Oracle) to startup. Then the connection pool can't start, and then the war file is flagged as shutdown. We have tried to make the tomcat services dependent on the oracle service (both db service and tns listener), but same happens. Just tried to turn the connection pool initial size down to zero, but the app fetches some config at startup. I guess we could recode to lazily fetch this upon first access. Just curious if anyone has hit this, and if there is a way to delay the tomcat service startup. Tomcat 7.0.12 Windows server 2008 r2 64 bit java -version java version 1.6.0_24 Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode) We have connection pool setup in catalina_base\conf\context.xml Resource name=jdbc/xts auth=Container type=javax.sql.DataSource username=username password=password driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@localhost:1521:xe maxActive=20 maxIdle=2 minIdle=1 initialSize=2 / 27-Apr-2011 19:48:22 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 27-Apr-2011 19:48:31 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Destroying Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Shutting down log4j 27-Apr-2011 20:25:36 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class liquibase.integration.servlet.LiquibaseServletListener java.lang.RuntimeException: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at liquibase.integration.servlet.LiquibaseServletListener.contextInitialized(LiquibaseServletListener.java:159) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:159) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158) at javax.naming.InitialContext.lookup(InitialContext.java:392) Thanks Chris - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1209 / Virus Database: 1500/3601 - Release Date: 04/27/11 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tolerate expired certificates
The Tomcat hoster tells me OpenSSL is used on the server side (in a reply email from support - I will double-check in a phone call during business hours as this was not my current understanding). Are you confident OpenSSL is refusing the connection to be established when a client certficate that has expired is presented? (so behave the same as IBM's JSSE implementation and then different from Sun's) Am 27.04.2011 18:39, schrieb Chris Beckey: Are you using JSSE or OpenSSL for your SSL implementation? On Tue, Apr 26, 2011 at 4:40 PM, Thomas Hillthomas.k.h...@t-online.dewrote: Hi Felix, thanks for your reply. So does this mean no way on Tomcat 5.5? (as I won't switch to a newer version, especially 7.x any time soon) To your question: Primary reason is I want my fat client java application and my java web application to react the same way when a user supplies an expired certificate. (btw: interesting that Derby and Tomcat both being Apache products behave differently here to start with). I would still check the expiration date as part of the application logic in both scenarios and for expired client certs allow read-only access to the data base only (so misuse the expiry date on the certificate to trigger read-only restrictions). Tx Rgds Am 26.04.2011 21:52, schrieb Felix Schumacher: On Tue, 26 Apr 2011 20:44:38 +0200, Thomas Hill wrote: Hi, I am using clientAuth on Tomcat 5.5.30, JVM version 1.6.0_21-b06 from Sun on Linux. The client certificates are self-generated and signed as I am acting as CA for the client certificates. Authentication is working as expected until the certificate expiry date is reached which is when I am getting ssl_error_certificate_unknown_alert errors returned and the connection is refused. I would like Tomcat to be more tolerant and continue accepting the certificate even after its expiration. Is there a way to change the configuration such that this can be achieved? Note: Sun's JSSE implementation by default (in contrast to IBM's) accepts expired self-signed certificates - I also found this to be the case when my Java application is communicating direct with an Apache Derby Data Base Server running SSL. I would like the same tolerance and behaviour be evidenced when connecting via Tomcat in a web/browser based application environment. I haven't tried it, but it looks like the attribute 'trustManagerClassName' should help you with tomcat 7.11 and newer. I do wonder, why you want expired certificates to be still valid, if you are the ca anyway and could certainly sign new for free. Bye Felix Thanks Thomas - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
From: john.marci...@pb.com [mailto:john.marci...@pb.com] Subject: RE: (Issue) Tomcat 7.0.12 silent install When run on a 64-bit Windows system the NSIS script does not check the 32-bit registry path for a JRE. The difference being that the 32-bit entries are off the Wow6432Node key. Sounds like an enhancement request might be in order... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: (Issue) Tomcat 7.0.12 silent install
On 28/04/2011 19:48, john.marci...@pb.com wrote: When run on a 64-bit Windows system the NSIS script does not check the 32-bit registry path for a JRE. 32-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment 64-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment The difference being that the 32-bit entries are off the Wow6432Node key. That would be a bug then. Please create a bugzilla entry against Tomcat 7 for this. The installer should check 64-bit and then 32-bit registry locations when running on 64-bit Windows. Bugs with patches attached tend to get fixed faster. If you would like to work on a patch and need any pointers then just ask here. Mark John -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Thursday, April 28, 2011 12:04 PM To: Tomcat Users List Subject: Re: (Issue) Tomcat 7.0.12 silent install On 28/04/2011 12:25, john.marci...@pb.com wrote: If the installer can't find the JVM then things could go wrong. When I install Tomcat on the 64-bit system using the wizard I had to tell the installer the location of the 32-bit JRE. Doing a silent install fails since it can't find the JRE. I then installed the 64-bit JRE. The Tomcat installer picked that right up. You'd have to check the nsis script to see how JVM detection is done Where would I find the NSIS script? http://svn.apache.org/viewvc/tomcat/trunk/res/tomcat.nsi?view=log Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Log rotate catalina.out
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Igor, sorry for answering this late, I was quite busy the last days On 04/19/2011 09:04 AM, Igor Cicimov wrote: Hi Thomas, Yes I have reference in the catalina.sh to the log4j.properties file: LOGGING_CONFIG=-Djava.util.logging.config.file=$CATALINA_BASE/conf/log4j.properties this is what I get in the catalina.out on restart: Ok to round thinks up, you have do not set the correct system property for log4j configuration, this is one problem (correct one is: log4j.configuration, as I wrote in my previous mail). INFO: Configuring Log4j from File: /data/apache-tomcat-6.0.29/webapps/application/WEB-INF/etc/log4j-configuration.xml 19/04/2011 4:16:24 PM org.apache.catalina.core.ApplicationContext log INFO: Log4J context Initialized where log4j-configuration.xml is the application XML file located as given in the above log line. So that is being loaded ok. Your application uses a custom placed log4j configuration file, setting the log4j property will break this, but if you follow the advices in the docs (don't set the property, instead place your log4j.properties in $CATALINA_HOME/lib (or for more recent versions of Tomcat in $CATALINA_BASE/lib). For using log4j with Tomcat you need some additional files (read the documentation carefully: http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Using_Log4j). If I remove CONSOLE from the list of root loggers, isn't this going to prevent anything from being logged in the catalina.out file? I would like to keep the useful info from the restart process. Yes it will prevent any log4j lines from being logged to catalina.out. Just look in the real log files. Please don't top post, it really confused me, when I was rereading this mail. HTH and regards, - -- Thomas Freitag -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk25vGcACgkQGE5pHr3PKuUCZACfSNhMJ3aKb1Y2Chy5dI2kp7pw uSsAmwRxzqK0hm0WFisviccmO7oF6F3/ =BKkV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
Sounds like an enhancement request might be in order... I'll make the request. Thanks for all you help. Much appreciated. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Thursday, April 28, 2011 3:05 PM To: Tomcat Users List Subject: RE: (Issue) Tomcat 7.0.12 silent install From: john.marci...@pb.com [mailto:john.marci...@pb.com] Subject: RE: (Issue) Tomcat 7.0.12 silent install When run on a 64-bit Windows system the NSIS script does not check the 32-bit registry path for a JRE. The difference being that the 32-bit entries are off the Wow6432Node key. Sounds like an enhancement request might be in order... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connection pool race condition
There is another solution that should work, and that is to define initialSize=0 so that no attempt is made to contact the DB when it is created. Then set testOnBorrow=true The jdbc-pool project should work like this http://people.apache.org/~fhanik/jdbc-pool/ Filip On 4/28/2011 1:58 PM, Filip Hanik - Dev Lists wrote: this is the way to go, just setup a service dependency On 4/28/2011 7:36 AM, Peter Crowther wrote: You could use Windows' service dependency management ( http://support.microsoft.com/kb/193888) to start Tomcat only after Oracle reports that it's running. This might still cause problems if Oracle does the same as SQL Server and continues recovering after its official startup has finished. In that case, I'd try to write a small service that polled Oracle every few seconds till it started, then reported itself as started, and make Tomcat dependent on that. Service creation in Windows isn't too hard, but it's another moving part to support! - Peter On 27 April 2011 21:18, chris derhamch...@derham.me.uk wrote: All, So we have various tomcat services setup on windows. When windows updates are auto installed, sometimes they force a reboot of the server. When this happens, the tomcats win the race with the database (Oracle) to startup. Then the connection pool can't start, and then the war file is flagged as shutdown. We have tried to make the tomcat services dependent on the oracle service (both db service and tns listener), but same happens. Just tried to turn the connection pool initial size down to zero, but the app fetches some config at startup. I guess we could recode to lazily fetch this upon first access. Just curious if anyone has hit this, and if there is a way to delay the tomcat service startup. Tomcat 7.0.12 Windows server 2008 r2 64 bit java -version java version 1.6.0_24 Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode) We have connection pool setup in catalina_base\conf\context.xml Resource name=jdbc/xts auth=Container type=javax.sql.DataSource username=username password=password driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@localhost:1521:xe maxActive=20 maxIdle=2 minIdle=1 initialSize=2 / 27-Apr-2011 19:48:22 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 27-Apr-2011 19:48:31 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Destroying Spring FrameworkServlet 'dispatcher' 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 27-Apr-2011 20:21:22 org.apache.catalina.core.ApplicationContext log INFO: Shutting down log4j 27-Apr-2011 20:25:36 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class liquibase.integration.servlet.LiquibaseServletListener java.lang.RuntimeException: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at liquibase.integration.servlet.LiquibaseServletListener.contextInitialized(LiquibaseServletListener.java:159) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: javax.naming.NamingException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress ) at org.apache.naming.NamingContext.lookup(NamingContext.java:843) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:145) at org.apache.naming.NamingContext.lookup(NamingContext.java:814) at org.apache.naming.NamingContext.lookup(NamingContext.java:159) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158) at javax.naming.InitialContext.lookup(InitialContext.java:392) Thanks Chris - No virus found in this message. Checked by AVG -
RE: (Issue) Tomcat 7.0.12 silent install
That would be a bug then. Please create a bugzilla entry against Tomcat 7 for this. Will do. Thanks for your help. John -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Thursday, April 28, 2011 3:07 PM To: Tomcat Users List Subject: Re: (Issue) Tomcat 7.0.12 silent install On 28/04/2011 19:48, john.marci...@pb.com wrote: When run on a 64-bit Windows system the NSIS script does not check the 32-bit registry path for a JRE. 32-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment 64-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment The difference being that the 32-bit entries are off the Wow6432Node key. That would be a bug then. Please create a bugzilla entry against Tomcat 7 for this. The installer should check 64-bit and then 32-bit registry locations when running on 64-bit Windows. Bugs with patches attached tend to get fixed faster. If you would like to work on a patch and need any pointers then just ask here. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SessionExample from the examples webapp
2011/4/28 János Löbb janos.l...@yale.edu: Hi, Adding some -claspath based upon man javac, I reduced the number of errors to two. bml0065:classes administrator$ sudo javac -classpath /usr/local/apache-tomcat-7.0.10/webapps/examples/WEB-INF/classes/util: The above should have been .../WEB-INF/classes and not ../WEB-INF/classes/util /usr/local/apache-tomcat-7.0.10/lib/servlet-api.jar SessionExample.java SessionExample.java:33: package util does not exist import util.HTMLFilter; ^ 2 Chuck: OP is building its own app, not Tomcat. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: (Issue) Tomcat 7.0.12 silent install
2011/4/28 john.marci...@pb.com: When run on a 64-bit Windows system the NSIS script does not check the 32-bit registry path for a JRE. 32-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment 64-bit JRE registry path -- HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment The difference being that the 32-bit entries are off the Wow6432Node key. Note the SetRegView 64 command in Function findJavaHome in tomcat.nsi line 641 I do not know whether it applies to your use case, though. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: SessionExample from the examples webapp
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Subject: Re: SessionExample from the examples webapp 2 Chuck: OP is building its own app, not Tomcat. Hmmm... from the discussion, I thought the OP was building a modified examples webapp that was included with Tomcat, and therefore could use the existing Tomcat scripts - as Chris suggested. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: (Issue) Tomcat 7.0.12 silent install
Nice thread. Nice work. Impressive all the way around. -Terence Bandoian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Thursday, April 28, 2011 4:23 PM Note the SetRegView 64 command in Function findJavaHome in tomcat.nsi line 641 I'm not familiar with this scripting language so I don't know what setRegView 64 does. But looking at lines 644, 645, and 646 these all correspond to registry keys in the 64-bit application space on a 64-bit windows system. Regards, John - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Accessing (session) Manager in servlet
2011/4/28 Juriy Bura juriy.b...@gmail.com: I'd appreciate any other hint how to access Manager from context a) use JMX, like the Tomcat Manager web application does b) implement a Valve that does whatever you want. Valves have access to Tomcat classes. c) (hacky) Thread.getContextClassLoader() and follow some links or a solution of the original problem. Update the Flash player? You say the bug is old - is it still an issue? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SessionExample from the examples webapp
Hi Konstantin, Chuck, I think I tried also with .../WEB-INF/classes and it still complained that it could not find or open the util package. Then I moved the two HTMLFilter.* files out from there a level up, commented out the package declaration in HTMLFilter.java and then javac compiled SessionExample.java and I am happy with it. Now I know how to mess with java files from the command line with tools like nano, pico and javac :-) And yes, I did not want to compile the whole Tomcat, just modify one of the servlet examples to suit my need. Thanks you both, János On Apr 28, 2011, at 4:17 PM, Konstantin Kolinko wrote: 2011/4/28 János Löbb janos.l...@yale.edu: Hi, Adding some -claspath based upon man javac, I reduced the number of errors to two. bml0065:classes administrator$ sudo javac -classpath /usr/local/apache-tomcat-7.0.10/webapps/examples/WEB-INF/classes/util: The above should have been .../WEB-INF/classes and not ../WEB-INF/classes/util /usr/local/apache-tomcat-7.0.10/lib/servlet-api.jar SessionExample.java SessionExample.java:33: package util does not exist import util.HTMLFilter; ^ 2 Chuck: OP is building its own app, not Tomcat. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: (Issue) Tomcat 7.0.12 silent install
2011/4/29 john.marci...@pb.com: From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Thursday, April 28, 2011 4:23 PM Note the SetRegView 64 command in Function findJavaHome in tomcat.nsi line 641 I'm not familiar with this scripting language so I don't know what setRegView 64 does. But looking at lines 644, 645, and 646 these all correspond to registry keys in the 64-bit application space on a 64-bit windows system. The installer itself is a 32-bit program. The SetRegView 64 command switches it to using 64-bit part of registry. This command is documented here: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.7.6 Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SessionExample from the examples webapp
2011/4/29 János Löbb janos.l...@yale.edu: Hi Konstantin, Chuck, I think I tried also with .../WEB-INF/classes and it still complained that it could not find or open the util package. Then I moved the two HTMLFilter.* files out from there a level up, commented out the package declaration in HTMLFilter.java and then javac compiled SessionExample.java and I am happy with it. Now I know how to mess with java files from the command line with tools like nano, pico and javac :-) And yes, I did not want to compile the whole Tomcat, just modify one of the servlet examples to suit my need. Thanks you both, :) BTW, why you are using sudo to invoke the compiler? Usually root rights are not needed to compile a program. And may be these pages from the official Java Tutorial may be useful to you: http://download.oracle.com/javase/tutorial/getStarted/cupojava/index.html Help for javac etc. is here: http://download.oracle.com/javase/6/docs/technotes/tools/index.html#basic Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: pure tomcat failover (no loadbalacing)
Hi Felix, To keep you posted, your solution is working smoothly, the error was coming from redirect set to the cluster instead of the jvmRoute. My point (and for now it is a pure theorical question as I don't have the need) was If I want to add a third or fourth server (for load reason). I will have the following : * 1 failover on 2 * 2 failover on 3 * 3 failover on 1 vs using the lbfactor solution : * instance 1 failover on cluster 1 which still have the 2nd and 3rd instance with an lbfactor of 1 each * instance 2 failover on cluster 2 ... * ... - in this solution, if the failover is triggered the load balancing will be used So both solution have Pro Cons, i think I will need to see real life to choose between both. Thanks for the help gui On Thu, Apr 28, 2011 at 5:44 PM, Felix Schumacher felix.schumac...@internetallee.de wrote: Christopher Schultz ch...@christopherschultz.net schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Felix and Guillaume, I think you guys are working too hard for this. Isn't it as simple as using a redirect from each worker to the other, with no clustering or anything like that? You don't even need to set jvmRoute, etc. since there's no cluster. If you are willing to run all webapps on both servers, you are right. But the original requirement was to have one set of webapps on one server and one set on the other, with failover in case of downtime of either one. Felix - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk25fNIACgkQ9CaO5/Lv0PBNDgCgiVLMqKNj6WEX4GrHrpNVHekL bn4An2SDMZPE37tkcLCxnknf2/9TUyAD =+X7N -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: (Issue) Tomcat 7.0.12 silent install
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Thursday, April 28, 2011 4:46 PM The installer itself is a 32-bit program. The SetRegView 64 command switches it to using 64-bit part of registry. This command is documented here: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.7.6 Hmm. Seems like I'm being lead a little bit here. Ok. Alright so what should probably happen then is if reading the registry fails to return a result for SetRegView 64 then read it again after doing SetRegView 32. The logic and sequence for checking 32-bit registry space would go something like this: 1) IF 64-bit system a) SetRegView 64 b) Read registry c) IF no-errors we have a JRE path (goto NoErrors) 2) SetRegView 32 a) Read registry b) IF no-errors we have a JRE path (goto NoErrors). c) ELSE set JRE path = JRE path is $1 in the NSIS script. John - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SessionExample from the examples webapp
On Apr 28, 2011, at 4:53 PM, Konstantin Kolinko wrote: 2011/4/29 János Löbb janos.l...@yale.edu: Hi Konstantin, Chuck, I think I tried also with .../WEB-INF/classes and it still complained that it could not find or open the util package. Then I moved the two HTMLFilter.* files out from there a level up, commented out the package declaration in HTMLFilter.java and then javac compiled SessionExample.java and I am happy with it. Now I know how to mess with java files from the command line with tools like nano, pico and javac :-) And yes, I did not want to compile the whole Tomcat, just modify one of the servlet examples to suit my need. Thanks you both, :) BTW, why you are using sudo to invoke the compiler? Usually root rights are not needed to compile a program. And may be these pages from the official Java Tutorial may be useful to you: http://download.oracle.com/javase/tutorial/getStarted/cupojava/index.html Help for javac etc. is here: http://download.oracle.com/javase/6/docs/technotes/tools/index.html#basic Best regards, Konstantin Kolinko Because the powers above me wanted to install and run it as root. I know, I know... and I recommended to set up a tomcat user who owns it... but I did not succeed. Thanks for the pointers, János - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: (Issue) Tomcat 7.0.12 silent install
2011/4/29 john.marci...@pb.com: From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Thursday, April 28, 2011 4:46 PM The installer itself is a 32-bit program. The SetRegView 64 command switches it to using 64-bit part of registry. This command is documented here: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.7.6 Hmm. Seems like I'm being lead a little bit here. Ok. Alright so what should probably happen then is if reading the registry fails to return a result for SetRegView 64 then read it again after doing SetRegView 32. The logic and sequence for checking 32-bit registry space would go something like this: 1) IF 64-bit system a) SetRegView 64 b) Read registry c) IF no-errors we have a JRE path (goto NoErrors) 2) SetRegView 32 a) Read registry b) IF no-errors we have a JRE path (goto NoErrors). c) ELSE set JRE path = 3) Switch back to 64-bit mode? Because it affects all ReadRegStr/WriteRegStr commands elsewhere in the script. JRE path is $1 in the NSIS script. I filed en enhancement request, https://issues.apache.org/bugzilla/show_bug.cgi?id=51135 Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat clustering
Mark Thomas markt at apache.org writes: I checked Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer on tomcat site http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html This goober is currently pretty broken, but we are working hard to fix it It is no longer broken (I fixed it in 6.0.20) but the docs still haven't been written. Going from memory: Mark I'm trying to use the FarWarDeployer with Tomcat 6.0.20 and 6.0.32 but am getting the following error. Application [app war name] in used. touch war file [app war name] again! The app deploys to all my Tomcats in the cluster but then immediately un-deploys from one of them and throws that error.. Any suggestions? Seth - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org