How to upgrave version in production server?
Hi there, I've got a very simple question that I can't solve. We've got already implemented a system, which works just fine. But we had the problem that we needed to make a little change and put that version on production, having to restart the application. Which is the right way to solve the this problem? Leonardo Lopez Larraquy Jakarta SRL Ingenieria de Software 4953-0961 www.jakartasrl.com.ar
NullPointerException without stack trace
Hi, I'm using Tomcat 5, and jdk 1.4.0 , and sometimes I receive java.lang.NullPointerException without stack trace. This exception cannot be reproduced, simply happens, on our customer production server, randomly (3 o 4 times a day). The system, is actually being used by 15 people constantly. The worst of this, is that, when NPE is thrown, its likely that you re-request that operation and everything goes ok. I've read http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4292742, and I must say that we are using JDK in server mode. Many developers had this trouble, but I haven't found a clue. Has anyone of you dealed with this problem? Thanks in advance Leonardo Lopez Larraquy Jakarta SRL Ingenieria de Software 4953-0961 www.jakartasrl.com.ar
Setting Xmx and Xms on Tomcat 5
Hi gurus, I're really searched the web, but I really need you help. I've migrated my app, from Tomcat 4.0.6 to Tomcat 5.0. everything went fine. As I had the service installed on Tomcat 4.0.6, I did the same on Tomcat, but using the installer that Jakarta provides. The problem of that, was that when I installed Tomcat 5.0 service I had't set Xmx and Xms options. My app consumes enough memory to need this fix. Now I saw 2 possibilities to solve this problem. 1) Uninstall Tomcat 5, and reinstall it using tomcat.exe from Tomcat 4.0.6, which gives me the chance to set Xmx and Xms options. (I really dislike this one) 2) As a saw at http://forum.java.sun.com/thread.jspa?threadID=250644messageID=2177633, you can touch registry values, and restart Tomcat using: 'JVM Option Number 3,4,5' (I don't like this one eather) Do you know another chance to reinstall Tomcat 5 service and setting Xmx and Xms parameters? Any ideas? Thanks in advace Leonardo Lopez Larraquy Jakarta SRL Ingenieria de Software 4953-0961 www.jakartasrl.com.ar
Doubts About Digester and XML Parsing....
Hi experts: I must say that I've got a little experience using digester for XML configuration files, but now I must populate some beans for a interface between systems and it's really quite diferent. I've also read about converters and my doubty come's just at that point. Let me explain it. Here's a part of my XML: ?xml version=1.0 standalone=yes? Puma_Producto name=SourceKey_1 Datetime=Datetime_1 Action=Action_1 Datos CODE=CODE_1 DESCRIPTION=DESCRIPTION_1 TRATAMIENTO=TT1 ESTADO=EST1 UNIDAD_FORECAST=UM2 CONVERSION=256 UNIDAD_MEDIDA_COMPRAS=UM01Datos_1/Datos I was able to pass the CODE and DESCRIPTION attributes to, setCode(String) and setDescription(String) on my bean. I was able to pass the CONVERSION to its corresponding setConversion(int). But now I must pass UNIDAD_MEDIDA_COMPRAS to it corresponding setUMCompras(UMCompras aValue) // it recieves a bean that I've got already coded! Here's my doubt about converters. 1) In yhe examples I saw, the converters where used when the value come in a different entity, and now my value is set as an attribute. Example: Puma_Producto name=SourceKey_1 Datetime=Datetime_1 Action=Action_1 Datos . CONVERSION=256 UNIDAD_MEDIDA_COMPRAS=UM01 UNIDAD_FORECASTUM2/UNIDAD_FORECAST /Datos But it's not my case!! 2) As I saw on Digester in the method convert(java.lang.String[] values, java.lang.Class clazz) I cannot tell him the pattern I want to convert, in my case: Puma_Producto/Datos/UNIDAD_FORECAST 3) Lastely, this is an answer, not a problem I had to deal with, is there any way on digester to iterate over attributes and properties?? I mean, Digester actualy returns an Object with all the entities readed inside according to my configuration. But I can't do anything during that proccess. I want to receive the values from the XML and execute the set methods by my self, is that posible? I hope I've relatively clear... excuse my if my English is not good enough. Thanks in advance.
DBCP Parameters
Hi everyone. I've just made my application work with an SQL Server Datasource, wich is written below. It's working fine, but there's one problem (or not), so I want to ask you folks. As you can see I put at the parameter maxConnections a value of 3. Then I made a test, getting a Connection from the pool within a for loop. I was able to get over 1 connections, and I stoped the test. With dind't I get a Connection Pool exasusted error at the fourth iteration??? Thanks in advance. Resource name=jdbc/sql2000 auth=Container type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ ResourceParams name=jdbc/sql2000 parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/value /parameter parameter namedriverName/name valueSQLServer/value /parameter parameter namedescription/name valueSQL Server DataSource/value /parameter parameter nameserverName/name valueJK008/value /parameter parameter nameportNumber/name value1433/value /parameter parameter nameselectMethod/name valuecursor/value /parameter parameter namedatabaseName/name valueseguridad/value /parameter parameter nameuser/name valuepuma/value /parameter parameter namepassword/name valuepuma/value /parameter parameter namemaxConnections/name value3/value /parameter parameter nameminConnections/name value1/value /parameter parameter nameloginTimeout/name value3000/value /parameter parameter namecheckEvery/name value6/value /parameter parameter nameidleTimeout/name value50/value /parameter /ResourceParams Leonardo Lopez Larraquy Jakarta Ingenieria de Software www.jakartasrl.com.ar
Re: DBCP Parameters
Thanks, you 've been very clear. - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 4:25 PM Subject: RES: DBCP Parameters That´s because DBCP when reach its limit it create a new connection to suplay the demand, after all connection without use are released your current connections come back to 3 connection in pool as you setted to 3 max connection alive in the pool. Regards, Edson -Mensagem original- De: Leonardo Larraquy [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 5 de outubro de 2004 16:15 Para: Tomcat Users List Assunto: DBCP Parameters Hi everyone. I've just made my application work with an SQL Server Datasource, wich is written below. It's working fine, but there's one problem (or not), so I want to ask you folks. As you can see I put at the parameter maxConnections a value of 3. Then I made a test, getting a Connection from the pool within a for loop. I was able to get over 1 connections, and I stoped the test. With dind't I get a Connection Pool exasusted error at the fourth iteration??? Thanks in advance. Resource name=jdbc/sql2000 auth=Container type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ ResourceParams name=jdbc/sql2000 parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/value /parameter parameter namedriverName/name valueSQLServer/value /parameter parameter namedescription/name valueSQL Server DataSource/value /parameter parameter nameserverName/name valueJK008/value /parameter parameter nameportNumber/name value1433/value /parameter parameter nameselectMethod/name valuecursor/value /parameter parameter namedatabaseName/name valueseguridad/value /parameter parameter nameuser/name valuepuma/value /parameter parameter namepassword/name valuepuma/value /parameter parameter namemaxConnections/name value3/value /parameter parameter nameminConnections/name value1/value /parameter parameter nameloginTimeout/name value3000/value /parameter parameter namecheckEvery/name value6/value /parameter parameter nameidleTimeout/name value50/value /parameter /ResourceParams Leonardo Lopez Larraquy Jakarta Ingenieria de Software www.jakartasrl.com.ar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
StringBuffer out of range???
Hi all, I'm using a class in my aplication to generate XML. It works perfectly, and it is used EVERYWERE for sending results from the server to the client. This way of sending information is developed by iterating some collections, and appending it in on a StringBuffer. The XML is well formed, but developing a program like a CUBE with much information, it reaches over 6.100.000 bytes the servlet throws an Exception that I havent deduced yet. (must be some kind of RunTimeException). I've tried the setLenght(), capacity and all the stuff. What could I do? Thanks in advance
Re: Viewing errors
Ok, I'll try it, thanks. - Original Message - From: [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 1:01 AM Subject: RE: Viewing errors Leo, You could use log4j and configure it to output to the console. Attached is a sample log4j.properties file. Here is how you would declare the logger instance in a class public static Logger log = Logger.getLogger(DbUtilTester.class); Manuel -Original Message- From: Leo Tomcat [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 7:44 AM To: [EMAIL PROTECTED] Subject: Viewing errors Hi all, I'm using Tomcat 4.0.6 and I've already installed it as a service. My problem now, is that I can't see the console that was so usefull for viewing when some exception was thrown, or just for debugging using System.out.println. I've searched the log files at $TOMCAT_HOME\logs and I couldn't find any of the logs that my webapp leaves. I've tried System.err and nothing happend. Does any one know, how to send my my error-logs or simplier logs to a file?? Is that configurable or a code matter?? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI problem with SQLServer
Hi all, excuse me I'm going to ask about a topic there are thousands of questions already made. The fact, is that I've searched and tried everything, but I still cannot connect Tomcat with SQLServer using a Resource. I've copied exactly the example at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html I've got the DBTest class (from the example) also. My web.xml is: ?xml version=1.0 encoding=ISO-8859-1? web-app descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app And my server.xml . Host... Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_DBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuewebsitebenchmark/value /parameter parameter namepassword/name valueredheader/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter nameurl/name valuejdbc:microsoft:sqlserver://localhost:1433/value /parameter /ResourceParams /Context /Host . But I´m still getting javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at this line: DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/TestDB); //From de DBTest class Is anyone able to tell me what that means?? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Performance question JDBC vs Properties
Hi all, I've got this doubt. My applicacion uses some properties files to config some events or constants, or whatever, but it's job basically is to map the users click on a JSP, to a servlet and define what class should take this event. So, every request comming to a JSP, will be a search in this file. This is for writing only 1 Servlet. For instance, if an user clicks ShowClients something like this should be written at the file. Where this class is called to do the job. ShowClients=com.jkt.proyect.clients.ShowClients Or ShowProducts: ShowProducts=com.jkt.proyect.products.ShowProducts This file, should be as big as use cases in the system. Actually we've written 2000 lines. My problem, is that for reconfiguring this file, or adding lines to it, I've got to reload the application. As we are at deploying time, this happens quite often, so I've got to take users out of the system, and then, calling them to continue working (they are quiete few until next month). I'm thinking of sending to logic to a database, I mean configure this in a table. So if I've got 2000 records in this table, would it be much less performant that writing it in a file, as it is now working? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI problem with SQLServer
Hi all, excuse me I'm going to ask about a topic there are thousands of questions already made. The fact, is that I've searched and tried everything, but I still cannot connect Tomcat with SQLServer using a Resource. I've copied exactly the example at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html I've got the DBTest class (from the example) also. My web.xml is: ?xml version=1.0 encoding=ISO-8859-1? web-app descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app And my server.xml . Host... Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_DBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuewebsitebenchmark/value /parameter parameter namepassword/name valueredheader/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter nameurl/name valuejdbc:microsoft:sqlserver://localhost:1433/value /parameter /ResourceParams /Context /Host . But I´m still getting javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at this line: DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/TestDB); //From de DBTest class Is anyone able to tell me what that means?? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Windows freeze...
Hi people, I`ve got a really simple question but a can`t solve on my own. On Windows, when an applicacion throws an Exception, for the first time, Tomcat freezes, until I hit the keyboard or I do something on the DOS console that appears when Tomcat starts up. But it doesn`t happen on Linux! I`ve been told that Windows losses control on that new window, and it can`t print the stackTrace, or even a System.out, until you do something to activate that window again. Is there some way to solve this?? Thanks in advance. Leonardo Lopez.
Re: Windows freeze...
Could you recomend me any Windows version to avoid this? Is there some way to send the output of the console to a file?? if not, is it possible to always click enter in that console so as to left the selection-mode unselected?? I`m asking you this because I`ve got no problem on doing this in my company/work place. But I`m thinking about this situation, that is likely posible, server is restarted, the user clicks to start Tomcat , how can I advise him not to click that window??? Excuse me about not beeing happy with your response, I understand that your not the person who made Tomcat, but I really can`t understand why Linux doesn`t have these problem and Windows does. Thanks. - Original Message - From: Christopher Schultz [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, October 28, 2003 5:37 PM Subject: Re: Windows freeze... Leo, On Windows, when an applicacion throws an Exception, for the first time, Tomcat freezes, until I hit the keyboard or I do something on the DOS console that appears when Tomcat starts up. I've had this problem before. It turns out that in some DOS windows, when you click on them, they suspend the console output because the mouse is in selection mode. Pressing enter gives you miles of queued-up output. It's like turning on scroll lock on a real console. Just try not to click *inside* the DOS box when you switch to it. Instead, head for the title bar, of better yet, ignore your mouse and use ALT-TAB :) -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Windows freeze...
I guess thats a fine answer - Original Message - From: Christopher Schultz [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, October 28, 2003 5:37 PM Subject: Re: Windows freeze... Leo, On Windows, when an applicacion throws an Exception, for the first time, Tomcat freezes, until I hit the keyboard or I do something on the DOS console that appears when Tomcat starts up. I've had this problem before. It turns out that in some DOS windows, when you click on them, they suspend the console output because the mouse is in selection mode. Pressing enter gives you miles of queued-up output. It's like turning on scroll lock on a real console. Just try not to click *inside* the DOS box when you switch to it. Instead, head for the title bar, of better yet, ignore your mouse and use ALT-TAB :) -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Windows freeze...
I`ve never done that, that`s the a fine way to avoid the problem, could you tell me how to do it? Thanks - Original Message - From: Erik Wright [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, October 28, 2003 6:48 PM Subject: Re: Windows freeze... Leo Larraquy wrote: Excuse me about not beeing happy with your response, I understand that your not the person who made Tomcat, but I really can`t understand why Linux doesn`t have these problem and Windows does. It's a problem with Windows and has nothing to do with Tomcat. More specifically, it's a problem with the DOS terminal program. The reason it doesn't happen on linux is because linux has better terminal emulators than windows. Anyway, why run a production server in a console? Shouldn't you have it installed as a service? Erik -- http://www.spectacle.ca/ The New Online Source for Live Music in Montreal .::514.286.1699::. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Windows freeze...
It ´s a good idea, and but my client is Microsoft-mind-ahead - Original Message - From: Dov Rosenberg [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, October 28, 2003 7:22 PM Subject: Re: Windows freeze... Fdisk Install linux :) On 10/28/03 2:25 PM, Leo Larraquy [EMAIL PROTECTED] wrote: Hi people, I`ve got a really simple question but a can`t solve on my own. On Windows, when an applicacion throws an Exception, for the first time, Tomcat freezes, until I hit the keyboard or I do something on the DOS console that appears when Tomcat starts up. But it doesn`t happen on Linux! I`ve been told that Windows losses control on that new window, and it can`t print the stackTrace, or even a System.out, until you do something to activate that window again. Is there some way to solve this?? Thanks in advance. Leonardo Lopez. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]