Return-Path: X-Original-To: apmail-geronimo-user-archive@www.apache.org Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AB8A9B6F for ; Mon, 19 Mar 2012 14:25:55 +0000 (UTC) Received: (qmail 75642 invoked by uid 500); 19 Mar 2012 14:25:55 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 75609 invoked by uid 500); 19 Mar 2012 14:25:55 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 75602 invoked by uid 99); 19 Mar 2012 14:25:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2012 14:25:55 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xhhsld@gmail.com designates 209.85.212.172 as permitted sender) Received: from [209.85.212.172] (HELO mail-wi0-f172.google.com) (209.85.212.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2012 14:25:50 +0000 Received: by wibhj6 with SMTP id hj6so3025116wib.13 for ; Mon, 19 Mar 2012 07:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=c67ySsdr0M7vPyiQv2H35wvAMTIo830ZKr4p3rueWIg=; b=cTbI8Z3D0QUUjcijjn7r25CiZ9GA13EScRl2zpJL03270Topk6xqCpnsQ//WTmpxfZ VYLhQzzIMwhVkCb3CrjCSFGrv4r7e9M2NOtIs/psyiTr8UrctazbvbXrQ8ZakKLIU8j5 Adllne/Vkhyq6Lgwkqnd5d5xSRefcC7qTdhAHbLEPEo+/ZWTnBW/or92MG69whUyFU6J +QwQta8tgSEY1aRPBNBsNW3t4yBNGz9thLbmNCl0iwXuqDOsMasEdBPRTSsjfGxtv6JU D4k55XIfEdMSdrNoO2jKL9N9efS1BuIvulOfi3iSmuNwYBFN4XJecWKC8H1gApKRDFP1 XWKw== MIME-Version: 1.0 Received: by 10.216.133.151 with SMTP id q23mr7396803wei.14.1332167128977; Mon, 19 Mar 2012 07:25:28 -0700 (PDT) Received: by 10.216.12.208 with HTTP; Mon, 19 Mar 2012 07:25:28 -0700 (PDT) In-Reply-To: <4F66D824.8030502@filez.com> References: <4F1DBC89.3010504@sendmail.cz> <4F1DE120.2020806@sendmail.cz> <4F29943B.4050207@sendmail.cz> <4F2A8DA0.2080105@sendmail.cz> <4F66D824.8030502@filez.com> Date: Mon, 19 Mar 2012 22:25:28 +0800 Message-ID: Subject: Re: classloading From: Ivan To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=0016e6de063681128504bb995435 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6de063681128504bb995435 Content-Type: text/plain; charset=ISO-8859-1 2012/3/19 Radim Kolar > Is possible to make stack traces like they are on Jboss 7.1? These traces > includes jar from which was class loaded, this is highly useful when > hunting classloading problems. > > STACKTRACE > at org.jboss.jca.core.**connectionmanager.ccm.** > CachedConnectionManagerImpl.**registerConnection(** > CachedConnectionManagerImpl.**java:265) > at org.jboss.jca.core.**connectionmanager.** > AbstractConnectionManager.**allocateConnection(** > AbstractConnectionManager.**java:495) > at org.jboss.jca.adapters.jdbc.**WrapperDataSource.**getConnection( > **WrapperDataSource.java:129) > at org.apache.jsp.index_jsp._**jspService(index_jsp.java:256) > at org.apache.jasper.runtime.**HttpJspBase.service(**HttpJspBase.java:70) > [jbossweb-7.0.13.Final.jar:] > at javax.servlet.http.**HttpServlet.service(**HttpServlet.java:847) > [jboss-servlet-api_3.0_spec-1.**0.0.Final.jar:1.0.0.Final] > at org.apache.jasper.servlet.**JspServletWrapper.service(**JspServletWrapper.java:369) > [jbossweb-7.0.13.Final.jar:] > Seems an interesting function, I am thinking that there maybe two ways to do this in Geronimo a. With the StackTraceElement, it is possible to get the class name, then with the class name, it should be able to find the bundle name with package admin service, but need to consider more for the current classloading configuration. b. Use the internal class,e.g. sun.reflect.Reflection.getCallerClass, seems that it is able to get the Class instance, then it is easy to find the classloader, then the bundle name. > > Also if you look at http://www.slideshare.net/** > rayploski/jboss-application-**server-7slide 6: > > * Modular > * Only API, no AS implementation exposure > * True isolation > > this is what should be done in AS because its time consuming to hunt app > jars vs application server jars classloading issues. At geronimo i was not > able to run some application at all. > Yes, you are right, current classloading model in Geronimo 3.0-beta is still following the multiparent strategy in the past Geronimo versions, and it does bring issues about class loading conflict. Although hidden-classes could somewhat solve the issue, it is not easy to find the correct configuration for the users. The possible solution has been discussed for many times in the past, need to have a minimal public class set. Actually, in those plugin builder, there has a default environment for this purpose, hope that Geronimo could do that in the future versions. -- Ivan --0016e6de063681128504bb995435 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2012/3/19 Radim Kolar = <hsn@filez.com>
Is possible to make stack traces like they are on Jboss 7.1? These traces i= ncludes jar from which was class loaded, this is highly useful when hunting= classloading problems.

=A0STACKTRACE
=A0 =A0 =A0 =A0at org.jboss.jca.core.connectionmanager.ccm.C= achedConnectionManagerImpl.registerConnection(CachedConnectio= nManagerImpl.java:265)
=A0 =A0 =A0 =A0at org.jboss.jca.core.connectionmanager.Abstr= actConnectionManager.allocateConnection(AbstractConnectionMan= ager.java:495)
=A0 =A0 =A0 =A0at org.jboss.jca.adapters.jdbc.WrapperDataSource.= getConnection(WrapperDataSource.java:129)
=A0 =A0 =A0 =A0at org.apache.jsp.index_jsp._jspService(index_jsp.ja= va:256)
=A0 =A0 =A0 =A0at org.apache.jasper.runtime.HttpJspBase.service(= HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:]
=A0 =A0 =A0 =A0at javax.servlet.http.HttpServlet.service(Htt= pServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0= .Final]
=A0 =A0 =A0 =A0at org.apache.jasper.servlet.JspServletWrapper.servi= ce(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:]

=A0Seems an interesting function, I am thinking= that there maybe two ways to do this in Geronimo
a. With the StackTraceElement, it is possible to get the class name, t= hen with the class name, it should be able to find the bundle name with pac= kage admin service, but need to consider more for the current classloading = configuration.
b. Use the internal class,e.g.=A0sun.reflect.Reflection.getCallerClass= , seems that it is able to get the Class instance, then it is easy to find = the classloader, then the bundle name.
=A0

Also if you look at http://www.slideshare.net/rayp= loski/jboss-application-server-7 slide 6:

* Modular
=A0* Only API, no AS implementation exposure
=A0* True isolation

this is what should be done in AS because its time consuming to hunt app ja= rs vs application server jars classloading issues. At geronimo i was not ab= le to run some application at all.

Yes, you are right, current classloading model in Geronimo 3.0-beta is stil= l following the multiparent strategy in the past Geronimo versions, and it = does bring issues about class loading conflict. Although hidden-classes cou= ld somewhat solve the issue, it is not easy to find the correct configurati= on for the users. The possible solution has been discussed for many times i= n the past, need to have a minimal public class set. Actually, in those plu= gin builder, there has a default environment for this purpose, hope that Ge= ronimo could do that in the future versions.



--
Ivan
--0016e6de063681128504bb995435--