Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 54210 invoked from network); 2 Dec 2009 18:26:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Dec 2009 18:26:35 -0000 Received: (qmail 34337 invoked by uid 500); 2 Dec 2009 18:26:34 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 34273 invoked by uid 500); 2 Dec 2009 18:26:34 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 34263 invoked by uid 99); 2 Dec 2009 18:26:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2009 18:26:34 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of techhusky@gmail.com designates 74.125.92.26 as permitted sender) Received: from [74.125.92.26] (HELO qw-out-2122.google.com) (74.125.92.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2009 18:26:24 +0000 Received: by qw-out-2122.google.com with SMTP id 9so74583qwb.57 for ; Wed, 02 Dec 2009 10:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=O+s3yFGXuVHr+J3Yl8FY3iEHtwtMGjsUQWUm2lsTNNI=; b=dKLSlpbbfXC5+Uu+2Oz0ifMvCif28w4/COvQtlUflxf3j79a7pJEoaymfBGh68wwPL dbYLLw4+OwDW34uBUHdw+gIGtcFES/YBA/PMmBQ/SrQmg03CBC4SpPBR2j5lPZt9Lh29 ic7CceJ490i53z5mjkl3GlitjQBETeNp6i5CU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=sXiMi1+EAWSC0+6v1Wb0aEsRuNeVKIR5Ur8h4B43FLJ2joET23npth6bRJmXDwa4p2 P8DIOqCD5BkEMVrluADBpuM+l69wsZ5E1AvXRXgbKXLkMKr4gicWIi/d1ct/PVKW2OaV HU2iLJxlCuUhQNudlicLL2z2IcMXWNJfSXsRo= MIME-Version: 1.0 Received: by 10.229.69.85 with SMTP id y21mr61406qci.92.1259778363434; Wed, 02 Dec 2009 10:26:03 -0800 (PST) In-Reply-To: <1259668619436-4093228.post@n2.nabble.com> References: <1259583670908-4087312.post@n2.nabble.com> <1259668619436-4093228.post@n2.nabble.com> Date: Wed, 2 Dec 2009 12:26:03 -0600 Message-ID: Subject: Re: Struts 2x + OpenJPA 2.0 M3 + ( Tomcat or Glassfish ) From: Jeremy Bauer To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=00032557b4d2d9278c0479c30129 X-Virus-Checked: Checked by ClamAV on apache.org --00032557b4d2d9278c0479c30129 Content-Type: text/plain; charset=ISO-8859-1 Seth, Thanks for reporting this problem. I've opened JIRA OPENJPA-1410[1]. The code in PersistenceProviderImpl that sets up validation looks like it might be suspect to classloading issues. Which version of Tomcat are you using? -Jeremy [1] https://issues.apache.org/jira/browse/OPENJPA-1410 On Tue, Dec 1, 2009 at 5:56 AM, seth.jackson wrote: > > After further review, using Glassfish 2.1.1 I received this error message > in > the server log: > > Caused by: java.lang.LinkageError: loader constraint violation: when > resolving method > > "org.apache.openjpa.persistence.validation.ValidationUtils.setupValidation(Lorg/apache/openjpa/conf/OpenJPAConfiguration;)Z" > the class loader (instance of org/apache/catalina/loader/WebappClassLoader) > of the current class, > org/apache/openjpa/persistence/PersistenceProviderImpl, and the class > loader > (instance of sun/misc/Launcher$AppClassLoader) for resolved class, > org/apache/openjpa/persistence/validation/ValidationUtils, have different > Class objects for the type org/apache/openjpa/conf/OpenJPAConfiguration > used > in the signature > > So it appears to be the WebappClassLoader and the AppClassLoader are both > loading the OpenJPAConfiguration from the same JAR file, causing the error > when the class is trying to be resolved in this particular method.. > > > > seth.jackson wrote: > > > > It appears something was modified in OpenJPA 2.0 M3 from M2 that causes a > > LinkageError. > > > > In my current environment, I've tested both Glassfish and Tomcat using M2 > > and M3. M2 runs without problems, but M3 throws a linkage error as > > follows: > > > > Caused by: java.lang.LinkageError: loader constraint violation: loader > > (instance of sun/misc/Launcher$AppClassLoader) previously initiated > > loading for a different type with name > > "org/apache/openjpa/conf/OpenJPAConfiguration" > > at java.lang.ClassLoader.defineClass1(Native Method) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:621) > > at > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > > at java.net.URLClassLoader.access$000(URLClassLoader.java:56) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:252) > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > > at > > > org.apache.openjpa.persistence.validation.ValidationUtils.setupValidation(ValidationUtils.java:53) > > at > > > org.apache.openjpa.persistence.PersistenceProviderImpl.loadValidator(PersistenceProviderImpl.java:290) > > at > > > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:97) > > at > > > org.apache.openjpa.persistence.OpenJPAPersistence.createEntityManagerFactory(OpenJPAPersistence.java:128) > > at > > > org.apache.openjpa.persistence.OpenJPAPersistence.createEntityManagerFactory(OpenJPAPersistence.java:111) > > at test_test.user.UserAction.execute(UserAction.java:39) > > > > > > I've already confirmed that the OpenJPA classes in question do NOT exist > > in any other JARs in the path. > > > > ValidationUtils.setupValidation(ValidationUtils.java:53) calls the > > OpenJPAConfiguration.getConfigurationLog(). The object being referenced > is > > JDBCConfigurationImpl, which in other classes retrieves the log reference > > perfectly fine, before it gets to the offending line. > > > > -- > View this message in context: > http://n2.nabble.com/Struts-2x-OpenJPA-2-0-M3-Tomcat-or-Glassfish-tp4087312p4093228.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > --00032557b4d2d9278c0479c30129--