Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26F58D509 for ; Tue, 25 Jun 2013 14:32:33 +0000 (UTC) Received: (qmail 92573 invoked by uid 500); 25 Jun 2013 14:32:28 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 92485 invoked by uid 500); 25 Jun 2013 14:32:28 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 92474 invoked by uid 99); 25 Jun 2013 14:32:27 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jun 2013 14:32:27 +0000 Received: from localhost (HELO [192.168.23.9]) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jun 2013 14:32:26 +0000 Message-ID: <51C9A9F5.2040005@apache.org> Date: Tue, 25 Jun 2013 15:32:21 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Error deploying web application References: <51C9A085.9040102@apache.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. > > > > 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. > > > 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. > 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. > > > > Do you need anything else? Nope. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org