Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 73956 invoked from network); 22 Feb 2007 12:29:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2007 12:29:29 -0000 Received: (qmail 26853 invoked by uid 500); 22 Feb 2007 12:29:35 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 26689 invoked by uid 500); 22 Feb 2007 12:29:35 -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 26678 invoked by uid 99); 22 Feb 2007 12:29:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2007 04:29:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2007 04:29:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 80C717141A3 for ; Thu, 22 Feb 2007 04:29:05 -0800 (PST) Message-ID: <750693.1172147345509.JavaMail.jira@brutus> Date: Thu, 22 Feb 2007 04:29:05 -0800 (PST) From: "Vitaly Pimenov (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Created: (GERONIMO-2866) LinkageError on startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org LinkageError on startup ----------------------- Key: GERONIMO-2866 URL: https://issues.apache.org/jira/browse/GERONIMO-2866 Project: Geronimo Issue Type: Bug Security Level: public (Regular issues) Affects Versions: 2.0-M1 Environment: Win XP 1.5.0_10 Linux 1.5.0_10 Mac OS X 1.5.0_06 Reporter: Vitaly Pimenov Hello, I'm a YourKit Java Profiler developer. Our customer have reported that Geronimo 2.0 doesn't start with our profiler agent. There is a LinkageError on server startup: java.lang.LinkageError: loader (instance of org/apache/geronimo/kernel/classloader/JarFileClassLoader): attempted duplicate class definition for name: "$javax/naming/Context$$EnhancerByCGLIB$$79faf44d$$FastClassByCGLIB$$e18c505c" at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) ... 34 more Looking into this, I have found that the problem is caused by dynamic byte-code instrumentation: we add a special 'static transient boolean' field in some classes and "$javax/naming/Context$$EnhancerByCGLIB$$79faf44d$$FastClassByCGLIB$$e18c505c" is one of them. It looks like CGLIB somehow watches the classfile changes and tries to reload class, modified by our instrumentation. The problem arises because the names are identical. Maybe it can be solved by customizing NamingPolicy used in CGLIB. You can reproduce the problem with YourKit Java Profiler 6.0.11 http://yourkit.com/download/index.jsp To run server with profiler you can just add 2 following lines at the beginning or geronimo startup.bat set PATH=/bin/win32;%PATH% set JAVA_TOOL_OPTIONS=-agentlib:yjpagent %JAVA_TOOL_OPTIONS% -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.