RE: java.net.BindException
It means that the port that Tomcat is trying to use is already in use by another process. You can check ports in use by using the netstat command before you try and start Tomcat, you can change the server port used by Tomcat in the conf/server.xml file. Usual suspects that occupy the port are - Older installations of Tomcat that run on startup (NT Service for instance). Other web servers (if you have already changed Tomcat to use port 80 then check for the presence of other web servers IIS or Apache for instance). Port 8080 is quite often used by many applications as a default port, Tomcat being one of them. Andy -Original Message- From: Manfred.Zerndl [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 11:30 AM To: [EMAIL PROTECTED] Subject: java.net.BindException i got a java.net.BindException when i start the tomcat-server with startup.sh why is this adress just in use? FATAL:java.net.BindException: Die Adresse wird bereits verwendet java.net.BindException: Die Adresse wird bereits verwendet at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363) at java.net.ServerSocket.init(ServerSocket.java:138) at java.net.ServerSocket.init(ServerSocket.java:102) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultSer verSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint. java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:1 88) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
RE: servlet-mapping problem
Here is an example of a Servlet and URL mapping servlet servlet-nameAServlet/servlet-name servlet-classmy.package.AServlet/servlet-class /servlet servlet-mapping url-pattern*.ase/url-pattern servlet-nameAServlet/servlet-name /servlet-mapping The servlet mapping associates the name AServlet to the servlet my.package.AServlet. The URL mapping means that ANY request that ends in .ase will be passed to the associated servlet via the servlet mapping If you want a specific filename, specific.ase would mean any request for the file specific.ase would be routed to the my.package.AServlet servlet. I am not certain if you can specify a complete path (ie /some/path/specific.ase) as I have never needed such specificity however get the first example working and then try the more specific versions. I have only ever used the first type of mapping scheme in practice, I know that it works. Andy -Original Message- From: Paul Downs [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 12:35 PM To: tomcat Subject: servlet-mapping problem Hi, Still cannot use servlet-mapping and url-mapping have tried many a configuration. Is it possible that anyone on the list using tomcat 3.2.3 could mail me (personally or not) a short example of the relevant lines they have in server.xml and the web.xml for the user? It is starting to become a real problem... :-( Paul
RE: Help ~ Tomcat cache problem
-Original Message- From: Kenny Ma [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 12:51 PM To: [EMAIL PROTECTED] Subject: Re: Help ~ Tomcat cache problem I cant solve ~~ Anyone can solve this problem seems this is a big problem to many people Here is an excerpt from a working Tomcat server.xml file (cut down for brevity of course) I have left some of the XML tags inside the ContextManager section so you have some 'context' and can see where to look for what you need. This was actually the default setting for the ROOT application anyway. NOTE: If you are developing your JSP's on a machine that is remote from the actual Tomcat server then you may well be suffering from timestamp problems. Tomcat relies on the Last Changed timestamp of the files in question in order to detect that a file has been changed and so trigger compilation of the JSP file. Copying of files from one machine to another carries the Last Changed timestamp with it, if your development machine's clock is behind the tomcat server's clock then Tomcat may not be able to pick up the changes. Make sure that the times on both machines match, clock synchronisation is the best way of ensuring this. If you are not working on a Unix/Linux platform, find or write your own version of touch which will update the last updated timestamps (this would need to be run on the Tomcat server though). I recommend the former solution. ContextManager debug=0 workDir=work showDebugInfo=true !-- Interceptors -- !-- ContextInterceptor className=org.apache.tomcat.context.LogEvents -- RequestInterceptor className=org.apache.tomcat.request.SessionInterceptor noCookies=false / !-- Find the container ( context and prefix/extension map ) for a request. -- ContextInterceptor className=org.apache.tomcat.context.LoadOnStartupInterceptor / !-- Connectors -- !-- Normal HTTP -- Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.http.HttpConnectionHandler/ Parameter name=port value=80/ /Connector !-- Special webapps -- !-- You don't need this if you place your app in webapps/ and use defaults. For security you'll also need to edit tomcat.policy Defaults are: debug=0, reloadable=true, trusted=false (trusted allows you to access tomcat internal objects with FacadeManager ), crossContext=true (allows you to access other contexts via ServletContext.getContext()) If security manager is enabled, you'll have read perms. in the webapps dir and read/write in the workdir. -- !-- THIS IS WHAT YOU ARE LOOKING FOR HERE -- Context path =/ docBase=webapps/ROOT crossContext=true debug=0 reloadable=true /Context !-- Virtual host example - In 127.0.0.1 virtual host we'll reverse / and /examples (XXX need a better example ) (use http://127.0.0.1/examples; ) Host name=127.0.0.1 Context path=/examples docBase=webapps/ROOT / /Host -- /ContextManager
RE: servlet-mapping problem
This is from the conf/web.xml file. It shows how the /servlet url is mapped to all servlets. Andy servlet-mapping servlet-name invoker /servlet-name url-pattern /servlet/* /url-pattern /servlet-mapping -Original Message- From: Paul Downs [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 1:14 PM To: [EMAIL PROTECTED] Subject: RE: servlet-mapping problem Hi, servlet-mapping url-pattern*.ase/url-pattern servlet-nameAServlet/servlet-name /servlet-mapping Thanks for the response. I am trying to use: /servlet-mapping servlet-nameHelloWorld/servlet-name url-pattern/doHello/url-pattern /servlet-mapping Where a whole directory is mapped to a servlet, I have tried different forms: url-pattern/doHello/*/url-pattern But to no avail. Paul
RE: Off-Topic JSERV Question...
Can you please not send posts to Tomcat User list to personal email addresses. Thanks -Original Message- From: Robert Keddie [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 3:09 PM To: '[EMAIL PROTECTED]'[EMAIL PROTECTED] Subject: Off-Topic JSERV Question... I will eventually go to Tomcat but for now I need a quci fix for Jserv... I created a virtual host. This host has jsp files residing in it. Whenever I try to refer to the JSP through a link I get th efollowing response: JSP Error: Request URI:/jsp/MSTU_Parcel.jsp Exception: javax.servlet.ServletException: java.io.FileNotFoundException: c:\cdplus_permit\jsp\MSTU_Parcel.jsp (The system cannot find the file specified) But the jsp files are actually under C:\mstu\jsp\... I placed ApJServMount /servlets /mstu into Jserv.conf I created its own zone.properties file named mstu.properties. I placed in jserv.properties the servlet zone parameters. Is there any other directive i should place in the virtual host in httpd.conf?? VirtualHost IP address:8070 DocumentRoot C:/mstu ServerName 127.0.0.1 ErrorLog logs/mstu-error_log CustomLog logs/mstu-access_log common /VirtualHost Am i missing something? Any help would be greatly appreciated!
RE: servlet hang
I had problems like this in a more conventional Server/Client (Applet) scenario. I am not entirely certain what causes the ObjectInputStream to think it is at EOF and didn't really have the time to find a 'workaround'. It was actually easier to create an RMI setup for what I wanted to acheive. Sounds daunting, it isn't really. Needed the Java plugin in the browser to make it work (not a problem for me, these are limited distribution, read Intranet/Mobile client, applets. I initially wanted to do all my communication via a servlet using a stateful server/client setup however http based communication is NOT at all well suited for such scenarios. If you need your servlet to perform other duties, eg statistics etc, then it can also use RMI, means RMI is being used as a bridge. I found that I was able to do away with the servlet altogether in the end. Andy Bailey -Original Message- From: Noah Zigas [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 2:46 PM To: '[EMAIL PROTECTED]' Subject: servlet hang Hi All, I'm new to the this list, but I have searched endlessly on the following problem. First the machine config: Dell-installed RedHat Linux, kernel 2.2.14 Apache 1.3.12 compiled from source Tomcat 3.2.3 compile from source Blackdown JDK 1.2.2-FCS I have a webapp that utilizes applet-servlet communication. I send serialized java objects back and forth, but the problem I have only occurrs when sending a serialized object -from- the applet -to- the servlet. My servlet.log file shows StreamCorruptedException: EOFException. After a varying number of the above exceptions, the machine completely hangs. It's not just that the servlet engine crashes, but the entire machine. It then requires a hard reboot. I have tried trapping the StreamCorruptedException. I have tried closing the Connection.InputStream. I have tried reading the leftover bytes -from- the Connection.InputStream after the StreamCorruptedException was thrown. This is an important project for my company, and I'm at my wits end. Any suggestions or advice would be greatly appreciated. Noah Senior Software Engineer Paxar Systems Group
RE: nt service + nt service
Are you using either jdbc-odbc bridge or a JDBC driver that needs an ODBC entry? If so, then you will need to create a System DSN instead of a User DSN (assuming you haven't already). System DSN's are available to system services, User DSN's are not. That would explain the reason why it runs as a user process with startup.bat but not as an NT service. Could be something else mind. Andy -Original Message- From: David Oxley [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:18 PM To: '[EMAIL PROTECTED]' Subject: RE: nt service + nt service Try changing the user that the Tomcat service is running under. Dave [EMAIL PROTECTED] -Original Message- From: Michelle Buckley [mailto:[EMAIL PROTECTED]] Sent: 10 September 2001 13:08 To: [EMAIL PROTECTED] Subject: nt service + nt service hi guys and gals I have a slight problem and need some help, I have trawled the lists and havent found my answer yet... I have set up tomcat to run as an nt service using jk_nt_service, which works well, as in it starts the service for me. But I am still getting a problem, when i try to run serlvets, it keeps coming back with a db error, saying that that it couldnt get a connection.. If I stop the service and start tomcat using 'startup' instead, my serlvets run perfectlycan anyone point me to the answer to my problem? Cheers and TIA, MB _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: How to get jk_nt_service to notice failed startup of my service?
In this case Tomcat has started successfully. A Servlet throwing a ServletException from init() is not cause for Tomcat to cease working or to indicate a failure on startup (as there isn't one). Andy -Original Message- From: Rida Ligurs [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 06, 2001 9:29 PM To: Tomcat-User (E-mail) Subject: How to get jk_nt_service to notice failed startup of my service? I've been using jk_nt_service successfully for some time now, but I've noticed that even if my servlet's init() throws a ServletException, the service still appears to have started successfully in the Services Manager. What do I have to do to get startup failure to be properly reflected in the Services Manager?
RE: Tomcat URL Problem
Hi Ross, if you want to use + signs in a URL (inadvisable really) then you will need to encode them such that the + sign is converted to its %XXX equivalent. The + sign is used to denote spaces in GET method URL's so it would appear that Tomcat is doing the right thing. Use the - sign instead, or the _ (underscore) sign. Andy Bailey PS not being totally conversant with the relevant RFC's I am not 100% certain of the above explanation however I personally avoid + signs in URL's like the plague. -Original Message- From: Ross Allard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 2:45 PM To: '[EMAIL PROTECTED]' Subject: Tomcat URL Problem We have a tool which generates a website which, as usual, consists of a directory tree of html and other files. Our file naming convention makes heavy use of the plus sign, +, as a separator. E.g. file0+1, file1+2. This apparently causes an error when deployed on Tomcat. The plus sign seems to be mapped to space resulting in a 404 error. It is our understanding that our naming scheme is fully w3c compliant and we've had no problems with other html servers. Is this a Tomcat bug? Any help would be appreciated. Regards, Ross Allard Sas Institute
RE: CPU goes to 100%
Have you checked the Server to make sure that it isn't something else that is causing the crawl? Open Task Manager and check to see which process is eating the CPU, it might be something else other than Tomcat and your App. -Original Message- From: Murthy, Anand [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 4:13 PM To: '[EMAIL PROTECTED]' Subject: CPU goes to 100% Hi, We have a big application using Tomcat v3.2.1 and we are doing alot of Database connections. It is running on Windows 2000 server and we are using Sun's Java 1.3. Most of the day the CPU stays at 0%, but for some reason every afternoon it goes to 100% and application slows down to a crawl. At the end of each jsp file, we do some garbage collection, but it still does not seem to help. Does anyone have any ideas? Thank you, Anand Murthy Jr. Software Engineer Thomson Financial Research 617-856-1795
Suddenly my tomcat installation is broken
Hi, I have had Tomcat 3.2.1 running on my dev system with no problems for months now. For some reason it will no longer start. I get the following... Exception in thread main java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Can't find bundle for base name org.apache.tomcat.resources.LocalStrings, locale en_US at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.ja va:712) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:683) at java.util.ResourceBundle.getBundle(ResourceBundle.java:546) at org.apache.tomcat.util.StringManager.init(StringManager.java:115) at org.apache.tomcat.util.StringManager.getManager(StringManager.java:260) at org.apache.tomcat.startup.Tomcat.clinit(Tomcat.java:24) Now I have reinstalled from my original installation, same problem. My classpath has not changed I checked that against backups (it was running great until I went to restart it this morning). There are LocalString properties files as base, for _en and _es which is as expected in the webserver.jar. The classpath set for tomcat via startup.bat contains an %TOMCAT_HOME%\lib\webserver.jar, TOMCAT_HOME is set correctly (I even set it up explicitly as a system var). I do not believe this is an OS issue (this is on win2k Advanced Server). Rebooting my system has had no effect either. Any help for this mysterious problem would be greatly appreciated. Andy Bailey