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 DDB26909E for ; Fri, 13 Apr 2012 08:21:02 +0000 (UTC) Received: (qmail 7917 invoked by uid 500); 13 Apr 2012 08:20:59 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 7862 invoked by uid 500); 13 Apr 2012 08:20:59 -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 7841 invoked by uid 99); 13 Apr 2012 08:20:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 08:20:58 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [195.245.230.34] (HELO mail1.bemta3.messagelabs.com) (195.245.230.34) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 08:20:51 +0000 Received: from [85.158.137.83:15910] by server-11.bemta-3.messagelabs.com id ED/D9-18894-EC1E78F4; Fri, 13 Apr 2012 08:20:30 +0000 X-Env-Sender: Leigh.Anderson@betfair.com X-Msg-Ref: server-8.tower-140.messagelabs.com!1334305230!24478671!1 X-Originating-IP: [213.86.197.130] X-StarScan-Version: 6.5.7; banners=betfair.com,-,- X-VirusChecked: Checked Received: (qmail 26689 invoked from network); 13 Apr 2012 08:20:30 -0000 Received: from unknown (HELO HAMCAS03.uk.betfair.local) (213.86.197.130) by server-8.tower-140.messagelabs.com with SMTP; 13 Apr 2012 08:20:30 -0000 Received: from HAMMBX03.uk.betfair.local ([fe80::7828:724c:8e7a:6d6b]) by HAMCAS03.uk.betfair.local ([::1]) with mapi id 14.01.0355.002; Fri, 13 Apr 2012 09:20:30 +0100 From: Leigh Anderson To: Tomcat Users List Subject: Re: Tomcat7-maven-plugin 2.0-beta1 and useSeparateTomcatClassloader fails with run goal Thread-Topic: Tomcat7-maven-plugin 2.0-beta1 and useSeparateTomcatClassloader fails with run goal Thread-Index: AQHNEWW+jphHNngJdEuNYm49rCONM5aKae+AgAFgDACABLkQgIAGeVaAgAAbooCAAAAkgIABWiyA///xlACAABXeAA== Date: Fri, 13 Apr 2012 08:20:30 +0000 Message-ID: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.9.0.2] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 > >> >> I'd added >>=20 >>org.springframework.instrument.classloading.tomcat.Tom= c >>at >> InstrumentableClassLoader to the plugin >>configuration, >> which was then picked up correctly and used by the WebAppLoader. > >Could you attach the patch to an issue ? MTOMCAT-140 created. > >> >> Thanks, >> Leigh >> >> Index: >>=20 >>tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat= 7 >>/r >> un/AbstractRunMojo.java >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- >>=20 >>tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat= 7 >>/r >> un/AbstractRunMojo.java (revision 1) >> +++ >>=20 >>tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat= 7 >>/r >> un/AbstractRunMojo.java (revision ) >> @@ -363,6 +357,15 @@ >> */ >> private ClassRealm tomcatRealm; >> >> + /** >> + * Class loader class to set. >> + * >> + * @parameter >> + */ >> + protected String classLoaderClass; >> + >> // >> ---------------------------------------------------------------------- >> // Mojo Implementation >> // >> ---------------------------------------------------------------------- >> @@ -460,14 +462,19 @@ >> { >> context.setParentClassLoader( getTomcatClassLoader() ); >> } >> + final WebappLoader loader =3D createWebappLoader(); >> >> - context.setLoader( createWebappLoader() ); >> + context.setLoader( loader ); >> File contextFile =3D getContextFile(); >> if ( contextFile !=3D null ) >> { >> context.setConfigFile( getContextFile().toURI().toURL() ); >> } >> + if (classLoaderClass !=3D null) { >> + loader.setLoaderClass(classLoaderClass); >> + } >> >> + >> return context; >> >> } >> >> >> >> On 12/04/2012 13:14, "Olivier Lamy" wrote: >> >>>The plugin has an option to setup context.xml to use see [1]. >>>You can try to write an other context.xml only for using with the >>>plugin ? >>> >>>-- >>>Olivier >>> >>>[1] >>>http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin= / >>>ru >>>n-mojo.html#contextFile >>> >>>2012/4/12 Leigh Anderson : >>>> Hi Olivier, >>>> >>>> That's solved the problem, thanks. Unfortunately, declaring a custom >>>>class >>>> loader in a context.xml causes Tomcat to use that one, instead of the= >>>>one >>>> set up with the correct class path by the plugin. I'll keep looking t= o >>>>see >>>> if I can find a way around this. >>>> >>>> Thanks for your prompt help with this. >>>> Leigh >>>> >>>> On 12/04/2012 11:35, "Olivier Lamy" wrote: >>>> >>>>>Hello, >>>>>Apologize for delay. >>>>>That should be fixed now (I have deployed 2.0-SNAPSHOT). >>>>>If you could try with your use case. >>>>>Thanks, >>>>>2012/4/8 Olivier Lamy : >>>>>> Hello Leigh, >>>>>> Thanks for creating issue. >>>>>> Until now I tried to reproduce the issue but I failed. >>>>>> I wonder if you could attach a build log using -e mvn flag. >>>>>> >>>>>> 2012/4/5 Leigh Anderson : >>>>>>> Hi Olivier, >>>>>>> >>>>>>> I'm not able to run this with tomcat6 as it's a Servlet 3.0 >>>>>>>project. >>>>>>>I'll >>>>>>> get the issue created -- should have some time next week to put >>>>>>>together a >>>>>>> sample project. >>>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> Leigh >>>>>>> >>>>>>> On 04/04/2012 11:36, "Olivier Lamy" wrote: >>>>>>> >>>>>>>>Hello, >>>>>>>>Looks to be an issue (does that work with tomcat6:run ?) >>>>>>>>Could you create an issue here: >>>>>>>>https://issues.apache.org/jira/browse/MTOMCAT (if possible with a >>>>>>>>small sample project to reproduce). >>>>>>>> >>>>>>>>Thanks >>>>>>>>-- >>>>>>>>Olivier Lamy >>>>>>>>Talend: http://coders.talend.com >>>>>>>>http://twitter.com/olamy | http://linkedin.com/in/olamy >>>>>>>> >>>>>>>>2012/4/3 Leigh Anderson : >>>>>>>>> Hi All, >>>>>>>>> >>>>>>>>> I'm trying to start a web application with 'mvn tomcat7:run'. It= >>>>>>>>>seems >>>>>>>>> that with the configuration below it fails with the following >>>>>>>>>error: >>>>>>>>> >>>>>>>>> >>>>>>>>> [INFO] >>>>>>>>> >>>>>>>>>-----------------------------------------------------------------= - >>>>>>>>>-- >>>>>>>>>-- >>>>>>>>>-- >>>>>>>>> [ERROR] Failed to execute goal >>>>>>>>> org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1:run >>>>>>>>>(default-cli) >>>>>>>>> on project mantis-test-web-app: No such archiver: 'jar'. -> [Hel= p >>>>>>>>>1] >>>>>>>>> [ERROR] >>>>>>>>> [ERROR] To see the full stack trace of the errors, re-run= >>>>>>>>>Maven >>>>>>>>>with the >>>>>>>>> -e switch. >>>>>>>>> [ERROR] Re-run Maven using the -X switch to enable full >>>>>>>>>debug >>>>>>>>>logging. >>>>>>>>> >>>>>>>>> I have also tried >>>>>>>>> * 'mvn tomcat:run-war', which seems to get past this >>>>>>>>>point, >>>>>>>>>but >>>>>>>>>then the >>>>>>>>> application will not start because the 'additionalClasspathDir' >>>>>>>>>property >>>>>>>>> is not supported by the 'run-war' goal. >>>>>>>>> * removing 'useSeparateTomcatClassLoader' which then >>>>>>>>>doesn't >>>>>>>>>load the >>>>>>>>> Spring instrumenting class loader required to use AspectJ LTW, >>>>>>>>>specified >>>>>>>>> in >>>>>>>>> context.xml. I have confirmed that I get the same 'no such >>>>>>>>>archiver' >>>>>>>>>error >>>>>>>>> if I remove the >>>>>>>>> context.xml, so I don't believe this to be the cause. >>>>>>>>> >>>>>>>>> Is there something I've missed in the configuration? >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> Leigh >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> org.apache.tomcat.maven >>>>>>>>> >>>>>>>>>tomcat7-maven-plugin >>>>>>>>> 2.0-beta-1 >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>true >>>>>>>>> localhost >>>>>>>>> 9090 >>>>>>>>> 8443 >>>>>>>>> >>>>>>>>> 9090 >>>>>>>>> 8443 >>>>>>>>> / >>>>>>>>> >>>>>>>>>false >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>${project.basedir}/config>>>>>>>>pa >>>>>>>>>th >>>>>>>>>Dir >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> true >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>org.springframework >>>>>>>>> >>>>>>>>> >>>>>>>>>spring-instrument-tomcat >>>>>>>>> =20 >>>>>>>>>${spring.version} >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>_________________________________________________________________= _ >>>>>>>>>__ >>>>>>>>>__ >>>>>>>>>__ >>>>>>>>> In order to protect our email recipients, Betfair Group use >>>>>>>>>SkyScan >>>>>>>>>from >>>>>>>>> MessageLabs to scan all Incoming and Outgoing mail for viruses. >>>>>>>>> >>>>>>>>> >>>>>>>>>_________________________________________________________________= _ >>>>>>>>>__ >>>>>>>>>__ >>>>>>>>>__ >>>>>>>>> >>>>>>>>> >>>>>>>>>-----------------------------------------------------------------= - >>>>>>>>>-- >>>>>>>>>- >>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>>>>> >>>>>>>> >>>>>>>>------------------------------------------------------------------= - >>>>>>>>-- >>>>>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>>>>For additional commands, e-mail: users-help@tomcat.apache.org >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>___________________________________________________________________= _ >>>>>>>__ >>>>>>>__ >>>>>>> In order to protect our email recipients, Betfair Group use SkySca= n >>>>>>>from >>>>>>> MessageLabs to scan all Incoming and Outgoing mail for viruses. >>>>>>> >>>>>>> >>>>>>>___________________________________________________________________= _ >>>>>>>__ >>>>>>>__ >>>>>>> >>>>>>>=20 >>>>>>>-------------------------------------------------------------------= - >>>>>>>- >>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Olivier Lamy >>>>>> Talend: http://coders.talend.com >>>>>> http://twitter.com/olamy | http://linkedin.com/in/olamy >>>>> >>>>> >>>>> >>>>>-- >>>>>Olivier Lamy >>>>>Talend: http://coders.talend.com >>>>>http://twitter.com/olamy | http://linkedin.com/in/olamy >>>>> >>>>>---------------------------------------------------------------------= >>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>For additional commands, e-mail: users-help@tomcat.apache.org >>>>> >>>> >>>> >>>>=20 >>>>______________________________________________________________________= _ >>>>_ >>>> In order to protect our email recipients, Betfair Group use SkyScan >>>>from >>>> MessageLabs to scan all Incoming and Outgoing mail for viruses. >>>> >>>>=20 >>>>______________________________________________________________________= _ >>>>_ >>>> >>>> ---------------------------------------------------------------------= >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>> >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>For additional commands, e-mail: users-help@tomcat.apache.org >>> >> >> >> _______________________________________________________________________= _ >> In order to protect our email recipients, Betfair Group use SkyScan fro= m >> MessageLabs to scan all Incoming and Outgoing mail for viruses. >> >> _______________________________________________________________________= _ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> > > > >--=20 >Olivier Lamy >Talend: http://coders.talend.com >http://twitter.com/olamy | http://linkedin.com/in/olamy > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >For additional commands, e-mail: users-help@tomcat.apache.org > ________________________________________________________________________ In order to protect our email recipients, Betfair Group use SkyScan from=20= MessageLabs to scan all Incoming and Outgoing mail for viruses. ________________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org