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 4107B10133 for ; Tue, 3 Mar 2015 17:59:33 +0000 (UTC) Received: (qmail 11735 invoked by uid 500); 3 Mar 2015 17:59:12 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 11667 invoked by uid 500); 3 Mar 2015 17:59:12 -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 11656 invoked by uid 99); 3 Mar 2015 17:59:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 17:59:12 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mat972@gmail.com designates 209.85.213.52 as permitted sender) Received: from [209.85.213.52] (HELO mail-yh0-f52.google.com) (209.85.213.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 17:59:04 +0000 Received: by yhaf10 with SMTP id f10so19236908yha.8 for ; Tue, 03 Mar 2015 09:57:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=cUH1p6vjV1hDnaH5OpPQ/JyvKpSP80k7YHT+lN61abg=; b=0PR7NHdFQlccDLZK03Qyv+Mzk3Z9s8okzPZqJ+GjxOeWLMA98kEUbzIA+PvErW271H Lfjm1/INn5AH+VwXmtoWbe+fdHzhaMuATOvcaHdoW6hLQ0qJnX1dFGPzbeQoGjneUhj+ O+PTSdV7uA9NaywFEh367y8XeLPzpm8jjOwNeClaH4n7LBiFeTsE+vDSGVkvxqHq9lXH /nXSXO+yUCfRHWrshYoGurA4VF7pthNLwceqhshGNGLjDUksTE9kHPP55y38YT5zWaU5 fH9S53iVtvA5BDTztnftEuVQXTDMAc4oaII1huxy9gRRLGG9w++CT8dO41POFhnEfV1z shPQ== X-Received: by 10.236.65.136 with SMTP id f8mr35467yhd.120.1425405434437; Tue, 03 Mar 2015 09:57:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.170.191.13 with HTTP; Tue, 3 Mar 2015 09:56:54 -0800 (PST) From: MaT972 Date: Tue, 3 Mar 2015 18:56:54 +0100 Message-ID: Subject: Jersey loaded on startup even if declared in tomcat.util.scan.DefaultJarScanner.jarsToSkip on tomcat7.0.52+ To: users@tomcat.apache.org Content-Type: multipart/alternative; boundary=001a1132e26e94a4f405106610fa X-Virus-Checked: Checked by ClamAV on apache.org --001a1132e26e94a4f405106610fa Content-Type: text/plain; charset=UTF-8 Hi, One of the applications we are managing is using Jersey for its rest interface. This application initializes the rest service with tapestry, so we don't want it to be initialized at startup by tomcat, and set the following property in catalina.properties: tomcat.util.scan.DefaultJarScanner.jarsToSkip=(... jar list provided by stock tomcat ...)*jersey*.jar It does as expected in tomcat 7.0.50 but it fails starting at version 7.0.52 (I could not test with 7.0.51 as its not available anymore), and it still fails at version 7.0.59. If I add "org.apache.tomcat.util.level = FINEST" in logging.properties, I can see that the jars are skipped as expected, but jersey is eventually initialized: ------------------------- ... FINER: Not scanning JAR [file:/usr/local/apache-tomcat-7.0.59/webapps/ROOT/WEB-INF/lib/jersey-client-1.12.jar] from classpath Mar 03, 2015 6:46:15 PM org.apache.tomcat.util.scan.StandardJarScanner scan FINER: Not scanning JAR [file:/usr/local/apache-tomcat-7.0.59/webapps/ROOT/WEB-INF/lib/jersey-core-1.12.jar] from classpath .... FINE: preRegister StandardEngine[Catalina].StandardHost[localhost].StandardContext[].StandardWrapper[com.xxxx.yyyy.yyyy.zzzz.RestModule$RestApplication] Catalina:j2eeType=Servlet,name=com.xxxx.yyyy.zzzz.RestModule$RestApplication,WebModule=//localhost/,J2EEApplication=none,J2EEServer=none Mar 03, 2015 6:46:16 PM com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer addServletWithApplication INFO: Registering the Jersey servlet application, named com.xxxx.yyyy.zzzz.RestModule$RestApplication, at the servlet mapping, /rest/*, with the Application class of the same name Mar 03, 2015 6:46:16 PM org.apache.tomcat.util.modeler.Registry registerComponent ... ------------------------- Here is the list of the jersey related jars we are loading (which are located in WEB-INF/lib): jersey-multipart-1.12.jar jersey-servlet-1.12.jar tapestry-jersey-1.0.3.jar jersey-core-1.12.jar jersey-client-1.12.jar jersey-server-1.12.jar odata4j-jersey-0.7.0.jar jersey-json-1.12.jar I have tried many things, but nothing helped. Any clue of what is going on ? Any lead will be highly appreciated! Best regards, Matt P. --001a1132e26e94a4f405106610fa--