Re: Able to access URL without port
By default browsers route all http requests to port 80, so if you have Apache http in front of TC then this will be true. -Sameer http://in.groups.yahoo.com/group/indiaenergy/join --- On Tue, 2/3/09, randhir.si...@elitecore.com randhir.si...@elitecore.com wrote: From: randhir.si...@elitecore.com randhir.si...@elitecore.com Subject: Able to access URL without port To: users@tomcat.apache.org Date: Tuesday, February 3, 2009, 2:27 PM I had a doubt of something I had heard with regard to the access of URL possible without port number if apache is used in the environment. We have our application running with JBOSS as the AS and tomcat as the web server. My question is that is the URL, http://application-URL:10080 assuming tomcat is running on port 10080 can be accessed like http://application-URL without the port number if apache is also installed. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 6.0 loads blank page
Did you try the synaptic package manager in Ubuntu ? I dont know which version of Ubuntu you have but mine did not have Tomcat or Apache HTTP on it when I installed, but might be I had dome somethings different. -Sameer --- On Mon, 2/2/09, zia mohades zia.si...@gmail.com wrote: From: zia mohades zia.si...@gmail.com Subject: Re: Apache Tomcat 6.0 loads blank page To: Tomcat Users List users@tomcat.apache.org Date: Monday, February 2, 2009, 9:54 PM Hello guys, Thank you again for your help chuck! 1) I just looked at the CGI servlet help that you sent. Actually I just have to uncomment the CGI servlet part in the web.xml and now at least i don't get an error, it's just a blank( which is probably the address problem, i.e a file pointing to a wrong directory) 2) I think you're right, just installing the fresh version from the website is better. How do i completely uninstall the apache( remove all the files) on ubuntu. I just started using ubuntu and not sure how it works. Thank you again for the help! Regards zia On Mon, Feb 2, 2009 at 10:51 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: zia mohades [mailto:zia.si...@gmail.com] Subject: Re: Apache Tomcat 6.0 loads blank page 3) however now i have a new problem: for some reason my html page doesn't communicate with the cgi file. Did you follow the instructions here, in particular enabling the CGI servlet? http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html Again, if you're using a 3rd-party repackaged Tomcat, it's quite possible what you're doing simply won't work with that installation. I strongly recommend you download and install a real Tomcat, rather than wasting time with what appears to be a damaged one. - 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: Possible virus uploaded to Tomcat 5.5.3 - SOLVED
Just a couple of questions on this. 1. I read your mail exchange and it seems that the OP has mentioned no Manager app was installed, but your analysis indicates that the rogue app was uploaded through manager app ?. 2. Normally firewalls keep a log of port activity so was this activity not detected by the firewall ? -Sameer --- On Sun, 8/10/08, Mark Thomas [EMAIL PROTECTED] wrote: From: Mark Thomas [EMAIL PROTECTED] Subject: Re: Possible virus uploaded to Tomcat 5.5.3 - SOLVED To: Tomcat Users List users@tomcat.apache.org Date: Sunday, August 10, 2008, 11:42 PM Folks, Just a short note to let you know that Warren and I have been working this off-list and have identified how this attack was launched. I'd like to take this opportunity to publicly thank Warren for taking the time to work with me on this when he had a lot more important things to do than answer my questions. The manager application was installed with a user name and password that the attackers were able to brute force. Once they had access to the manager application they were able to install their own web application that allowed them wider access to the box. This isn't the first report of a rouge application that we have seen on the Tomcat security list. Where we have had sufficient detail to trace how the application was installed, it has always been via an existing management tool. Therefore, I would like to take the opportunity to remind users to ensure that any potentially user accessible administration interface is suitably secured. The following isn't an exhaustive list but things to consider include: - don't use and standard user names for administrative users - do use strong passwords, especially for administrative users - uninstall web applications you don't need (admin, manager, host-manager, examples, webdav, etc) - use Remote Host/Address filters to limit access to administrative applications - enable access logging so if something does go wrong you have some information to work with - regularly review your access logs for evidence of potential attacks - run Tomcat as a dedicated user with the minimum privileges possible Finally, a small advert. I am presenting a session on Tomcat security at ApacheCon in November that will cover the above and a whole lot more. Mark - 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: Unable to view tomcat6.0.16 admin in Mac
If there is a group planning to take up this task(ie. maintaining/re-writing admin. app.) Iam willing to help out. I had not used it much but I think an admin and configuration utility for Tomcat would be useful especially for novice users. -Sameer --- On Tue, 8/5/08, David Smith [EMAIL PROTECTED] wrote: From: David Smith [EMAIL PROTECTED] Subject: Re: Unable to view tomcat6.0.16 admin in Mac To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, August 5, 2008, 9:08 PM As I understand, only if someone is willing to rewrite and maintain it. It had some serious design flaws and hadn't been maintained in a while. --David Rob Mercer wrote: Are there any plans to bring back the admin application? -Rob -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2008 10:51 AM To: Tomcat Users List Subject: Re: Unable to view tomcat6.0.16 admin in Mac prakash shanmugam wrote: hello mark, sorry, i dont find any relevant pages. right now i am looking for admin page in tomcat 6.0.16. Because tomcat 6.0.x does not have the admin webapp. It was dropped in tomcat 6.0 entirely. --David - 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: example about deploy application from windows eclipse to linux Tomcat
I have not used Eclipse so cant say about the same, Netbeans can build a war file (so Iam assuming Eclipse can do the same too) for a web project. You can just copy the war file into webapps folder of Tomcat if directory sharing is done else ftp it to that folder, depends on how your machines and network is configured. -Sameer --- On Sun, 8/3/08, Edoardo Panfili [EMAIL PROTECTED] wrote: From: Edoardo Panfili [EMAIL PROTECTED] Subject: Re: example about deploy application from windows eclipse to linux Tomcat To: Tomcat Users List users@tomcat.apache.org, [EMAIL PROTECTED] Date: Sunday, August 3, 2008, 9:12 PM Sam Wun ha scritto: Hi, Can anyone link me an example about deploy application from windows eclipse to linux Tomcat? Thanks The target operating system is not so important, I use eclipse on mac and deploy applications on linux. Simply copy the content of WebContent folder in a folder under webapp in tomcat (on linux) (call that folder app) after that I copy the content of build folder (from eclipse) in Tomncat (linux) in folder app/WEB-INF/classes Take a look at ant to buil war files, maybe that this is a more polite approach. Edoardo - 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: Would like to monitor memory use offline
You can write a simple JSP which will run a freeMemory/totalMemory call in your JVM and possibly send a mail/log when the limits are reached. You could set a refresh interval and have this page refresh say every 5 minutes in your browser. Alternatively you can tweak with the manager app code. If you are an administrator ten from a long term monitoring aspect you may want to explore the usage of Lambdaprobe. http://www.lambdaprobe.org -Sameer --- On Sun, 8/3/08, Richard S. Huntrods [EMAIL PROTECTED] wrote: From: Richard S. Huntrods [EMAIL PROTECTED] Subject: Would like to monitor memory use offline To: users@tomcat.apache.org Date: Sunday, August 3, 2008, 7:48 AM I've been running Tomcat for many versions now, mostly without incident. However with the latest set of upgrades rather forced upon me all at once (instead of managed more properly), my application appears to have a severe memory leak. System Info: OS is Solaris 10-u5 (2008); java 1.6.0_06-b02; apache-tomcat-6.0.16; mysql 5.0.51a-solaris10-x86_64. I have fast servers and plenty of memory (8 gigs). I'm running 1 gig stack and getting at least 2 GC/stack exceptions per day (sometimes more). Yes - it's a user/use triggered leak but I can't trace it further yet. Of course what is odd is that there was NO memory leak using older versions of this stuff (Solaris 10 (2006), java 1.5.x, tomcat 5.5.12, mysql 5.0.16). I'm sure the memory leak was there, but it was well masked. On the older system I was running 512 meg stack and it never gave GC or stack errors. So, while I am actively trying to fix the memory leak, I still have to maintain these production servers at operatonal status (politics - don't ask). However, it's difficult as the memory leak is causing repeated GC and out of stack exceptions. What I've noticed recently is that when using the manager application, I can watch the memory utilization grow and more memory get allocated (via refreshing the page), right up until the stack is used up and the main application crashes. However, if I'm watching it grow, and then log on to the server and reset tomcat (stop and then start tomcat), the memory use is back at the start. Thanks to session persistence, no users are harmed during this exercise. So for the moment, while I try and debug the application, I can keep things running by having a cron job periodically reset tomcat for me. But this is really crude. Until I fix the memory leak, I'd like something a little bit more elegant. SO - my question - is there a relatively easy way to create something (say a servlet) to watch the stack *just like I can do manually using the manager application* but email me when the stack approaches the memory limits? Thanks, -Richard - 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: Problem with Displaying Result of a MySQL Join in Tomcat
Error seems to originate from the MySQL JDBC driver, weird if you say it was working earlier. Can you write a simple Java class to use the same driver to execute the same query and run it with same JDK version under which your Tomcat is running, see if its working or still throwing the error. Might be your JDBC driver is older. -Sameer --- On Mon, 8/4/08, Len Popp [EMAIL PROTECTED] wrote: From: Len Popp [EMAIL PROTECTED] Subject: Re: Problem with Displaying Result of a MySQL Join in Tomcat To: Tomcat Users List users@tomcat.apache.org Date: Monday, August 4, 2008, 7:39 AM That error looks like a communication problem between Tomcat MySQL, but I don't know why it would only happen when accessing certain columns. Perhaps someone who knows more about JDBC MySQL can explain what it means. -- Len On Sun, Aug 3, 2008 at 13:21, Glyn Thomas [EMAIL PROTECTED] wrote: Len, Thanks for your comments and interest. I hadn't thought to check the Tomcat log because the majority of the query appeared to execute, but there is an error being put into the log, see below. Note, this is with a slight variation on the query that I added in my earlier post, but has the same symptoms. Aug 3, 2008 1:10:57 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113) at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160) at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2428) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2882) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2871) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3414) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:215) at org.apache.jsp.index_jsp._jspService(index_jsp.java:371) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) I ran the query in MySQL Command Line Client on both XP and Vista and they return identical results. Thanks Glyn -Original Message- From: Len Popp [mailto:[EMAIL PROTECTED] Sent: Sunday, August 03, 2008 11:31 AM To: Tomcat Users List Subject: Re: Problem with Displaying Result of a MySQL Join in
Re: Trying to mix db connection pooling on web and desktop applications
As I see it you are mixing two different things, your web application will always run inside Tomcat server but your desktop application can be anywhere(not just on TC server). The simplest way to do this might be to write your own database connection helper class which would go to the context (step 6) and use Tomcat datasource to get connections when you are running under TC. And in desktop mode you have your own connection pooler (or just create a simple db connection ) to get a db connection. so your getConnection method on helper would do the following logic : Is in desktop mode yes get my pooler/connection else //under TC get connection with logic as in step 6 -Sameer --- On Wed, 7/23/08, Alejandro Hernandez Angeles [EMAIL PROTECTED] wrote: From: Alejandro Hernandez Angeles [EMAIL PROTECTED] Subject: Trying to mix db connection pooling on web and desktop applications To: users@tomcat.apache.org Date: Wednesday, July 23, 2008, 1:21 AM Hello, this is the scenario: I have an application that must have two interfaces: as a desktop application and as a web application I've put the business logic inside a JAR library (client_bpm.jar), which must connect to an Oracle 9i database I configured the web application so it can use a db pool connection, in the following manner: 1. Added to %CATALINA_HOME%/conf/server.xml the following: Server GlobalNamingResources Resource name=jdbc/RAM_DB auth=Container type=javax.sql.DataSource username=* password=* driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:* removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true maxActive=8 maxIdle=4 maxWait=2000/ /GlobalNamingResources /Server 2. Added to %CATALINA_HOME%/conf/context.xml the following: ResourceLink name=jdbc/RAM_DB global=jdbc/RAM_DB type=javax.sql.DataSource / 3. Added to %CATALINA_HOME%/webapps/myWebApp/WEB-INF/web.xml the following: resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the Context configurartion for the web application. /description res-ref-name jdbc/RAM_DB /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref 4. Added my business library (client_bpm.jar) to %CATALINA_HOME%/webapps/myWebApp/WEB-INF/lib 5. Added JDBC library (ojdbc14.jar) to %CATALINA_HOME%/lib 6. Use the following code to get a db connection: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/RAM_DB); Connection conn= ds.getConnection(); And the web application runs fine, i have no problems with it Now, what i want is to use the same db connection pool facility (that Tomcat provides to web applications) on my desktop application, and use the same code (or something very similar) i used in point 6 to obtain a db connection With points 1-3 Tomcat provided my web application with a db connection pooling facility I want Tomcat to provide to my desktop application the same db connection pooling facility, ¿How do i do that? I have tried invoking my desktop application with the following: java -classpath .;%CATALINA_HOME%/webapps/myWebApp/WEB-INF/lib/client_bpm.jar;%CATALINA_HOME%/lib/catalina.jar;%CATALINA_HOME%/bin/tomcat-juli.jar;%CATALINA_HOME%/lib/ojdbc14.jar -Djava.naming.factory.initial=org.apache.naming.java.javaURLContextFactory -Djava.naming.factory.url.pkgs=org.apache.naming MyDesktopApp And got the following error: javax.naming.NameNotFoundException: Name java: is not bound in this Context at org.apache.naming.NamingContext.list(NamingContext.java:345) at org.apache.naming.NamingContext.list(NamingContext.java:368) at javax.naming.InitialContext.list(InitialContext.java:436) at MyDesktopApp.main(MyDesktopApp.java:12) Any suggestions will be appreciated --- Aviso Confidencial.- Este correo electrónico, así como los archivos adjuntos que contenga son confidenciales de conformidad con las leyes aplicables, y es para uso exclusivo del destinatario al que expresamente se le ha enviado. Si usted no es el destinatario legítimo del mismo, deberá reportarlo al remitente del correo y borrarlo inmediatamente. Cualquier revisión, retransmisión, divulgación, difusión o cualquier otro uso de este correo, por personas o entidades distintas a las del
Re: DataSourceRealm documentation
It means that on whichever database you are using to store your authentication information you need to create a user id and password for Tomcat to connect to it and then read the information. Your database doc. will give instructions on creating user/pass on it. For eg. you can create user/password as tcuser/mypassword. You then need to configure a Datasource in Tomcat which can be used by Tomcat to connect to this database and read the proper tables for authentication. Read the Datasource related docs. http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html These instructions are for authentication information stored in a relational database that can be accessed by proper JDBC driver an example would be MySQL. If you are storing authentication information in LDAP server then read that section. -Sameer --- On Tue, 7/22/08, Carol Cheung [EMAIL PROTECTED] wrote: From: Carol Cheung [EMAIL PROTECTED] Subject: DataSourceRealm documentation To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, July 22, 2008, 3:07 AM Hi, I'm reading about DataSourceRealm at http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html and step 2 under Quick Start is confusing. It says Configure a database username and password for use by Tomcat ... What does this mean? What should the username and password be and where should they be located so that they are configured for use by Tomcat? There's no username or password specified in the example Realm element under the DataSourceRealm section. Thanks, Carol - 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: is it possible more than 1 tomcat in single system?
How do you start them now ? I would think that if you are running the startup batch/cmd files then the easiest way would be to write one single batch/cmd file to kick off both the startup scripts from whatever locations they are installed. -Sameer --- On Mon, 7/14/08, Edi [EMAIL PROTECTED] wrote: From: Edi [EMAIL PROTECTED] Subject: Re: is it possible more than 1 tomcat in single system? To: users@tomcat.apache.org Date: Monday, July 14, 2008, 6:36 PM i have installed two tomcats 1. 1st tomcat have installed in c:\program files\Tomcat5.0 with port 8080 2. 2nd tomcat have installed in f:\program files\Tomcat5.0 with port 8081 how can i start and work both tomcat at the same time. thanks and regards, edi Edoardo Panfili wrote: Edi ha scritto: Hello Experts, Is it possible to install more than 1 tomcat in a single system with different ports? Yes, take a look at http://azeditech.com/tomcat/multiple-tomcat-instances.html You can find more informations using Google. Edoardo - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/is-it-possible-more-than-1-tomcat-in-single-system--tp18416418p18443522.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Error HTTP 500 in war deployment
Looks like your ISP's Tomcat installation is missing some jars . -Sameer --- On Thu, 7/10/08, Marcos [EMAIL PROTECTED] wrote: From: Marcos [EMAIL PROTECTED] Subject: Error HTTP 500 in war deployment To: Tomcat Users List users@tomcat.apache.org Date: Thursday, July 10, 2008, 9:04 AM Hi people. I need to deploy a war file in Tomcat 5.5.26 I upload the war, but when uploads finished i have the next error. What can be wrong ? (I can deploy in my pc as localhost, but in my ISP don?t work and is the same .war file ) thanks for any help. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:103) org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:350) org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302) org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:157) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs. Apache Tomcat/5.5.26 - 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: tomcat with jcaptcha
Hi, Directories and Web Applications are different things. In case of Tomcat , a directory is created for each web application deployed on the server, all these go under the webapps directory. so for example you have 2 applications say app1 and app2 running inside Tomcat then you will see two directories under your webapps : webapps | - app1 (you can have directory under these, that will depend on your app. needs) | - app2 You can create more directories under your application directory if you want , depends on what your needs are. These are just directories under your application directory and not separate Web Applications. -Sameer --- On Tue, 7/8/08, WILLIAMer [EMAIL PROTECTED] wrote: From: WILLIAMer [EMAIL PROTECTED] Subject: RE: tomcat with jcaptcha To: users@tomcat.apache.org Date: Tuesday, July 8, 2008, 8:42 AM MY webapps tree: eCom-Admin -Login.jsp -Account - some .jsp -Other directory I think Admin and eCom are not two webapps And Admin is not a webapps deployed inside eCom, right? Caldarale, Charles R wrote: From: WILLIAMer [mailto:[EMAIL PROTECTED] Subject: Re: tomcat with jcaptcha Now, i think i just only one question :) I know the sessions cant share with two directory(apps). But iinclude parent and child directory? The dir Admin just under the dir eCom. If you're asking if one webapp can be deployed inside another webapp's directory, the answer is definitely no. Each webapp must be in a separate directory (or war file) immediately under the Host appBase directory, or else in a directory completely outside of the Host appBase. Under no circumstances can webapp deployments overlap. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18331041.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Configuring DataSources using jsp: reload context.xml?
That may work for new datasources but could create a problem for existing data sources specifically if they are already being used and have pooled connections. The existing pooled connections may be in use by the applications too. Restarting the tomcat after modifying datasource may be a better and simpler option. -Sameer --- On Tue, 7/8/08, Jonas Wagner [EMAIL PROTECTED] wrote: From: Jonas Wagner [EMAIL PROTECTED] Subject: Re: Configuring DataSources using jsp: reload context.xml? To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, July 8, 2008, 1:50 PM The problem is now solved, though in a somewhat unsatisfying way. I wrote my own configuration file to store information about the data sources, and now I connect to databases using DriverManager. I'm still wondering about more elegant ways to do dynamical configuration of data sources. Would it be worth it to file a feature request for Tomcat, saying it should recreate the JNDI context when META-INF/context.xml changes? Any other ideas? Cheers, Jonas - 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: Any application which is use to detect tomcat memory leak problem
One of the things I had done in my past projects was to run a thread which periodically executes the freeMemory /totalMemory methods on Runtime class in JVM, this will at least tell you how the memory is utilised, but pinpointing the leak may need a commercial tool. -Sameer --- On Mon, 6/23/08, Nix Hanwei [EMAIL PROTECTED] wrote: From: Nix Hanwei [EMAIL PROTECTED] Subject: Any application which is use to detect tomcat memory leak problem To: Tomcat Users List users@tomcat.apache.org Date: Monday, June 23, 2008, 9:47 AM Hi Gurus, Is there any application which I may use to detect tomcat memory leak problem? Thank you in advance for any value input. Thanks Regards. Get your new Email address! Grab the Email name you#39;ve always wanted before someone else does! http://mail.promotions.yahoo.com/newdomains/sg/ - 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: How can applications be isolated in Tomcat?
I would suggest putting the non-production environments on a different Tomcat instance preferably on a different machine. -Sameer --- Pablo Lopez [EMAIL PROTECTED] wrote: Hi, I'm currently putting together a solution for an off-the-shelf document management application that requires Tomcat to run a form design component. I'd like to have a single Tomcat server supporting the production and five non-production environments but isolate these instances. Im hoping this will give some isolation so non-prod doesnt take prod off-line but that I can also test new versions of the form design component in non-prod before rolling it into prod. It appears this could be done through virtual hosting and appbase settings but this is way beyond my knowledge and Im just architecting the solution. I know we'll have to get a Tomcat expert in at some point in the future but just wondered if I'm going down the right or wrong road here. Any help or advice would be greatly appreciated and apologies if I got all of the terminology wrong. Regards, Pablo No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.5/1358 - Release Date: 4/3/2008 6:36 PM - 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 rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com - 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: Application context configuration datasources
Where is your Resource definition ? seems like the Driver class name and url is not defined. -Sameer --- Charl Gerber [EMAIL PROTECTED] wrote: I have 4 Tomcat environments for the same application: two development machines, 1 test and 1 production. Development machines are Windows 2000 and Vista, the others are linux. All 4 machines have Tomcat 6.0.14 installed. I really have problems getting the application properly deployed and configured. I have a global datasource configured in tomcat's server.xml and the mysql driver jar is in the /lib directory of tomcat. If I deploy the application by putting it in the webapps dir or using the ant manager tasks, I get this exception: Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) ... 45 more If I copy the contents of the application's META-INF/context.xml into the server.xml, then the application and datasources loads fine, no problems. It looks something like: Context path=/myapp docBase=path_to_war debug=0 reloadable=false antiJARLocking=true antiResourceLocking=true crossContext=true ResourceLink name=jdbc/mydatasource global=jdbc/mydatasource type=javax.sql.DataSource / /Context (I then have a context.xml and the same part in the server.xml, but it doesn't seem to do harm) But then I cannot use the ant manager tasks to redeploy the application: C:\projects\myapp\build.xml:198: FAIL - Context /myapp is defined in server.xml and may not be undeployed On the test and production (linux) servers, its not that critical, as I do not do a lot of deployments. So there I have the app configured in server.xml and a deployment basically means stopping stopping, unzipping the war to an exploded docbase dir and starting tomcat again. (The restarting is also required because I use hibernate and there are some known memory leak issues there) So can someone clarify where/how the application must be configured to be able to use the ant manager tasks, but also to get the datasource working? Thanks! Charl - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke -Sameer http://in.groups.yahoo.com/group/indiaenergy/join Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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 hangs on SATA Linux server
Is this just with Tomcat or does it happen with other apps too ? Chances are that your device driver may be having issues and hence slowing down the system in between. -Sameer --- Rick Fincher [EMAIL PROTECTED] wrote: Hi All, We have a web app running on Tomcat that accesses Oracle via JDBC on a Linux server (Centos 4.5) . The web app runs fine on one server but but locks up or hangs for 20-30 second periods on a Dell sever running with SATA storage. I only mention SATA because that is the only significant difference between the two servers. Anyone have a clue what is causing this? Thanks! Rick - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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: Java Mail Inside Tomcat
Can you give the line number as to where the error is happening. I found this link on google search you can read thru the same it describes similar problems. We have not had problems using java mail under tomcat but we dont use imap. http://forum.java.sun.com/thread.jspa?threadID=761635messageID=4347363 -Sameer --- jamieb [EMAIL PROTECTED] wrote: Hi there I have encountered a bizzare problem... I have a small peice of code that fetches emails from an IMAP server using TLS. This code works perfectly in a standalone application, however, when I copy and paste it over to a Tomcat application it does not work. The code uses Java Mail 1.4.1 and Java Secure Sockets. The following error is outputted when the code is run from within Tomcat: javax.mail.MessagingException: Unrecognized SSL message, plaintext connection?; nested exception is: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? NOTE: in case you are wondering: YES in both cases the server is connecting to the same port. Now I have checked: - the same java mail version is used across applications - the same JRE (v1.6) - all input parameters are the same Any ideas on what might be causing this problem in the Tomcat environment? package com.test.support; import java.io.*; import java.security.Security; import java.util.Properties; import javax.mail.*; import javax.mail.internet.*; import java.net.*; public class TestMailboxConnection { /** * @param args */ private static final String DUMMY_SSL_FACTORY = com.test.support.DummySSLSocketFactory; public static void main(String[] args) { if (args.length3) { System.out.println(\n\nUtility to Detect Mail Server Connection Settings); System.out.println(Usage: TestMailboxConnection server username password port secure_port ); return; } String server = args[0]; String username = args[1]; String password = args[2]; String port = 143; String secureport = 993; if (args.length3) { port = args[3]; secureport = args[4]; } Properties props = new Properties(); // Insecure Test testEcho(server,port); //testEcho(server,secureport); System.out.println(properties:+props); String protocol = imap; props.put(mail.+protocol+.port,port); test(imap insecure,protocol,server,Integer.valueOf(port),username,password,props); props.put(mail.+protocol+.starttls.enable, Boolean.TRUE); props.put(mail.+protocol+.socketFactory.fallback,true); props.put(mail.+protocol+.socketFactory.class, getSSLFactory()); props.put(mail.+protocol+.socketFactory.port,secureport); test(imap tls (fallback),protocol,server,Integer.valueOf(port),username,password,props); props.put(mail.+protocol+.socketFactory.fallback,false); test(imap tls,protocol,server,Integer.valueOf(port),username,password,props); protocol = imaps; props = new Properties(); props.put(mail.+protocol+.socketFactory.fallback,false); props.put(mail.+protocol+.socketFactory.class, getSSLFactory()); props.put(mail.+protocol+.socketFactory.port,secureport); test(imap ssl,protocol,server,Integer.valueOf(port),username,password,props); } public static String getSSLFactory() { return DUMMY_SSL_FACTORY; } public static void test(String testName, String protocol, String server, int port, String username, String password, Properties props) { java.security.Provider[] providers = Security.getProviders(); Session session = Session.getInstance(props, null); session.setDebug(true); Store store = null; try { store = session.getStore(protocol); } catch (Exception nspe) { System.out.println(no such provider); return; } try { System.out.println(\nprotocol='+protocol+',server='+server+',port='+port+',username='+username+',password='+password+'}); System.out.println(props+\n); store.connect(server,Integer.valueOf(port), username,password); } catch (Exception e) { System.out.println(\n failed:+e.getMessage()+\n); System.out.println(mailbox connection properties +props);
Re: Can pl anybody help me with org.apache.jasper.JasperException: /jsp/ballmember/Test.jsp(5,34) equal symbol expected
Open the jsp code in a programmers editor and check the syntax , specifically on the line number mentioned by the compiler. This looks like a syntax issue. -Sameer --- Sneha Manohar [EMAIL PROTECTED] wrote: org.apache.jasper.JasperException: /jsp/ballmember/Test.jsp(5,34) equal symbol expected org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88) org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:195) org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:150) org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:162) org.apache.jasper.compiler.ParserController.getPageEncodingForJspSyntax(ParserController.java:451) org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:392) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:173) org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:153) org.apache.jasper.compiler.Compiler.compile(Compiler.java:314) org.apache.jasper.compiler.Compiler.compile(Compiler.java:294) org.apache.jasper.compiler.Compiler.compile(Compiler.java:281) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) - Did you know? You can CHAT without downloading messenger. Click here Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - 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: How to run a .exe file from a web application in tomcat
You can specify the correct mime type and hopefully your browser will launch the proper application. A better approach would be to write a Java applet which will allow the user to do modifications to your file/s. -Sameer --- Jitendra Ch [EMAIL PROTECTED] wrote: Hi to allI am new member to this group. I am having some problems in calling an .exe file for example notepad, from a web application using Tomcat.Is it possible to call an .exe file from a web application in Tomcat.With Regards,Jitendra _ Get the new Windows Live Messenger! http://get.live.com/messenger/overview The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php - 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: Need Help w. Servlets And The JDBC.
You can configure a tomcat datasource to get a connection or you can load your database driver and get a connection object. The advantage with using tomcat datasource is that it will handle connection pooling for you. The tomcat docs explain how to define a datasource (you have to do it in context.xml) , also you will need the JDBC drivers for whatever database you are connecting to. -Sameer --- Steve R Burrus [EMAIL PROTECTED] wrote: Hi all. I am an admitted newbie when it comes to using a database connection for a servlet to access. So can someone please tell me the basics about how exactly I should go about doing this?? I have been very much stumped about how I should do this for quite a long time now! I just know that I should use 1 of 3 getConnection( ) methods to start to do this and create a Connection object but little else. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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: Database connection pooling in Tomcat 5.5
I have a datasource defined similar to yours I get this error when I try to use ds.getConnection(username, password); but if I just use ds.getConnection(); it works fine. -Sameer Darren Hall [EMAIL PROTECTED] wrote: Is there any other information I can supply to help people help me understand why I'm getting this error (below)? I've made some progress on this. I'm now receiving a SQLNestedException: Cannot create PoolableConnectionFactory error when calling getConnection on the DataSource object retrieved from my connection pool. Here is the stack trace: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01017: invalid username/password; logon denied) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSourc e.java:855) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:540) at org.federallabs.labs.LaboratorySearchAction.execute(LaboratorySearchAction.j ava:99) You are likely connecting to the wrong catalog. Is the pool parameter defaultCatalog set? That's specified in my Context, correct? If so, then no, I don't have my defaultCatalog parameter set. Here is my context.xml file (comments removed, as well as domain uname and passwd) debug=5 reloadable=true crossContext=true type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@devdb1.(mydomain).com:1521:flcdb username=(uname) password=(passwd) maxActive=20 maxIdle=10 maxWait=-1 removeAbandoned=true moveAbandonedTimeout=180 logAbandoned=true/ - 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] All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke -Sameer - Stay in the know. Pulse on the new Yahoo.com. Check it out.
Re: Database connection pooling in Tomcat 5.5
Instead of defining the username and password as attributes have you tried defining them as resource parameters ? just a hunch .. parameter nameusername/name valuemyoracleuser/value /parameter -Sameer Parsons Technical Services [EMAIL PROTECTED] wrote: Try this: http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq_0.htm#05_03 Otherwise there is some differences in the parameter names. Others have used connectionUser and connectionPassword , I think it was. You can search the archives for OracleDriver to see what I mean. Sorry, I do not use oracle, so I cannot say what is right. Doug - Original Message - From: Darren Hall To: 'Tomcat Users List' Sent: Monday, September 18, 2006 4:38 PM Subject: RE: Database connection pooling in Tomcat 5.5 Further progress... When I connect to the database directly (not using a connection pool) and specify the same username and password below, the code executes fine. When I try to do the context lookup and connect to the database via the connection pool, I get the invalid username/password; logon denied error. This leads me to believe the error is in my configuration (or my code). What am I doing wrong here?? Thanks, Darren -Original Message- From: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 2:45 PM To: 'Tomcat Users List' Subject: RE: Database connection pooling in Tomcat 5.5 You are likely connecting to the wrong catalog. Is the pool parameter defaultCatalog set? That's specified in my Context, correct? If so, then no, I don't have my defaultCatalog parameter set. Here is my context.xml file (comments removed, as well as domain uname and passwd) debug=5 reloadable=true crossContext=true type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@devdb1.(mydomain).com:1521:flcdb username=(uname) password=(passwd) maxActive=20 maxIdle=10 maxWait=-1 removeAbandoned=true moveAbandonedTimeout=180 logAbandoned=true/ - 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] - How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
Re: tomcat Connection pooling
Tomcat Datasources should be able to take care of connection pooling for you unless you have a specific requirement for which you need your own pool. The Datasource configuration/usage etc. is explained in tomcat docs. -Sameer prakash shanmugam [EMAIL PROTECTED] wrote: hi, i am using tomcat4 with MySql5 for web application development.. i am trying to implement connection pooling in Tomcat... can anybody give me some links or documents or pdfs by means of which i can learn details about connection pooling in tomcat... thanks in advance.. prakash - Get your email and more, right on the new Yahoo.com
Re: Executing binary from Servlet
From your directory path mentioned it looks like this is a work folder /srv/www/tomcat5/base/webapps/simulator/WORK/yqzatmopa343/cimmsim: Is it possible that your dir/file is not available at some point in time when servlet is executing ? Have you tried executing a process from some fixed directory location instead ?? -Sameer Mark HB [EMAIL PROTECTED] wrote: Tomcat is started using the startup.sh script provided and it runs using a specific tomcat account which has admin type rights. I am beginning to wonder what sort of problem this may be, as I must emphasise that: The runtime.exec() DOES work sometimes, and not others. There does not seem to be a pattern to when it works. Literally, I can click on the link and it will work, then click back and click on the link again, and it won't work! Because of this, I am trying to rack my brains as to what might cause this runtime.exec() to throw a cannot execute error sometimes, but not others. It seems possible that it is not an error with Tomcat, as otherwise why would it not be consistently failing? Cheers Mark Sameer Acharya wrote: Doesent look like a SecurityManager issue cos that would have resulted in a SecurityException. Just glanced thru the exec api doc and found this Starting an operating system process is highly system-dependent. Among the many things that can go wrong are: The operating system program file was not found. Access to the program file was denied. The working directory does not exist. You will get an IOException if any of these happen. How do you start the tomcat and under what id does it run ?? -Sameer Mark HB wrote: HI, It all runs fine as a standalone, and when I print the command that I am running using exec to the screen and then run it myself, it works fine. I had this servlet deployed on another machine, and I never had this problem. It is very odd, as sometimes it works and the executable is executed and the results are returned, and other times it returns the same error as before. There doesn't seem to be any pattern as to when they work. I have changed the policy file, to no affect java.io.IOException: java.io.IOException: /srv/www/tomcat5/base/webapps/simulator/WORK/yqzatmopa343/cimmsim: cannot execute at java.lang.UNIXProcess.(UNIXProcess.java:143) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Runtime.java:566) at java.lang.Runtime.exec(Runtime.java:428) at RunSimulation.run(CimmSimServlet.java:655) I am looking into deploying the servlet in the J2EE app server instead and seeing if that avoids this problem. Its all very odd! Thanks Mark Santosh Puranshettiwar wrote: I agree with David. This does not seem to be a SecurityManager problem. Does your code run properly as a normal executable program (with main())? Sameer Acharya wrote: Have you tried adding following to your web app permissions in policy file permission java.lang.RuntimePermission java.lang.Runtime; -Sameer Mark HB wrote: Hi, My apologies for the confusion, but my previous claim to have sorted this problem out is now incorrect. It seems with the upgrade to 1.5.0, the execution of the external binary does work, --- but only sometimes?? ---. I can't seem to work out the exact conditions that it works, and seems to be random. Could someone please indicate what I need to add/change in the catalina.policy file to allow the execution of external binaries. I've had a good look at this url and can't seem to find any indicators. http://tomcat.apache.org/tomcat-5.0-doc/security-manager-howto.html Cheers Mark - Thanks Enrico, However I seem to have inadvertently solved it. I was updating to the latest release of jre and recompiled the servlet with 1.5.0 and now it works. Previously I was using 1.3.1. So there we go. Cheers Mark Enrico Giurin wrote: Hello, I guess yours is a problem of security manager of tomcat. I think you have to modify some entries of the catalina.policy file. http://tomcat.apache.org/tomcat-5.0-doc/security-manager-howto.html Enrico. - Original Message - From: Mark HB To: Sent: Tuesday, September 12, 2006 10:16 AM Subject: Executing binary from Servlet Hi, I am looking for some help on a problem I have encountered with executing a binary from a servlet using Runtime.getRuntime().exec() The code that I have is simply executing a binary called cimmsim: File theDir = new File(curdir+WORK/+rand); java.lang.String cmdline = theDir+/cimmsim -f config; try { Process p = Runtime.getRuntime().exec(cmdline, null, theDir); } catch (IOException e) { e.printStackTrace(); } The error that is produced is: java.io.IOException: java.io.IOException: /srv/www/tomcat5/base/webapps/simulator/WORK/yqzatmopa343/cimmsim: cannot execute at java.lang.UNIXProcess
Re: Executing binary from Servlet
Have you tried adding following to your web app permissions in policy file permission java.lang.RuntimePermission java.lang.Runtime; -Sameer Mark HB [EMAIL PROTECTED] wrote: Hi, My apologies for the confusion, but my previous claim to have sorted this problem out is now incorrect. It seems with the upgrade to 1.5.0, the execution of the external binary does work, --- but only sometimes?? ---. I can't seem to work out the exact conditions that it works, and seems to be random. Could someone please indicate what I need to add/change in the catalina.policy file to allow the execution of external binaries. I've had a good look at this url and can't seem to find any indicators. http://tomcat.apache.org/tomcat-5.0-doc/security-manager-howto.html Cheers Mark - Thanks Enrico, However I seem to have inadvertently solved it. I was updating to the latest release of jre and recompiled the servlet with 1.5.0 and now it works. Previously I was using 1.3.1. So there we go. Cheers Mark Enrico Giurin wrote: Hello, I guess yours is a problem of security manager of tomcat. I think you have to modify some entries of the catalina.policy file. http://tomcat.apache.org/tomcat-5.0-doc/security-manager-howto.html Enrico. - Original Message - From: Mark HB To: Sent: Tuesday, September 12, 2006 10:16 AM Subject: Executing binary from Servlet Hi, I am looking for some help on a problem I have encountered with executing a binary from a servlet using Runtime.getRuntime().exec() The code that I have is simply executing a binary called cimmsim: File theDir = new File(curdir+WORK/+rand); java.lang.String cmdline = theDir+/cimmsim -f config; try { Process p = Runtime.getRuntime().exec(cmdline, null, theDir); } catch (IOException e) { e.printStackTrace(); } The error that is produced is: java.io.IOException: java.io.IOException: /srv/www/tomcat5/base/webapps/simulator/WORK/yqzatmopa343/cimmsim: cannot execute at java.lang.UNIXProcess.(UNIXProcess.java:143) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Runtime.java:566) at java.lang.Runtime.exec(Runtime.java:428) at RunSimulation.run(CimmSimServlet.java:655) A uname -a on the system gives: Linux apppx1 2.6.16.13-4-xen #1 SMP Wed May 3 04:53:23 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux SUSE LINUX 10.1 I have ensured that the permissions are set to at least 755 and am now at a bit of a loss. Any ideas? Cheers Mark -- --- Mark Halling-Brown | Tel: +44-20-7631-6839 Research Associate | Room 359| Fax: +44-20-7631-6803 School of Crystallography | Birkbeck College| Email: Malet Street| [EMAIL PROTECTED] London WC1E 7HX | [EMAIL PROTECTED] UK | http://people.cryst.bbk.ac.uk/~ghall04 --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.2/443 - Release Date: 11/09/2006 ___ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- --- Mark Halling-Brown | Tel: +44-20-7631-6839 Research Associate | Room 359| Fax: +44-20-7631-6803 School of Crystallography | Birkbeck College| Email: Malet Street| [EMAIL PROTECTED] London WC1E 7HX | [EMAIL PROTECTED] UK | http://people.cryst.bbk.ac.uk/~ghall04 --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.
Re: need help with .startup.sh
You will have to look at catalina.sh and check how these two are being set $JAVA_OPTS $CATALINA_OPTS -Sameer Lee Chalupa [EMAIL PROTECTED] wrote: Hello: I need help figuring out how to modify my tomcat deployment so when the JVM starts it starts with a -server option. There seems to be a bug in the jvm implementation that fedoracore 4 is using and using this option when the jvm starts corrects the problem at least from my application's perspective. The problem is that I don't know what needs changing in the startup.sh or whatever. The application is deployed on linux runing Fedora Core 4. Could someone give me an idea what I need to edit. I know basic linux administration. Thanks Lee - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
Re: Install on XP Home edition
Open a command prompt and then try manually running the Tomcat startup batch file, you should be able to see the error message. Post the same here. -Sameer Lou Caudell [EMAIL PROTECTED] wrote: McRaven, Brian wrote: I installed Tomcat 5.5.17 on my home computer so that I can test my project when I'm away from work. After completing the steps from a website (www.codeservlets.com) I try the startup.bat file in the bin directory. The program runs for a very short time and quits before I can read the one and only line that is written in the DOS screen. Does anyone know what could be wrong here. Does the fact that I installed the program on a Home Edition of XP mean that it won't work. I know I can't get IIS installed on a Home Edition of XP. Brian McRaven Might not be a bad idea to disable the firewall, while your configuring. - Lou Caudell - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Groups are talking. Weacute;re listening. Check out the handy changes to Yahoo! Groups.
Re: How to do the precompilation on jsp
My understanding is that you need to pre-compile jsp's from your build before you start using the application right ? You can write a simple script to hit all your jsp's ( need to start tomcat first), this will precompile your jsp's. -Sameer Raju Balugu [EMAIL PROTECTED] wrote: Hi All, We are using the clearcase for version control(vob).My requirement is like..I need to do the precompilation before going to ran a build?is there any utilities in tomcat end or third partys.(as the jasper-compiler is so fast we are palning to do this).please share your experience on precompile the jsp files Thanks in advance. Regards Raju - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Re: automatically detecting if HTTPS is supported
You should be able to do a isSecure() on the request object to check if the request is thru' secure channel. -Sameer Jason Novotny [EMAIL PROTECTED] wrote: Hi, I have a JSP that does a form submission, and I'm wondering if there's any way I can detect if HTTPS is supported so that I can create a secure https connection to my servlet, or use normal http if not. Thanks, Jason - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Re: query
Oracle also installs its own jdk and may have changed the environment settings have you checked the java version at command prompt. Notmally Oracle jdk is 1.3 and installed inside Oracle home dir. Also you may want to try running tomcat from command prompt, it may show some errors. -Sameer veena v [EMAIL PROTECTED] wrote: There is no error message. Tomcat does start and automatically shuts down. On 6/22/06, Sameer Acharya wrote: What are the error messages you are seeing during tomcat startup ? Or try giving the log. -Sameer veena v wrote: I have windows xp installed on my system. I installed tomcat 4.1 and it was working properly. But after installing oracle 9i tomcat is not working though i have installed tomcat and oracle on different port. Please do help me. - Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail Beta. - Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.
Re: query
What are the error messages you are seeing during tomcat startup ? Or try giving the log. -Sameer veena v [EMAIL PROTECTED] wrote: I have windows xp installed on my system. I installed tomcat 4.1 and it was working properly. But after installing oracle 9i tomcat is not working though i have installed tomcat and oracle on different port. Please do help me. - Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
Re: When does the MarkSweepCompact Garbage Collector perform GC?
Check out this link might answer few of your queries. http://java.sun.com/docs/hotspot/gc1.4.2/faq.html -Sameer Benjamin Chu [EMAIL PROTECTED] wrote: Hello! Now I am using the jconsole to monitor the heap memory usage of the tomcat 5.5. I've constructed a testbed to test the performance of the applications running on the tomcat. However, the jconsole shows that the MarkSweepCompact Garbage Collector never does its job. The only two ways to make this garbage collector to perform GC are: 1 I push the button perform GC shown on the Memory tab of the jconsole 2 I insert the code System.gc() into the servlets. I think both of these two ways are not good, and this garbage collector should perform GC automatically (in my opinion). I just wonder when or under which conditions the MarkSweepCompact Garbage Collector would perform GC. Or actually there is something wrong with my configuration so it doesn't perform GC? Thank you very much! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice
Re: Tomcat Memory Leak
Did you try explicitly setting all those Hashmaps/Hashtables references to null. Since you already mentioned that your are taking care of all your Resultsets etc that doesent sound like an issue. I tried a small jsp example where I created a hashtable but never explicitly dereference it and the freememory seems to reduce continuosly. When I do a gc run though the memory seems to get freed. Hope this helps. -Sameer Petkov, Rossen [EMAIL PROTECTED] wrote: Hello, I am having a problem with Tomcat 5.0.19 on windows with JDK 1.4.2_03.The memory that java.exe is using keeps growing till the point that tomcat Runs out of memory. Using a profiler, doesn't seem to help me much. I can see the memory being used by certain classes go up (mainly char[] and byte[] and some tomcat classes, please see the tables below) and even reach all the way to the point that used java heap equals to the java heap, then GC probably kicks but, while running Tomcat throws an OutOfMemory exception. I have allocated -Xmx896M. I'm now forcing a GC when the free memory drops to 15%. With every GC, the freed memory is less and less, which to me is an indication of memory leak. I can't figure out where all those char[] objects are coming from or why they aren't being reclaimed by the garbage collector. I know that something is holding memory and isn't letting it go, and I know that the leaked memory consists of char[] and byte[] objects (see below tables). What I can't figure out is how to determine what's doing the leaking. After several hours of heavy usage, the GC runs and frees less memory than the previous run. This gives me on day of normal operation and I have to restart Tomcat after hours to be ready for the next day, not a really acceptable solution. I noticed the 3 tomcat classes: org.apache.tomcat.util.buf.MessageBytes, org.apache.tomcat.util.buf.ByteChunk and org.apache.tomcat.util.buf.CharChunk. The memory occupied my these seems to never be released. Can they be the cause of the multiple byte[] and char[]? Some info about the application/environment: - Tomcat 5.0.19 on windows with JDK 1.4.2_03. - MVC type web application - front Controller dispathing requests to business classes and forwards to appropriate JSP, passing necessary data objects in the request object - heavy JDBC use and DAO/DTO components, mainly using PreparedStatement - Oracle stored procedures and functions acccessed thru CallableStatement - Oracle database I am doing the usual for closing all jdbc database related objects like ResultSet, PreparedStatement and connections. Here are some thoughts that I have, that could be the reason for the leak, these are more questions: 1. DTO objects are being passed from the data layer to the business layer and finnaly to the JSP. After using the DTOs on the JSP, they are not explicitly set to null in the JSP. I see that all DTO declarations are in the service method of the compiled JSPs. Can this be a problem? 2. HashMaps, HashTables and LinkedHashMaps are being passed the same way thru the layers and end up in the JSPs. These are not set to null either. Can this be a problem? 3. PreparedStatement and CallableStatement are always closed, but not always set to null. Can any of these be the cause? Below are some metrics from my environemnt: After a several hours of heavy usage, BEFORE GC: Name Instance countSize char[ ]2,200,184 425,721 kB byte[ ]199,003 178,902 kB java.lang.String 1,825,003 42,773 kB java.lang.StringBuffer 925,351 21,687 kB [ ] 679,935 19,181 kB org.apache.naming.resources.FileDirContext$FileResourceAttributes 122,254 8,595 kB org.apache.tomcat.util.buf.MessageBytes117,876 5,525 kB org.apache.tomcat.util.buf.ByteChunk 135,061 5,275 kB org.apache.tomcat.util.buf.CharChunk 132,558 5,178 kB java.util.HashMap$ValueIterator97,5513,04 ...more AFTER GC: This is the top of the list, sorted by size: Name Instance countSize byte[ ]47,866167,877 kB char[ ]69,387151,906 kB org.apache.tomcat.util.buf.MessageBytes117,928 5,527 kB org.apache.tomcat.util.buf.ByteChunk 135,120 5,278 kB org.apache.tomcat.util.buf.CharChunk 132,616 5,180 kB [ ] 71,5504,711 kB int[ ] 22,1951,408 kB java.text.DecimalFormat7,351 804 kB java.lang.String 32,828
Re: Tomcat 5.0.28, Socket hanging on sending 20KB data for 16 minutes
Try synchronizing the code that uses Jfreechart classes. -Sameer Kumar Pandey [EMAIL PROTECTED] wrote: Hi I'm using Tomcat 5.0.26 that comes with JBoss 3.2.5 with default configurations A servlet creates pie/bar charts using JFreeChart. This is refreshed every 5 seconds via javascript refresh in the brower. All this has been workign fine for most customers. Suddenly for a specific customer sessions coming from a specific newtwork/georaphical location we see that the 5 seconds chart refreshes are hanging the thread. Charts are 20 KB. For a single user in the system sometimes these requests are talking up 20 ~30 threads and each stuck for 15~16 minutes before it finally clears up. We ran ethereal on the tcp packet and see that when the threads are hung, browser is sending FIN, ACK eventhough server hasn't completed sending the data. Thus we see TCP retranmissions of same packets as its not receiveing any ack from the client. How do I troubleshoot this issue. System is not memory starved and cpu is 98% idle. Any pointers on trouble shooting this would be greatly appreciated. Thanks Kumar Here's the thread dump of one of the hung request. java.net.SocketOutputStream.socketWrite0(Native java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) java.net.SocketOutputStream.write(SocketOutputStream.java:136) org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:714) org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398) org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:318) org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:737) org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:125) org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:569) org.apache.coyote.Response.doWrite(Response.java:542) org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:368) org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398) org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:318) org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297) org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:85) sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native locked sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:472) sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:228) locked sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:235) locked org.jfree.chart.encoders.SunJPEGEncoderAdapter.encode(SunJPEGEncoderAdapter.java:139) org.jfree.chart.encoders.EncoderUtil.writeBufferedImage(EncoderUtil.java:136) org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:442) org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:388) com.transerainc.rtmcui.util.ChartUtil.drawChartAsJPEG(ChartUtil.java:46) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice