Tomcat w/SOAP web services
I have been running Tomcat 6.x for some time, and building web applications with both the Netbeans and Wavemaker IDE. I am now dipping my toes into web services for the first time, and I could use a few pointers. I used Netbeans to construct a simple web service, and a client application that uses that service. When I 'deploy' the web service inside of Netbeans, it kicks off Tomcat and everything works fine. So I tried copying the .war file for the service to my regular Tomcat instance, restarted it, and when I ran the client program it gave me this error: Exception: javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://localhost:8084/WS_RRD_Distributor/WS_Get_RRD_File?wsdl. It failed with: Connection refused. I have not configured my Tomcat instance to read port 8084 - it is running on 8080 by default. So a couple of questions from a beginner in this area: 1) Are there things I need to add to my basic Tomcat instance in order to be able to run SOAP web services? 2) How do I get the ports set up correctly - it looks like Netbeans chose 8084 - I think that may be arbitrary, but I'm not sure. Since I just copied the .war file into Tomcat/webapps, do I need to change config files in Netbeans, in Tomcat, both or neither?? 3) What is the proper procedure for developing a web service using something like Netbeans and then deploying that in a target machine running Tomcat (I've asked a similar question on the Netbeans mailing list - but if the procedure involves modifying Tomcat itself, I figured I should ask it here as well... Thanks in advance nbc NAME: Neil B. Cohen (Verisign Inc.) PHONE: 703-948-4471 DOMAIN: nco...@verisign.com * * Murphy's Philosophy: Smile - tomorrow will be worse... * * O'Tooles Commentary: Murphy was an optimist! * - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Hibernate Exception...
I hope this is a trivial problem that someone can help me with... I have been running a web app, built using Netbeans with Tomcat for months now. The system uses Hibernate for database access. This week, I erased and rebuilt my desktop system - moved it from Fedora 8 to Fedora 10. I re-installed Netbeans and Tomcat. Netbeans rebuilds my program without any problem, but when I try to connect to the database (my login screen comes up fine) I get this: *Exception Handler * *Description: * An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error. *Exception Details: * java.lang.NoClassDefFoundError Could not initialize class org.hibernate.ejb.Ejb3Configuration *Possible Source of Error: * Class Name: /org.hibernate.ejb.HibernatePersistence/ File Name: /HibernatePersistence.java/ Method Name: /createEntityManagerFactory/ Line Number: /124/ |Source not available. Information regarding the location of the exception can be identified using the exception stack trace below. | *Stack Trace: * |org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:124) javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52) javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34) com.verisign.ncat.db.Ctl_User.getEntityManager(Ctl_User.java:36) com.verisign.ncat.db.Ctl_User.validateUser(Ctl_User.java:46) com.verisign.ncat.dm.User.validate(User.java:256) com.verisign.ncat.jsp.Page1.b_Login_action(Page1.java:185) sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)| and it goes on for several pages. Netbeans did not complain about missing libraries or missing classes. I have just downloaded the latest version of Hibernate and updated my libraries. In /usr/local/Tomcat, I find this: [nco...@nbc-penguin Tomcat]$ find . |grep hibernate ./webapps/NCAT/WEB-INF/lib/hibernate-core.jar ./webapps/NCAT/WEB-INF/lib/hibernate-annotations.jar ./webapps/NCAT/WEB-INF/lib/hibernate-commons-annotations.jar ./webapps/NCAT/WEB-INF/lib/hibernate-entitymanager.jar So the entity-manager is there as far as I can tell. Can someone tell me what I need to do (or look for) to fix this problem?? Much obliged, nbc NAME: Neil B. Cohen (Verisign Inc.) PHONE: 703-948-4471 DOMAIN: nco...@verisign.com * * Murphy's Philosophy: Smile - tomorrow will be worse... * * O'Tooles Commentary: Murphy was an optimist! * - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Hibernate Exception
Hi Ken - I forgot to include the version - it is Hibernate 3.2. I did include hibernate-entitymanager.jar... Turns out, when I rebuilt my machine, I downloaded Netbeans, including Tomcat 6.0.18. On my Fedora 8 system, I had downloaded Tomcat separately, direct from apache.org. After trying several things (my thanks to Martin Gainty for his suggestions...) I ended up erasing the tomcat server (which was labeled 6.0.18) and I downloaded a new 6.0.18 from apache.org. Untar'd that, re-deployed my application and it works fine... So I'm assuming Sun customized their tomcat version somehow - I've sent them a bug report with as much info as I have - which isn't all that much... So I'm up and running again... Problem dodged, if not actually solved... nbc Subject: Re: Hibernate Exception... From: Ken Bowen kbo...@als.com Date: Mon, 9 Mar 2009 13:16:57 -0400 To: Tomcat Users List users@tomcat.apache.org Clearly you're missing org.hibernate.ejb.Ejb3Configuration (and friends). I'm running hibernate 3.2 (you should tell people your versions...it helps). My eclipse tells me that org.hibernate.ejb.Ejb3Configuration lives in hibernate-entitymanager.jar. I seem to recall there being an issue about getting all the dependent files together. If you are relying on Fedora, you might find some mismatches in versions. --Ken On Mar 9, 2009, at 11:44 AM, Neil B. Cohen wrote: Exception Details: * java.lang.NoClassDefFoundError Could not initialize class org.hibernate.ejb.Ejb3Configuration - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
SSL setup question
I'm having a problem setting up SSL with Tomcat. The situation is this: I have a system running IBM's Netcool/Portal software. We added SSL to the Portal a while back. I created a certificate for the machine. However, Netcool/Portal does not create a keystore file - you simply copy the certificate as a text file into a specific directory and it works from there. Netcool/Portal has its own version of the JDK. Now, on the same machine, I have installed a current JDK (v1.6) and my own installation of Tomcat (v6.0.16). Runs just fine on port 8080. I want to add SSL capability to the Tomcat setup so I can talk to it using https. I created a keystore file using the certificate we generated for Netcool, as follows: keytool -importcert -v -trustcacerts -alias tomcat -keystore path_to_keystore/keystore.kdb -file /opt/netcool/portal/path_to_cert/server.crt Then, keytool -list -keystore ./keystore.kdb Enter keystore password: Keystore type: JKS Keystore provider: SUN Your keystore contains 1 entry tomcat, Nov 20, 2008, trustedCertEntry, Certificate fingerprint (MD5): 11:87:A8:7C:BB:55:AC:68:46:34:4F:45:7D:62:9C:AF So I have a keystore. I set up the tomcat server.xml file: Connector port=7443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false keystoreFile=/usr/path_to_keystore/keystore.kdb keystorePass=password sslProtocol=TLS / And when I start Tomcat, I get an infinite loop in the log file that looks like: Nov 20, 2008 1:40:17 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Nov 20, 2008 1:40:17 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-7443 Nov 20, 2008 1:40:17 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 886 ms Nov 20, 2008 1:40:17 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Nov 20, 2008 1:40:17 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 Nov 20, 2008 1:40:18 PM com.sun.faces.config.ConfigureListener contextInitialize d INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for co ntext '/NCAdmin' Nov 20, 2008 1:40:20 PM org.apache.catalina.core.StandardContext addApplicationL istener INFO: The listener listeners.ContextListener is already configured for this co ntext. The duplicate definition has been ignored. Nov 20, 2008 1:40:20 PM org.apache.catalina.core.StandardContext addApplicationL istener INFO: The listener listeners.SessionListener is already configured for this co ntext. The duplicate definition has been ignored. Nov 20, 2008 1:40:20 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Nov 20, 2008 1:40:20 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-7443 Nov 20, 2008 1:40:20 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run SEVERE: Socket accept failed java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No avai lable certificate or key corresponds to the SSL cipher suites which are enabled. at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESo cketFactory.java:150) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java: 310) at java.lang.Thread.run(Thread.java:619) Nov 20, 2008 1:40:20 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run SEVERE: Socket accept failed java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No avai lable certificate or key corresponds to the SSL cipher suites which are enabled. at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESo cketFactory.java:150) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java: 310) at java.lang.Thread.run(Thread.java:619) Nov 20, 2008 1:40:20 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run SEVERE: Socket accept failed java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No avai lable certificate or key corresponds to the SSL cipher suites which are enabled. at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESo cketFactory.java:150) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java: 310) at java.lang.Thread.run(Thread.java:619) Nov 20, 2008 1:40:20 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run SEVERE: Socket accept failed I'm not an SSL expert, so I'm not sure where to look. Am I missing an intermediate certificate somewhere? Or have I configured the keystore incorrectly? I'd appreciate any pointers or suggestions for getting this running. Thanks very much, nbc NAME: Neil B. Cohen (Verisign Inc.) PHONE: 703-948-4471 DOMAIN: [EMAIL PROTECTED
Tomcat startup problem
I have written a small web app (using NetBeans) which has been running fine for a couple of weeks. Yesterday afternoon, I added a new page to the program, rebuilt it, created a new .war file and installed it in my tomcat webapps directory. And tomcat won't start it. The log file (catalina.out) is listed below. It complains about a missing class - but what is com.sun.el.ExpressionFactoryImpl and why would that be missing?? Or is that actually the missing class? If not, how do I figure out what is not there? My program seems to start - it prints the 'App started successfully' from my init servlet. But when I try to connect to the app from my browser, I get the null pointer exception - but I don't know how to figure out where that is coming from either. Can someone give me a hint as to what might be wrong? Or how to figure it out? I'm fine with debugging my own code - but I can't get a handle on where to look Have I lost a library somewhere? Netbeans didn't complain when I built the war file... thanks very much, nbc cat /usr/local/Tomcat/logs/catlina.out May 14, 2008 6:49:24 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_05/jre/lib/i386/client:/usr/java/jdk1.6.0_05/jre/lib/i386:/usr/java/jdk1.6.0_05/jre/../lib/i386:/usr/lib/qt-3.3/lib:/usr/java/packages/lib/i386:/lib:/usr/lib May 14, 2008 6:49:24 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 14, 2008 6:49:24 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2393 ms May 14, 2008 6:49:24 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 14, 2008 6:49:24 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 May 14, 2008 6:49:24 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive NCAdmin.war May 14, 2008 6:49:26 AM com.sun.faces.config.ConfigureListener contextInitialized INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/NCAdmin' May 14, 2008 6:49:28 AM com.sun.faces.config.ConfigureListener installExpressionFactory SEVERE: Error Instantiating ExpressionFactory java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.sun.faces.config.ConfigureListener.installExpressionFactory(ConfigureListener.java:1521) at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1545) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:403) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:829) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
Tomcat startup problem
Regarding my 'missing class com.sun.el.ExpressionFactoryImpl' - Ok - I'm totally confused now - my Tomcat startup is working again. But this is what I did to make it work. And I'm not sure I believe it 1) Changed Tomcat link from v6.0.16 back to 6.0.14 - failed to start 2) Changed Netbeans from v6.1 back to v6.0.1 Complained about unresolved library 'librest'. I had installed that plugin in v6.1 but not in 6.0.1 Did not try to resolve for the moment. 3) Changed Netbeans back to 6.1 and deactivated librest plugin This gives me an unresolved reference in my app, even though I don't believe I'm using that lib 4) Reactivated the plugin for librest 5) Rebuilt the war file and loaded it into tomcat (6.0.14) - it started correctly 6) Changed the tomcat link to 6.0.16 - loaded war file - it started correctly. Note that before doing any of this I had shut down and rebooted my machine - so everything should have been clean this morning when it was failing... I have not changed any code this morning - just moved some links and restarted tomcat a few times... So the problem appears to be gone for the moment. Sorry to bother you all - blame it on gremlins I guess nbc - 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 startup problem
Johnny Kewl wrote: Thanks Johnny - I'll save this for the next time - as I indicated, it seems to be working again but I have no idea why... I was not running it inside of Netbeans - I was actually copying the war file to a separate tomcat installation and running it there - but your suggestion makes sense and if it happens again, I'll give it a try... thanks! nbc --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. --- - Original Message - From: Neil B. Cohen [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, May 14, 2008 1:01 PM Subject: Tomcat startup problem Neil, the JSP is bringing an el tag or something in and there is a missing lib... why its catching you is because JSP pages dont compile until needed. Get the project going in Netbeans again... Right click on all the JSP pages and compile them... the actual JSP page... if there is a problem it will now take you to the tag or whatever that is causing the problem. Then run it in NB... and check that it all works. Then (always do this), it will save you some pain... with it running in NB, click on the services tab and undeploy the web app. Then stop TC in the service tab. (if you miss this step TC may still use the NB project and not the dropped in webapp... which can cause a little confusion) Now drop webapp in and start TC as normal. Have fun... I have written a small web app (using NetBeans) which has been running fine for a couple of weeks. Yesterday afternoon, I added a new page to the program, rebuilt it, created a new .war file and installed it in my tomcat webapps directory. And tomcat won't start it. The log file (catalina.out) is listed below. It complains about a missing class - but what is com.sun.el.ExpressionFactoryImpl and why would that be missing?? Or is that actually the missing class? If not, how do I figure out what is not there? My program seems to start - it prints the 'App started successfully' from my init servlet. But when I try to connect to the app from my browser, I get the null pointer exception - but I don't know how to figure out where that is coming from either. Can someone give me a hint as to what might be wrong? Or how to figure it out? I'm fine with debugging my own code - but I can't get a handle on where to look Have I lost a library somewhere? Netbeans didn't complain when I built the war file... thanks very much, nbc cat /usr/local/Tomcat/logs/catlina.out May 14, 2008 6:49:24 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_05/jre/lib/i386/client:/usr/java/jdk1.6.0_05/jre/lib/i386:/usr/java/jdk1.6.0_05/jre/../lib/i386:/usr/lib/qt-3.3/lib:/usr/java/packages/lib/i386:/lib:/usr/lib May 14, 2008 6:49:24 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 14, 2008 6:49:24 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2393 ms May 14, 2008 6:49:24 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 14, 2008 6:49:24 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 May 14, 2008 6:49:24 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive NCAdmin.war May 14, 2008 6:49:26 AM com.sun.faces.config.ConfigureListener contextInitialized INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/NCAdmin' May 14, 2008 6:49:28 AM com.sun.faces.config.ConfigureListener installExpressionFactory SEVERE: Error Instantiating ExpressionFactory java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.sun.faces.config.ConfigureListener.installExpressionFactory(ConfigureListener.java:1521) at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1545) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:403) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350
Re: Tomcat configuration question
Hi, I changed the server.xml file and changed the various ports from 8005 - 9005, 8080-9090 etc. When I start Tomcat (using startup.sh) I get the following in the catalina.out file: May 13, 2008 7:36:59 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performanc e in production environments was not found on the java.library.path: /usr/java/j dk1.6.0_02/jre/lib/i386/server:/usr/java/jdk1.6.0_02/jre/lib/i386:/usr/java/jdk1 .6.0_02/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib May 13, 2008 7:36:59 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-9292 May 13, 2008 7:36:59 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-9090 May 13, 2008 7:36:59 AM org.apache.coyote.http11.Http11Protocol init SEVERE: Error initializing endpoint java.io.FileNotFoundException: /home/ncohen/.keystore (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) etc. etc. etc. === It looks like it is looking for a security certificate - but this doesn't happen when I start the same Tomcat software on my desktop (testing) machine. Can someone give me a hint as to what it is looking for, why it is looking for it, and what I need to do to get the system running? Later in the log file, it seems that my .war file gets unpacked and started correctly, but I can't connect to it at port 9090 - it just hangs there forever Thanks, nbc Mark Thomas wrote: Neil B. Cohen wrote: I have written a web app that I want to install on the same machine, but for various reasons (commercial, political, version-related) I need to run it on a new (and different) instance of Tomcat. I can install the latest Tomcat in a directory where it does not conflict with the existing s/w. I know I have to edit the server.xml file and change the shutdown port (8005) and the default connection port (8080). I will probably change the secure connection port (8443) as well, although I won't be using that one at the moment. My question is - is that sufficient to allow me to run both instances of Tomcat on the same machine without conflict? Are there other lines in the server.xml file that need to be changed? Are there other config files I need to look at? That should be sufficient. The only other thing to be aware of is if any relevant environment variables are set for the old install that may impact the new one. 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]
Tomcat configuration question
Hi, I am running a commercial program which has a (n older) version of tomcat embedded in it. The target machines are running AIX or Linux (RHEL4, usually). I have written a web app that I want to install on the same machine, but for various reasons (commercial, political, version-related) I need to run it on a new (and different) instance of Tomcat. I can install the latest Tomcat in a directory where it does not conflict with the existing s/w. I know I have to edit the server.xml file and change the shutdown port (8005) and the default connection port (8080). I will probably change the secure connection port (8443) as well, although I won't be using that one at the moment. My question is - is that sufficient to allow me to run both instances of Tomcat on the same machine without conflict? Are there other lines in the server.xml file that need to be changed? Are there other config files I need to look at? My application is quite simple and my testing has been done on a machine where I simply installed the latest Tomcat tar file (6.0.16) and started it running, so I don't need any fancy configuration for my application. Thanks very much, nbc - 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 configuration question
Caldarale, Charles R wrote: From: Neil B. Cohen [mailto:[EMAIL PROTECTED] Subject: Tomcat configuration question I know I have to edit the server.xml file and change the shutdown port (8005) and the default connection port (8080). I will probably change the secure connection port (8443) as well Yes, that should be sufficient, as long as the other directories of interest (logs, work, temp, Host appBase, etc.) do not overlap with the prior Tomcat instance. As long as you leave them at the defaults, they go under the Tomcat installation directory, so they shouldn't need attention. That is correct - there is no overlap on any of the other files. Thanks for the confirmation... nbc - 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] - 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 configuration question
Mark Thomas wrote: Neil B. Cohen wrote: I have written a web app that I want to install on the same machine, but for various reasons (commercial, political, version-related) I need to run it on a new (and different) instance of Tomcat. I can install the latest Tomcat in a directory where it does not conflict with the existing s/w. I know I have to edit the server.xml file and change the shutdown port (8005) and the default connection port (8080). I will probably change the secure connection port (8443) as well, although I won't be using that one at the moment. My question is - is that sufficient to allow me to run both instances of Tomcat on the same machine without conflict? Are there other lines in the server.xml file that need to be changed? Are there other config files I need to look at? That should be sufficient. The only other thing to be aware of is if any relevant environment variables are set for the old install that may impact the new one. No overlapping env variables either - the two instances will be run by different users in completely separate filesystems... thanks! nbc 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]
Security question - starting tomcat as non-root user
Hi, I'm running Tomcat 5.5.20 with an application built under Netbeans 5.5. The application works fine. I've found a number of things on the web regarding the issue of running as a non-root user, but none match my needs exactly. If someone could point me at the right documentation, or answer directly, I'd be most grateful. Situation - I am installing tomcat and running it on port 8080. However, it is currently being started by the root user and I need to change that. If I just run the startup script as user 'foo', I get errors because it can't read various config files in the conf directory, can't write to the logs directory etc. As a hack, I changed the permissions on the config files from 600 to 644, and the permissions on the logs directory to 777. I also had to change the permission on the conf/Catalina/localhost directory to 777 and the server and manager.xml files therein to 644. After I did all that, I could start tomcat, deploy my .war file and run it, and in fact it all seems to work. However, during startup I get error messages like this (from the catalina.out file): = Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/jsp-examples is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/balancer is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/_ is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/tomcat-docs is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/servlets-examples is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/webdav is unusable. = Note that the permissions on /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost are 777, but the directories it is complaining about (servlets-examples, webdav etc. don't exist... So my questions are: 1) Is there a simple way for me to configure the system so I can run the startup script as user 'foo' instead of 'root'? 2) If not, what is the hard way of doing it? :) Does changing the permissions where I did constitute a major security faux pas? I'm guessing it might, but I'm not 100% sure... 3) Do I need to worry about these error messages? My application seems to run in spite of them... Thanks in advance, nbc NAME: Neil B. Cohen (Verisign Inc.) PHONE: 703-948-4471 DOMAIN: [EMAIL PROTECTED] * * Murphy's Philosophy: Smile - tomorrow will be worse...* * * * O'Tooles Commentary: Murphy was an optimist! * * - 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: Security question - starting tomcat as non-root user
I didn't realize it could be that simple :) Thanks very much - I will give that a try... Much obliged, nbc On Wed, 2007-04-11 at 07:59 -0700, Hassan Schroeder wrote: On 4/11/07, Neil B. Cohen [EMAIL PROTECTED] wrote: Situation - I am installing tomcat and running it on port 8080. However, it is currently being started by the root user and I need to change that. If I just run the startup script as user 'foo', I get errors because it can't read various config files in the conf directory, can't write to the logs directory etc. Because having once run as root, all directories and files /created by/ Tomcat are owned by root. If you reinstalled and initially started it as user 'foo', everything would be owned by foo. So either reinstall, or change ownership of everything to 'foo'. HTH, - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with Tomcat and JSF
I am just starting to use JSF and I am having a few problems. I'll describe the problems below - if anyone can help me solve them, I'd be most grateful. However, one suggestion I got from another forum was to upgrade to JSF version 1.2. But I've been reading that that requires the latest version of servlets, as well as the most recent version of Java J2EE and Tomcat doesn't appear to support that. I'm running Netbeans 5.5rc2 with Java 1.5 and the 5.0 release of Tomcat. So my first question for this list is simply - does Tomcat support JSF 1.2, and if so, what else do I need to install? For the record, my JSF problems are the following: 1) Checkboxes. I can create a JCheckbox on the screen, but if I click the checkbox and submit the form, the resulting html code has the word 'checked' in it. This gets flagged as invalid html. I suspect the entry should be something like 'checked=checked' or 'checked=yes' or something like that - I have to look up the exact wording. The suggestion I got was to upgrade to JSF 1.2 to fix that, but as I said, Tomcat doesn't seem to support v1.2... Help!? 2) I can't seem to get commandlinks to work. I'm less concerned about this one because for now I can use command buttons and they seem to be working fine... I'll be happy to discuss my JSF problems offline if anyone has any suggestions - I know that is not directly Tomcat related Thanks in advance, nbc NAME: Neil B. Cohen (Verisign Inc.) PHONE: 703-948-4471 DOMAIN: [EMAIL PROTECTED] * * Murphy's Philosophy: Smile - tomorrow will be worse...* * * * O'Tooles Commentary: Murphy was an optimist! * * - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]