RE: Error deploying web application
Date: Tue, 25 Jun 2013 11:00:48 -0400 From: ch...@christopherschultz.net To: users@tomcat.apache.org Subject: Re: Error deploying web application -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/25/13 10:32 AM, Mark Thomas wrote: On 25/06/2013 15:01, Nickalaus A Painter wrote: Thank you very much for your quick response! Here are the previous error messages: It would have been helpful to include all the error messages the first time around. I then wouldn't have had to waste time working through the code checking that there should have been an error message and telling you what to look for. Someone is cranky, today. :p Also, for completeness, here is MyApp.xml: And there we have the problem. ?xml version=1.0 encoding=UTF-8? !DOCTYPE Context application xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd; version=2.5 WTF? Where does it suggest that this is valid for a context.xml file? Honestly, for a novice user, it is not entirely clear what the difference is between a deployment descriptor (i.e. web.xml) and a context descriptor (i.e. context.xml). I know I sometimes call context.xml a deployment descriptor when I'm not being careful. The document element should have been a clue (the XML is a complete mess: DOCTYPE is Context, but then the document element is application, schema dictates that the document element should be web-app, etc.) but it's easy to get confused. On top of that, there is no schema available for Context so maybe OP thought he'd use the next-best thing... Resource name=jdbc/dbconn auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydatabase username=root password=root maxActive=50 maxIdle=15 maxWait=-1/ I really, really hope those aren't the real values. You should never connect to a database as root, even for development. +1 A few additional thoughts: 1. maxActive=50 is quite a lot. I run a medium-traffic site and we have maxActive=20 with an alert whenever active 10. 2. maxWait=-1 is a terrible idea: you can easily tie-up all your request-processing threads waiting for database connections if something goes wrong. You won't even be able to tell users that something is wrong. Even if you make this something outrageous like 60 seconds, you should not set it to -1 for infinite wait. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRybCgAAoJEBzwKT+lPKRYPTMQAKpdCnZoKAK3cnAIRhKARSnK M+Ri/0yErfLYJ9Kp7l0sDdJjW2hnrfmf9sDjmx1QNiM0t0WrMfZb6/tNURgMYgKX Ew0PtUZtA0+eBP4dZZeMWgti2zc2KraC1B3Vu8X1Kn8z3/od749QKOGAeMXSIGPm 7RYYGe7dmX4v0/CL5c5QBcD68Lea57R0dTmCEeGJ8PICG7tmfRBIuvpDpxD4BqJk UQi5jC9O9jXRZdA16Pyoqdh1oO/dTjL8MsRvLJDZrN25UCi+iocxmVZSegJdRDLL l0JJ89vQu2rrDo6REs3S01qinpxBiCa7TtVsUcemWVAqIG9aSUZglIzdTEN6gpSo VCJu67j/vmue+BRYi4mYFepTbecpv5p5YZvdTsWuwwLcnxqm+lDts/D8mKh3Nb4E 8AkCkM5W9WFs5mrczJBAo2kEFqqoDKR91c8Mx/5J0uqWnO3AnlUmK+ALUlmEHJHS x6NSP4+NTlfmiRbrq09wwKY/+F735Sufknmyo9Ojqejl+d4yvuU2blCU/mr9biXq AlA6cdNS8wG9VNhe4/XC4yDTk2DrUW7vupk4+7dhEqsZGIZzMl0hRWsQpgXMwo3w HYHJaQYcj1CNCCnOIl+HY0qgh75lICFsoBKqBFzZTudG0G8iIYa0A4IKxMKn++0z sY1qBU8Bd25MKGEJMRrG =S/j2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Error deploying web application
While attempting to deploy my web application to our production server I encountered an issue, and after looking in the catalina.out log file, the following shows up: SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [/MyApp] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/MyApp] Context cannot be started. at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:155) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more So, to my knowledge, this seems that the issue is the Failed to process either the global, per-host, or context-specific context.xml file. So I have spent hours searching and there seem to be very few people who received this error message. I was hoping that someone could please help me because I am completely out of ideas and searching has gotten me nowhere. Additionally, after this exception, the following stack trace is printed, but I assume that it is a direct results of the previous error: Jun 25, 2013 8:30:59 AM org.apache.catalina.startup.HostConfig deployWAR SEVERE: Error deploying web application archive /usr/local/tomcat/apache-tomcat-7.0.37/webapps/MyApp.war java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [/MyApp] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) After all of these errors, the log file just displays some info about starting the server. I have tried granting permissions to both Apache Tomcat and the local Unix on the machine (by changing catalina.policy and using chmod), but this hasn't seemed to fix the problem. I have also tried to rollback to a previously working version of the application and even this will not work. For completeness, here is some relevant information about the machine and Tomcat that is running: Using CATALINA_BASE: /usr/local/tomcat/apache-tomcat-7.0.37 Using CATALINA_HOME: /usr/local/tomcat/apache-tomcat-7.0.37 Using CATALINA_TMPDIR: /usr/local/tomcat/apache-tomcat-7.0.37/temp Using JRE_HOME:/usr/java/jdk1.7.0_17/jre Using CLASSPATH: /usr/local/tomcat/apache-tomcat-7.0.37/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-7.0.37/bin/tomcat-juli.jar Server version: Apache Tomcat/7.0.37 Server built: Feb 12 2013 10:44:14 Server number: 7.0.37.0 OS Name:Linux OS Version: 2.6.32-279.el6.x86_64 Architecture: amd64 JVM Version:1.7.0_17-b02 JVM Vendor: Oracle Corporation War files are set to automatically deploy, we copyXML is not set to true. Does anyone have any idea how to fix this issue or how to help me? Thank you very much for your time! Regards, Nick Nickalaus A. Painter IBM Smarter Water Co-op Developer Clarkson University 2014 B.S. Mathematics and Computer Science +18454353546
Re: Error deploying web application
On 25/06/2013 14:43, Nickalaus A Painter wrote: While attempting to deploy my web application to our production server I encountered an issue, and after looking in the catalina.out log file, the following shows up: snip/ Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/MyApp] Context cannot be started. at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:155) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more Before this message, a message will have been logged along the lines of: SEVERE: ... Error deploying configuration descriptor file name here You need to find that log message. It will tell you which context.xml file could not be processed and why. My guess would be malformed XML. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error deploying web application
of these Resource name blocks may be uncommented at a single time. Altering the commented value will force the system to use that back-end JDBC driver, and thus impacts which database instance you will connect to. -- Context path=/MyApp docBase=MyApp debug=5 reloadable=true crossContext=true Resource name=jdbc/dbconn auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydatabase username=root password=root maxActive=50 maxIdle=15 maxWait=-1/ /Context /application Do you need anything else? Thank you very much for your time! Regards, Nick Nickalaus A. Painter IBM Smarter Water Co-op Developer Clarkson University 2014 B.S. Mathematics and Computer Science +18454353546 From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 06/25/2013 09:52 AM Subject:Re: Error deploying web application On 25/06/2013 14:43, Nickalaus A Painter wrote: While attempting to deploy my web application to our production server I encountered an issue, and after looking in the catalina.out log file, the following shows up: snip/ Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/MyApp] Context cannot be started. at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:155) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more Before this message, a message will have been logged along the lines of: SEVERE: ... Error deploying configuration descriptor file name here You need to find that log message. It will tell you which context.xml file could not be processed and why. My guess would be malformed XML. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error deploying web application
On Tue, 2013-06-25 at 10:01 -0400, Nickalaus A Painter wrote: Jun 25, 2013 9:49:53 AM org.apache.catalina.startup.HostConfig deployDescriptor SEVERE: Error deploying configuration descriptor /usr/local/tomcat/apache-tomcat-7.0.37/conf/Catalina/localhost/MyApp.xml java.lang.NullPointerException at snip/ So does this mean that I have to reconfigure MyApp.xml in that directory? Shouldn't Tomcat look in the directory of MyApp once it explodes the .war file? Also, for completeness, here is MyApp.xml: Relative to the root of your .war file, Tomcat will look for META-INF/context.xml. It copies this to .../Catalina/localhost/MyApp.xml. You shouldn't have a MyApp.xml anywhere in your .war file. HTH -Tim. ?xml version=1.0 encoding=UTF-8? !DOCTYPE Context application xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd; version=2.5 !-- Only one of these Resource name blocks may be uncommented at a single time. Altering the commented value will force the system to use that back-end JDBC driver, and thus impacts which database instance you will connect to. -- Context path=/MyApp docBase=MyApp debug=5 reloadable=true crossContext=true Resource name=jdbc/dbconn auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydatabase username=root password=root maxActive=50 maxIdle=15 maxWait=-1/ /Context /application Do you need anything else? Thank you very much for your time! Regards, Nick Nickalaus A. Painter IBM Smarter Water Co-op Developer Clarkson University 2014 B.S. Mathematics and Computer Science +18454353546 From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 06/25/2013 09:52 AM Subject:Re: Error deploying web application On 25/06/2013 14:43, Nickalaus A Painter wrote: While attempting to deploy my web application to our production server I encountered an issue, and after looking in the catalina.out log file, the following shows up: snip/ Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/MyApp] Context cannot be started. at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:155) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more Before this message, a message will have been logged along the lines of: SEVERE: ... Error deploying configuration descriptor file name here You need to find that log message. It will tell you which context.xml file could not be processed and why. My guess would be malformed XML. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: This is a digitally signed message part
Re: Error deploying web application
You're right, we have META-INF/context.xml, not META-INF/MyApp.xml; sorry, I was just typing about MyApp.xml and didn't think about it :) Nickalaus A. Painter IBM Smarter Water Co-op Developer Clarkson University 2014 B.S. Mathematics and Computer Science +18454353546 From: Tim Watts t...@cliftonfarm.org To: users@tomcat.apache.org, Date: 06/25/2013 10:25 AM Subject:Re: Error deploying web application On Tue, 2013-06-25 at 10:01 -0400, Nickalaus A Painter wrote: Jun 25, 2013 9:49:53 AM org.apache.catalina.startup.HostConfig deployDescriptor SEVERE: Error deploying configuration descriptor /usr/local/tomcat/apache-tomcat-7.0.37/conf/Catalina/localhost/MyApp.xml java.lang.NullPointerException at snip/ So does this mean that I have to reconfigure MyApp.xml in that directory? Shouldn't Tomcat look in the directory of MyApp once it explodes the .war file? Also, for completeness, here is MyApp.xml: Relative to the root of your .war file, Tomcat will look for META-INF/context.xml. It copies this to .../Catalina/localhost/MyApp.xml. You shouldn't have a MyApp.xml anywhere in your .war file. HTH -Tim. ?xml version=1.0 encoding=UTF-8? !DOCTYPE Context application xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd; version=2.5 !-- Only one of these Resource name blocks may be uncommented at a single time. Altering the commented value will force the system to use that back-end JDBC driver, and thus impacts which database instance you will connect to. -- Context path=/MyApp docBase=MyApp debug=5 reloadable=true crossContext=true Resource name=jdbc/dbconn auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydatabase username=root password=root maxActive=50 maxIdle=15 maxWait=-1/ /Context /application Do you need anything else? Thank you very much for your time! Regards, Nick Nickalaus A. Painter IBM Smarter Water Co-op Developer Clarkson University 2014 B.S. Mathematics and Computer Science +18454353546 From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 06/25/2013 09:52 AM Subject:Re: Error deploying web application On 25/06/2013 14:43, Nickalaus A Painter wrote: While attempting to deploy my web application to our production server I encountered an issue, and after looking in the catalina.out log file, the following shows up: snip/ Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/MyApp] Context cannot be started. at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:155) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more Before this message, a message will have been logged along the lines of: SEVERE: ... Error deploying configuration descriptor file name here You need to find that log message. It will tell you which context.xml file could not be processed and why. My guess would be malformed XML. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org [attachment signature.asc deleted by Nickalaus A Painter/Poughkeepsie/IBM]
Re: Error deploying web application
On 25/06/2013 15:01, Nickalaus A Painter wrote: Thank you very much for your quick response! Here are the previous error messages: It would have been helpful to include all the error messages the first time around. I then wouldn't have had to waste time working through the code checking that there should have been an error message and telling you what to look for. Unless you are absolutely sure the errors are for an unrelated problem then don't exclude what could be useful information. INFO: Deploying configuration descriptor /usr/local/tomcat/apache-tomcat-7.0.37/conf/Catalina/localhost/MyApp.xml Jun 25, 2013 9:49:53 AM org.apache.catalina.startup.HostConfig deployDescriptor SEVERE: Error deploying configuration descriptor /usr/local/tomcat/apache-tomcat-7.0.37/conf/Catalina/localhost/MyApp.xml So there is a pretty big hint that there is something wrong with MyApp.xml java.lang.NullPointerException at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:625) Hmm. Odd. That means the digester parsed the file without error but failed to create a Context instance. INFO: Deploying configuration descriptor /usr/local/tomcat/apache-tomcat-7.0.37/conf/Catalina/localhost/host-manager.xml Another app starts without issue. Jun 25, 2013 9:49:53 AM org.apache.catalina.startup.HostConfig deployDescriptors SEVERE: Error waiting for multi-thread deployment of context descriptors to complete More fall-out from the original error. INFO: Deploying configuration descriptor /usr/local/tomcat/apache-tomcat-7.0.37/conf/Catalina/localhost/manager.xml Another app starting normally. Jun 25, 2013 9:49:53 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/tomcat/apache-tomcat-7.0.37/webapps/MyApp.war Jun 25, 2013 9:49:53 AM org.apache.tomcat.util.digester.Digester endElement WARNING: No rules found matching 'application/Context/Resource'. Jun 25, 2013 9:49:53 AM org.apache.tomcat.util.digester.Digester endElement WARNING: No rules found matching 'application/Context'. Jun 25, 2013 9:49:53 AM org.apache.tomcat.util.digester.Digester endElement WARNING: No rules found matching 'application'. Jun 25, 2013 9:49:53 AM org.apache.catalina.core.ContainerBase addChildInternal OK. That isn't good. That indicates the context.xml file is very wrong along with some hints as to what the problem is. So does this mean that I have to reconfigure MyApp.xml in that directory? No. Shouldn't Tomcat look in the directory of MyApp once it explodes the .war file? Also no. Also, for completeness, here is MyApp.xml: And there we have the problem. ?xml version=1.0 encoding=UTF-8? !DOCTYPE Context application xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd; version=2.5 WTF? Where does it suggest that this is valid for a context.xml file? This is a context.xml file, not a web.xml file. This application element (and the matching closing element) needs to be deleted. !-- Only one of these Resource name blocks may be uncommented at a single time. Altering the commented value will force the system to use that back-end JDBC driver, and thus impacts which database instance you will connect to. -- Context path=/MyApp docBase=MyApp debug=5 reloadable=true crossContext=true Have you even read the documentation for Context elements? path - not permitted in this use case docBase - not permitted in this use case debug - remove several versions ago and deprecated even longer ago The remaining elements are valid but I have to wonder if they are necessary / correct in your environment. Resource name=jdbc/dbconn auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydatabase username=root password=root maxActive=50 maxIdle=15 maxWait=-1/ I really, really hope those aren't the real values. You should never connect to a database as root, even for development. /Context /application Do you need anything else? Nope. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error deploying web application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/25/13 10:32 AM, Mark Thomas wrote: On 25/06/2013 15:01, Nickalaus A Painter wrote: Thank you very much for your quick response! Here are the previous error messages: It would have been helpful to include all the error messages the first time around. I then wouldn't have had to waste time working through the code checking that there should have been an error message and telling you what to look for. Someone is cranky, today. :p Also, for completeness, here is MyApp.xml: And there we have the problem. ?xml version=1.0 encoding=UTF-8? !DOCTYPE Context application xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd; version=2.5 WTF? Where does it suggest that this is valid for a context.xml file? Honestly, for a novice user, it is not entirely clear what the difference is between a deployment descriptor (i.e. web.xml) and a context descriptor (i.e. context.xml). I know I sometimes call context.xml a deployment descriptor when I'm not being careful. The document element should have been a clue (the XML is a complete mess: DOCTYPE is Context, but then the document element is application, schema dictates that the document element should be web-app, etc.) but it's easy to get confused. On top of that, there is no schema available for Context so maybe OP thought he'd use the next-best thing... Resource name=jdbc/dbconn auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydatabase username=root password=root maxActive=50 maxIdle=15 maxWait=-1/ I really, really hope those aren't the real values. You should never connect to a database as root, even for development. +1 A few additional thoughts: 1. maxActive=50 is quite a lot. I run a medium-traffic site and we have maxActive=20 with an alert whenever active 10. 2. maxWait=-1 is a terrible idea: you can easily tie-up all your request-processing threads waiting for database connections if something goes wrong. You won't even be able to tell users that something is wrong. Even if you make this something outrageous like 60 seconds, you should not set it to -1 for infinite wait. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRybCgAAoJEBzwKT+lPKRYPTMQAKpdCnZoKAK3cnAIRhKARSnK M+Ri/0yErfLYJ9Kp7l0sDdJjW2hnrfmf9sDjmx1QNiM0t0WrMfZb6/tNURgMYgKX Ew0PtUZtA0+eBP4dZZeMWgti2zc2KraC1B3Vu8X1Kn8z3/od749QKOGAeMXSIGPm 7RYYGe7dmX4v0/CL5c5QBcD68Lea57R0dTmCEeGJ8PICG7tmfRBIuvpDpxD4BqJk UQi5jC9O9jXRZdA16Pyoqdh1oO/dTjL8MsRvLJDZrN25UCi+iocxmVZSegJdRDLL l0JJ89vQu2rrDo6REs3S01qinpxBiCa7TtVsUcemWVAqIG9aSUZglIzdTEN6gpSo VCJu67j/vmue+BRYi4mYFepTbecpv5p5YZvdTsWuwwLcnxqm+lDts/D8mKh3Nb4E 8AkCkM5W9WFs5mrczJBAo2kEFqqoDKR91c8Mx/5J0uqWnO3AnlUmK+ALUlmEHJHS x6NSP4+NTlfmiRbrq09wwKY/+F735Sufknmyo9Ojqejl+d4yvuU2blCU/mr9biXq AlA6cdNS8wG9VNhe4/XC4yDTk2DrUW7vupk4+7dhEqsZGIZzMl0hRWsQpgXMwo3w HYHJaQYcj1CNCCnOIl+HY0qgh75lICFsoBKqBFzZTudG0G8iIYa0A4IKxMKn++0z sY1qBU8Bd25MKGEJMRrG =S/j2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error deploying web application
Thank you everyone for your responses! Those fixes worked :) I am sorry for being so uninformed on all of this, I simply inherited a lot of the code that I am working with, so I assumed that certain things were formatted properly (supposedly they used to work). That being said, your advice was very helpful and I am very appreciative of your quick response. Regards, Nick Nickalaus A. Painter IBM Smarter Water Co-op Developer Clarkson University 2014 B.S. Mathematics and Computer Science +18454353546 From: Christopher Schultz ch...@christopherschultz.net To: Tomcat Users List users@tomcat.apache.org, Date: 06/25/2013 11:02 AM Subject:Re: Error deploying web application -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/25/13 10:32 AM, Mark Thomas wrote: On 25/06/2013 15:01, Nickalaus A Painter wrote: Thank you very much for your quick response! Here are the previous error messages: It would have been helpful to include all the error messages the first time around. I then wouldn't have had to waste time working through the code checking that there should have been an error message and telling you what to look for. Someone is cranky, today. :p Also, for completeness, here is MyApp.xml: And there we have the problem. ?xml version=1.0 encoding=UTF-8? !DOCTYPE Context application xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd; version=2.5 WTF? Where does it suggest that this is valid for a context.xml file? Honestly, for a novice user, it is not entirely clear what the difference is between a deployment descriptor (i.e. web.xml) and a context descriptor (i.e. context.xml). I know I sometimes call context.xml a deployment descriptor when I'm not being careful. The document element should have been a clue (the XML is a complete mess: DOCTYPE is Context, but then the document element is application, schema dictates that the document element should be web-app, etc.) but it's easy to get confused. On top of that, there is no schema available for Context so maybe OP thought he'd use the next-best thing... Resource name=jdbc/dbconn auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydatabase username=root password=root maxActive=50 maxIdle=15 maxWait=-1/ I really, really hope those aren't the real values. You should never connect to a database as root, even for development. +1 A few additional thoughts: 1. maxActive=50 is quite a lot. I run a medium-traffic site and we have maxActive=20 with an alert whenever active 10. 2. maxWait=-1 is a terrible idea: you can easily tie-up all your request-processing threads waiting for database connections if something goes wrong. You won't even be able to tell users that something is wrong. Even if you make this something outrageous like 60 seconds, you should not set it to -1 for infinite wait. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRybCgAAoJEBzwKT+lPKRYPTMQAKpdCnZoKAK3cnAIRhKARSnK M+Ri/0yErfLYJ9Kp7l0sDdJjW2hnrfmf9sDjmx1QNiM0t0WrMfZb6/tNURgMYgKX Ew0PtUZtA0+eBP4dZZeMWgti2zc2KraC1B3Vu8X1Kn8z3/od749QKOGAeMXSIGPm 7RYYGe7dmX4v0/CL5c5QBcD68Lea57R0dTmCEeGJ8PICG7tmfRBIuvpDpxD4BqJk UQi5jC9O9jXRZdA16Pyoqdh1oO/dTjL8MsRvLJDZrN25UCi+iocxmVZSegJdRDLL l0JJ89vQu2rrDo6REs3S01qinpxBiCa7TtVsUcemWVAqIG9aSUZglIzdTEN6gpSo VCJu67j/vmue+BRYi4mYFepTbecpv5p5YZvdTsWuwwLcnxqm+lDts/D8mKh3Nb4E 8AkCkM5W9WFs5mrczJBAo2kEFqqoDKR91c8Mx/5J0uqWnO3AnlUmK+ALUlmEHJHS x6NSP4+NTlfmiRbrq09wwKY/+F735Sufknmyo9Ojqejl+d4yvuU2blCU/mr9biXq AlA6cdNS8wG9VNhe4/XC4yDTk2DrUW7vupk4+7dhEqsZGIZzMl0hRWsQpgXMwo3w HYHJaQYcj1CNCCnOIl+HY0qgh75lICFsoBKqBFzZTudG0G8iIYa0A4IKxMKn++0z sY1qBU8Bd25MKGEJMRrG =S/j2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org