Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 53360 invoked from network); 7 Jul 2010 16:42:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jul 2010 16:42:10 -0000 Received: (qmail 55576 invoked by uid 500); 7 Jul 2010 16:42:10 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 55462 invoked by uid 500); 7 Jul 2010 16:42:09 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 55455 invoked by uid 99); 7 Jul 2010 16:42:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 16:42:09 +0000 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.136.44.58] (HELO smtp103.prem.mail.sp1.yahoo.com) (98.136.44.58) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 07 Jul 2010 16:42:02 +0000 Received: (qmail 28321 invoked from network); 7 Jul 2010 16:40:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:Mime-Version:Content-Type:Subject:Date:In-Reply-To:To:References:Message-Id:X-Mailer; b=b5kVKwZ66UBLuMIO98XpnF4PiOq9h/wVfTicIwpwYwtBA+964cpsIYkGzKm28xhfuPZGREVtAxz6Hi1Q1S187/8mtHItnJr7Q93S+5pKdmfc7pgkfFfanLUdQldhVWmOXYQrM3YCjJ/aO6yA9Zoibdwwe696DWtCrPdMgSalmwE= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1278520840; bh=3sFlNRudi6ive93Stq6gGC/gLnQ46ewRqc5CgMfJY8I=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:Mime-Version:Content-Type:Subject:Date:In-Reply-To:To:References:Message-Id:X-Mailer; b=odlJS7WHhmPgHQdCwnnydSAk3LBk226nNlKthAJUJI1RuqD59UPNYTnP+BXV+POmwWHCfTkPVMqOqFxTBAZjWbH0THH3PmpkJW1FBPWuCcU7PVUc8e+c8tsThwIOSVWvOx/8XTrKg2bfYGSfhs1X5Ph595CJAEFxKeau+00MZyc= Received: from [10.0.1.3] (david_jencks@76.76.148.215 with plain) by smtp103.prem.mail.sp1.yahoo.com with SMTP; 07 Jul 2010 09:40:39 -0700 PDT X-Yahoo-SMTP: .9oIUzyswBANsYgUm_5uPui0skTnzGJXJQ-- X-YMail-OSG: 3m.Ac0gVM1kKo9NkGAP5fz0_WxTCfDyzSClKgiEbXdYZ6um AvaEG7xpCJyQ4.Awujx19gafKV.5u50vom856AKB2RD70IH3PrdAnGxF07qD s95RjASE016BH0aLRpyhTw14T.QFjparUOyC3D3G4QDDbZCFAQwzAmOkL8vE 4EG0KjKSXOezX.aC.EnJG9fpYKQ729CikZzvXKuqJiCxNqlkpuVruOvbesb8 fjf6dyi4l7jrCgpIQW09jjlcMhcm1zJk.KNJLzabKtDHofA4frLSNPlQPh5s hZpAVv5mckLgwoJsrl2JHnO.ZdbbJGWTyxptOx6Xv3GL4IfjA1qYGBxvBr49 8LuTTtg-- X-Yahoo-Newman-Property: ymail-3 From: David Jencks Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/alternative; boundary=Apple-Mail-5--434071789 Subject: Re: Not able to configure spring-agent on Geronimo Date: Wed, 7 Jul 2010 09:40:38 -0700 In-Reply-To: <1278515931159-949339.post@n3.nabble.com> To: dev@geronimo.apache.org References: <1278515931159-949339.post@n3.nabble.com> Message-Id: <0091F86B-B28A-4ACF-988E-E1530BCC8B88@yahoo.com> X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-5--434071789 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Look at PersistenceUnitGBean to see how to do this in geronimo. You need to define a gbean that will install the transformer into the = geronimo transformer framework. You need to set the priority of the = gbean to PRIORITY_CLASSLOADING so it gets started before any application = classes that you want to enhance are loaded. thanks david jencks On Jul 7, 2010, at 8:18 AM, Jigar Shah wrote: > Hi, In my application, In our application, we are using AsjpectJ. When = I had deployed application on Tomcat, it had given me error like below. = Error: org.springframework.beans.factory.BeanCreationException: Error = creating bean with name = 'org.springframework.context.weaving.AspectJWeavingEnabler#0': = Initialization of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'loadTimeWeaver': Initialization of bean failed; nested = exception is java.lang.IllegalStateException: ClassLoader = [org.apache.catalina.loader.WebappClassLoader] does NOT provide an = 'addTransformer(ClassFileTransformer)' method. Specify a custom = LoadTimeWeaver or start your Java virtual machine with Spring's agent: = -javaagent:spring-agent.jar After that I have set JVM variable = -javaagent as below = -javaagent:"{user.home}\.m2\repository\org\springframework\spring-instrume= nt\3.0.0.RELEASE\spring-instrument-3.0.0.RELEASE.jar" After setting = above property, my problem was resolved. I am using IntellijIdea editor. = But, Now when I deploy my application on Geronimo it is throwing below = error. Error: ------ = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name = 'org.springframework.context.weaving.AspectJWeavingEnabler#0': = Initialization of bean failed; nested exception is = org.springframework.beans.factory.BeanCreationException: Error creating = bean with name 'loadTimeWeaver': Initialization of bean failed; nested = exception is java.lang.IllegalStateException: ClassLoader = [org.apache.geronimo.kernel.classloader.JarFileClassLoader] does NOT = provide an 'addTransformer(ClassFileTransformer)' method. Specify a = custom LoadTimeWeaver or start your Java virtual machine with Spring's = agent: -javaagent:spring-agent.jar Geronimo is on Linux machine. So, I = am not getting how to resolve above issue. I am sure that I have to set = -javaagent variable somewhere but I don't know where and how to = configure it. Notes: 1. Editor I am using is IntellijIdea 2. I am using = maven Please guide me regarding it. Please ask if you want more details. = Thanks=20 > View this message in context: Not able to configure spring-agent on = Geronimo > Sent from the Development mailing list archive at Nabble.com. --Apple-Mail-5--434071789 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii Look at PersistenceUnitGBean to see how to do this in geronimo.

You need to define a gbean that will install the transformer into the geronimo transformer framework.  You need to set the priority of the gbean to PRIORITY_CLASSLOADING so it gets started before any application classes that you want to enhance are loaded.

thanks
david jencks

On Jul 7, 2010, at 8:18 AM, Jigar Shah wrote:

Hi, In my application, In our application, we are using AsjpectJ. When I had deployed application on Tomcat, it had given me error like below. Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.weaving.AspectJWeavingEnabler#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.apache.catalina.loader.WebappClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar After that I have set JVM variable -javaagent as below -javaagent:"{user.home}\.m2\repository\org\springframework\spring-instrument\3.0.0.RELEASE\spring-instrument-3.0.0.RELEASE.jar" After setting above property, my problem was resolved. I am using IntellijIdea editor. But, Now when I deploy my application on Geronimo it is throwing below error. Error: ------ org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.weaving.AspectJWeavingEnabler#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.apache.geronimo.kernel.classloader.JarFileClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar Geronimo is on Linux machine. So, I am not getting how to resolve above issue. I am sure that I have to set -javaagent variable somewhere but I don't know where and how to configure it. Notes: 1. Editor I am using is IntellijIdea 2. I am using maven Please guide me regarding it. Please ask if you want more details. Thanks

View this message in context: Not able to configure spring-agent on Geronimo
Sent from the Development mailing list archive at Nabble.com.

--Apple-Mail-5--434071789--