Re: Tomcat crash @ midnight - but why?
Martin Cavanagh wrote: Caldarale, Charles R wrote: From: Darek Czarkowski [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat crash @ midnight - but why? Now, this would be funny, can you search the source code of the deployed application for System.exit call? Heres trouble...the System does call System.exit(), when it can't create the directory... - so I understand why my application would stop- but why would tomcat shutdown? It's also using the client JVM not the server JVM (I installed JRE and there is no server JVM) See that is funny after all, as other users explained system.exit will terminate JVM and not just your application. You should NEVER use this call in your application. Try to deal with the error in another way. -- Darek Czarkowski - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat crash @ midnight - but why?
Martin Cavanagh wrote: Each time when Tomcat has crashed, it has been at midnight. At exactly midnight my program changes log directorys - from 20-09-2007 to 21-09-2007. This is a TimerTask. A thread which runs at exactly midnightat each of these crashes it has reported Can't create directory '\.cs-aterm\logs\SYSTEM\2007-09-25'. I can't help wondering if that might somehow be related. However if that happens, it should result in no logs being produced, not in Tomcat crashing. Now, this would be funny, can you search the source code of the deployed application for System.exit call? :p -- Darek Czarkowski Ph: 604 294 6557 (Ext. 113) Fx: 604 294 6507 www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SESSIONS.ser (Too many open files)
Ranjan Kumar Baisak wrote: I would think this would be the root issue: Too many open files We dont have much file handling operations in our web applications, but again I am going to look minutely all IO operations in my application. What OS are you running. Some limit the number of open file handles. Also might want to check to be sure you are closing files when finished with them in your webapp. its running on *Red Hat *Enterprise Linux AS 4. I am at all not good at system programming, but I would love to know any such commands/utilities exist that can tell me detail about what are the files getting opened in my web application which results such exception. regards, Ranjan Kumar Baisak wrote: Hi Experts, I am facing a strange problem in my tomcat application. Suddenly it generates following Exceptions java.io.FileNotFoundException: /server/http/site/music.yamaha.com/site/work/SESSIONS.ser (Too many open files) at java.io.FileOutputStream.open(Native Method) .. And some other application FNF java.io.FileNotFoundException: /server/http/site/ssd.com/site/dist/tilesCopy/en_US/siteTree.xml (Too many open files) at java.io.FileInputStream.open(Native Method) ... ... What might be the possible causes that generates such exception? Some people suggested me to check whether application is running on development mode, and if yes then change it to deployment mode i.e. context-param param-nameconfiguration/param-name param-valuedeployment/param-value /context-param I am not using any context-param in my web.xml. I would appreciate your thoughtful suggestion. regards, Ranjan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To see your current settings use 'ulimit -a'. If you want to make permanent changes edit /etc/security/limits.conf Everything in a system is a file, not just a single webpage, the default are not enough for your requirements. -- Darek Czarkowski Ph: 604 294 6557 (Ext. 113) Fx: 604 294 6507 www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: from https to http?
Suresh babu wrote: Hi all I have one question regarding http and https: Lets say I open a pop up page from https, pop window will be opened in https mode as main window is opened in https and I have action in pop up where it leave https mode and enter in to http modeIf i want put value from pop window to main window it gives security violation java script error...How to resolve this.. Thanks Suresh This is not possible, google for cross domain scripting. to allow this is a breach of the user's privacy. besides it is hardly a Tomcat issue. -- Darek Czarkowski www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web application - student need help
Michael Ni wrote: the web application uses simple queries, like search a table for a certain condition. i realize when multiple people access the database it hangs, and causes the jsp pages to error. Just a guess, your connection to the database is a problem, perhaps errors in queries, not closed connections. What are the error messages? (page/log) -- Darek Czarkowski Ph: 604 294 6557 (Ext. 113) Fx: 604 294 6507 www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web application - student need help
Michael Ni wrote: public ResultSet getData(String queryStr) throws Exception { try { DBConstants db = new DBConstants(); Class.forName(db.getDrivername()); Connection conn; conn = DriverManager.getConnection(jdbc:microsoft:sqlserver:// + db.getHostname() + , + db.getUsername() + , + db.getPassword() + ); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(queryStr); return rs; } catch(Exception e) { e.printStackTrace(); System.out.println(getData error); throw new Exception(); } } Add |finally { try {if (rs != null) rs.close();} catch (SQLException e) {} try {if (stmt != null) stmt.close();} catch (SQLException e) {} try {if (conn != null) conn.close();} catch (SQLException e) {} }| And return an object rather than ResultSet. Read about connection pooling, here is an example: http://www.onjava.com/pub/a/onjava/2006/04/19/database-connection-pooling-with-tomcat.html?page=1 -- Darek Czarkowski www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to read TLD META-INF/c.tld from JAR file
Are you deleting the content of work folder while tomcat is running? Don't! Work Folder: Automatically generated by Tomcat, this is where Tomcat places intermediate files (such as compiled JSP files) during it's work. If you delete this directory while Tomcat is running you will not be able to execute JSP pages. -- Darek Czarkowski www.infinitesource.ca darekc at infinitesource dot ca On Wed, 2006-11-01 at 19:03 +0200, Vasiliy Keretsman wrote: Hello! Strange problem appears with Tomcat. It can't read the tlds from JAR file (standard.jar). org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld from JAR file It happens only once when Tomcat/work folder is empty. After page refresh everything goes well. Details: 1. Tomcat 5.0.28 2. J2SDK 1.4.2_02 3. standard.jar is not corrupted and includes all tlds in META-INF 4. WEB-INF/lib doesn't contain jsp-api.jar Any ideas? Thanks in advance Best regards, Vasiliy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change Display Icon
On Wed, 2006-11-01 at 12:16 -0800, Madhuraka Godahewa wrote: Hi, I am using tomcat 5.0.30. I have developed a web application and is ready to launch. But, still I have not been able to change the icon, which displayed on the browser (Firefox) when my site is loaded. The tomcat icon is shown. I renamed the 'favicon.ico' in the 'ROOT' folder as 'favicon1.ico' and put my own icon with the name 'favicon.ico'. But, still it displays the tomcat icon. Does anyone know how to change this? Thanks in advance, --- Madhuraka Godahewa Telecommunications Engineer Research and Development Unit Electroteks Global Networks (Pte.) Ltd. 68, Attidiya Road, Ratmalana, SRI LANKA. Mobile : + 94-777-647055 Tel(Home): + 94-38-4283181 Tel (Office) : + 94-11-4213771 Fax(Office) : + 94-11-4213980 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Why don't you search mailing list archives for favicon? Add to the page head: link rel=icon href=/mywebapp/myfavicon.ico type=image/x-icon / You can also add: LINK REL=SHORTCUT ICON HREF=/mywebapp/favicon.ico type=image/x-icon -- Darek Czarkowski www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to read TLD META-INF/c.tld from JAR file
On Wed, 2006-11-01 at 20:05 +0200, Vasiliy Keretsman wrote: Not while Tomcat is running. I am aware of the work folder. It happens when Tomcat starts with empty work folder. Just upgraded to J2SDK1.4.2_12 - the same result On 01/11/06, Darek Czarkowski [EMAIL PROTECTED] wrote: Are you deleting the content of work folder while tomcat is running? Don't! Work Folder: Automatically generated by Tomcat, this is where Tomcat places intermediate files (such as compiled JSP files) during it's work. If you delete this directory while Tomcat is running you will not be able to execute JSP pages. -- Darek Czarkowski www.infinitesource.ca darekc at infinitesource dot ca On Wed, 2006-11-01 at 19:03 +0200, Vasiliy Keretsman wrote: Hello! Strange problem appears with Tomcat. It can't read the tlds from JAR file (standard.jar). org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld from JAR file It happens only once when Tomcat/work folder is empty. After page refresh everything goes well. Details: 1. Tomcat 5.0.28 2. J2SDK 1.4.2_02 3. standard.jar is not corrupted and includes all tlds in META-INF 4. WEB-INF/lib doesn't contain jsp-api.jar Any ideas? Thanks in advance Best regards, Vasiliy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Should have tried google first, if you did, you should provide more details. Here is what searching for your problem comes up with. http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi? ubb=get_topicf=50t=007815 Is this similar to your problem? Or perhaps you are deploying jsp- api.jar with your application? there is number of reasons this could be happening. -- Darek Czarkowski www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to read TLD META-INF/c.tld from JAR file
On Wed, 2006-11-01 at 12:02 -0800, Darek Czarkowski wrote: On Wed, 2006-11-01 at 20:05 +0200, Vasiliy Keretsman wrote: Not while Tomcat is running. I am aware of the work folder. It happens when Tomcat starts with empty work folder. Just upgraded to J2SDK1.4.2_12 - the same result On 01/11/06, Darek Czarkowski [EMAIL PROTECTED] wrote: Are you deleting the content of work folder while tomcat is running? Don't! Work Folder: Automatically generated by Tomcat, this is where Tomcat places intermediate files (such as compiled JSP files) during it's work. If you delete this directory while Tomcat is running you will not be able to execute JSP pages. -- Darek Czarkowski www.infinitesource.ca darekc at infinitesource dot ca On Wed, 2006-11-01 at 19:03 +0200, Vasiliy Keretsman wrote: Hello! Strange problem appears with Tomcat. It can't read the tlds from JAR file (standard.jar). org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld from JAR file It happens only once when Tomcat/work folder is empty. After page refresh everything goes well. Details: 1. Tomcat 5.0.28 2. J2SDK 1.4.2_02 3. standard.jar is not corrupted and includes all tlds in META-INF 4. WEB-INF/lib doesn't contain jsp-api.jar Any ideas? Thanks in advance Best regards, Vasiliy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Should have tried google first, if you did, you should provide more details. Here is what searching for your problem comes up with. http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi? ubb=get_topicf=50t=007815 Is this similar to your problem? Or perhaps you are deploying jsp- api.jar with your application? there is number of reasons this could be happening. I am sorry I didn't see the details. perhaps there is a problem with running tomcat with compatibility package and having tld's in WEB- INF/lib/standard.jar file. -- Darek Czarkowski Ph: 604 294 6557 (Ext. 113) Fx: 604 294 6507 www.infinitesource.ca darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk and apache problem
-Original Message- From: Tom Miller [mailto:[EMAIL PROTECTED] Sent: Saturday, October 28, 2006 3:49 PM To: Tomcat Users List Subject: mod_jk and apache problem The following said that if client click on links that including *.jsp then forward the requested to tomcat using worker2. But where will it go when the traffic forward to tomcat. If one have more than one context under Tomcat. How does it know which one to go from the three. for example: of multiple context under Tomcat. /app/webapps/ROOT/ /app/webapps/monpop/ /app/webapps/tticket/ ***httpd.conf file JkMount /*.jsp worker2 Per your and other sugguestion, I did this and it will give me error via the apache log. *** modified httpd.conf file JkMount /tticket/*.jsp worker2 It said File does not exist: /www/tticket/js/new_menu_settings1.js. I agreed with the error. It doesn't make sense to me either. I need to define or point /app/webapps/tticket/ to worker2 somehow. I don't know how.. I missed something here but I don't know what. Tom - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You have configured mod_jk connector to serve jsp files and nothing else. Darek Czarkowki - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: favicon question
Add to the page head: link rel=icon href=//mywebapp/myfavicon.ico type=image/x-icon / On Thu, 2006-10-26 at 13:23 -0400, Noah White wrote: I am trying to set the favicon for a web app. I'm running Tomcat 5.5.20 on Windows XP and dropped my .ico file into %TOMCAT_HOME%\webapps\mywebapp and restarted the server. No joy. I still get the default tomcat favicon located in %TOMCAT_HOME%\webapps\ROOT when I go to mywebapp context. Thoughts? TIA -Noah -- Darek Czarkowski darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A question.
On Wed, 2006-10-04 at 09:05 -0600, [EMAIL PROTECTED] wrote: Hi, there I've been experiencing some troubles in my apache-tomcat, I have a Open Enterprise Server with IDM from Novell, so I try to install the Net Storage services, but to manage these I have to use the iManager web page, but there is something strange everytime I try to reache that page it gives me a 500 error, from Novell they all told me Tomcat s not fully initialized after a reboot, or has failed to start, so I go to the directory and it says to me, everything is working fine, can anybody elp me? In advance thank you. Gustavo Ezquerro Morales I don't think you have provided enough information about the problem. Is iManager web page not accessible? Check the logs, perhaps you have left some details out. -- Darek Czarkowski darekc at infinitesource dot ca - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple frames refresh/reload problems, timeout
Hello, I remember seeing some information about the similar problem in the mailing list long time ago, but I am not really sure how to describe the problem correctly, and can not find any reference anymore. I have an application that is using multiple frames. When the index page is loaded, some users experience problems loading the content of one of the frame. The application is deployed in tomcat with apache and mod_jk on linux (RHE3). I remember reading about this before. The problem is somehow related to the fact that each frame is a separate connection to the server, and for some reason, once one of the connections/frames, is completed, the rest times out. There might be a solution to this through settings in mod_jk. I can not find any instructions on how to solve this issue. Can anyone help me? Thank you. -- DarekC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Submit, refresh frames problem.
Hello, Sometimes when a requested web page has two or more frames, loading source into the frames may fail. It has happened to me couple times, not every time. I know that there is a possible solution, does anyone know how to solve this issue? Server is running tomcat 4.27, apache 2 mod_jk 1.2.14. This is related to the fact that single request in fact includes multiple requests. Darek Cz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to stop user app daemon threads in tomcat webapps?
On Mon, 7 Nov 2005 11:36:16 +0800 Augmentin [EMAIL PROTECTED] wrote: Hi, I found that the daemon threads created by my Tomcat webapp won't automatically stop when the webapp itself is stopped or undeployed/redeployed. As Tomcat itself is a java application there will always be user threads in the jvm even when your webapp is stopped.. which makes the daemon threads spawned by webapps never stop. I tried to add a finalize() method to a main object in the webapp to interrupt the daemon threads but it didn't seem to work... the timing of call to finalize() is undetermined, only when it performs garbage collection. And many times it seemed that when my webapp is stopped/reloaded/undeployed/redeployed the objects were just not properly finalized or garbage collected at all. I am using Tomcat 5.5.9 on Windows XP Pro and Solaris 2.6. Thank you for your help. Raymond. When you create new thread you would define a stopping clause, some way to terminate your thread at any given time when requested. Next you would add all your threads to a 'holder' that would 'know' what threads are alive. Finally you can create an Application Serlvet Context Listener, an in Destroy method you can iterate through all elements in the 'holder' and call/invoke your stopping parameter on all threads. That should work. DarekC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]