Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 16804 invoked from network); 9 Nov 2007 15:52:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Nov 2007 15:52:08 -0000 Received: (qmail 11030 invoked by uid 500); 9 Nov 2007 15:51:54 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 10979 invoked by uid 500); 9 Nov 2007 15:51:53 -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 10968 invoked by uid 99); 9 Nov 2007 15:51:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2007 07:51:53 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eljotpl@gmail.com designates 209.85.146.179 as permitted sender) Received: from [209.85.146.179] (HELO wa-out-1112.google.com) (209.85.146.179) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2007 15:51:54 +0000 Received: by wa-out-1112.google.com with SMTP id j4so720138wah for ; Fri, 09 Nov 2007 07:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=WEMV4IlJpX1JtO+sZ1aLsYh+zK7aMDVVKiaZZl0Qqto=; b=b0W1X2CCs+ZnJIQbDZK/tfxY7E5gyCEjjSedwQttvR7fY8+hC+RUft84xN8sqLBnMpZYE9+mWGc7me70DP9iMOmr2TCpupGAszxmMzjHPpQT607HhkpjHhlrjQw6V9FmtvAR8trLYy+svuFjzBARXXZJG8XR6dS+XJN02DU+ZGM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=a2JIrYAXAWffta+9rgEqyMUYt7+Z/Pi9fquyZ+To08KrEKqBjL5OWnrdm6A+unszra1k7Qc39Ng+J/UPO4XcCzRJ4XA6qcN9AYS2sDr31CBuaMs/Dkb0csKQrXTca7Zj9YwxE2tOGeFFAuTIlDzNKU3NWBcfuRWhakzrUf2dmyI= Received: by 10.114.15.1 with SMTP id 1mr1280237wao.1194623493473; Fri, 09 Nov 2007 07:51:33 -0800 (PST) Received: by 10.114.199.8 with HTTP; Fri, 9 Nov 2007 07:51:33 -0800 (PST) Message-ID: <1b5bfeb50711090751g41891634xbde9ab078dcb5d18@mail.gmail.com> Date: Fri, 9 Nov 2007 16:51:33 +0100 From: "Jacek Laskowski" Reply-To: jacek@laskowski.net.pl Sender: eljotpl@gmail.com To: dev@geronimo.apache.org Subject: Deploying jboss seam 2.0.0.GA's jee5 sample onto geronimo 2.1-SNAPSHOT...almost done MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 1af5ac2cb03a2939 X-Virus-Checked: Checked by ClamAV on apache.org Hi, I spent the entire day to figure out what's going on and I'm stuck now and desparately need help. I was debugging Geronimo to see what's in classloaders, but didn't find much that would help me sorting it out. I'm trying to deploy jboss seam 2.0.0.ga's jee5 sample - booking - onto geronimo 2.1-snapshot (built from tomorrow's trunk) and it only succeeds if persistence.xml's damaged and openjpa enhancer doesn't load any classes, and if it succeeded would result in 11:31:22,546 WARN [BasicLifecycleMonitor] Exception occured while notifying listener java.lang.LinkageError: duplicate class definition: org/jboss/seam/bpm/package-info at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.geronimo.kernel.classloader.JarFileClassLoader.access$200(JarFileClassLoader.java:52) at org.apache.geronimo.kernel.classloader.JarFileClassLoader$6.run(JarFileClassLoader.java:308) at java.security.AccessController.doPrivileged(Native Method) at org.apache.geronimo.kernel.classloader.JarFileClassLoader.findClass(JarFileClassLoader.java:260) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClassInternal(MultiParentClassLoader.java:470) at org.apache.geronimo.kernel.config.MultiParentClassLoader.checkParents(MultiParentClassLoader.java:498) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:407) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.jboss.seam.deployment.NamespaceScanner.getPackage(NamespaceScanner.java:75) at org.jboss.seam.deployment.NamespaceScanner.handleItem(NamespaceScanner.java:56) So, here's what I could figure out. The application consists of 2 modules: an ejb jar (with jpa entities) and a war. This is the plan I'm using to deploy the app. org.jboss.seam.examples.jee5 jboss-seam-jee5 2.0.0.GA ear org.apache.geronimo.hibernate.transaction geronimo-hibernate-transaction-manager-lookup jar org.jboss.seam jboss-seam-jee5.war org.jboss.seam.examples.jee5 jboss-seam-jee5 2.0.0.GA war /seam-jee5 jboss-seam-jee5.jar org.jboss.seam.examples.jee5 jboss-seam-jee5 2.0.0.GA jar seam-jee5-dbpool org.tranql tranql-connector-derby-embed-xa rar org.jboss.seam.examples.jee5 booking-dbpool 2.0.0.GA rar org.apache.geronimo.configs system-database car javax.sql.DataSource jdbc/__default SystemDatabase 100 5000 No matter what's set as a provider, openjpa is executed to enhance entities (as the default and only working jpa provider in JTA mode). The mentioned error message is when openjpa enhances classes on the fly (at runtime) and it appears that loads some classes that are being looked up afterwards from webapp classloader and results in the error. I added elements to persistence.xml just to avoid it, but it seems that openejb (yeah, it seems that it's openejb with openjpa embedded) loads ear and loads classes (persistence.xml is in the ejb-jar) at runtime. This is the damaged persistence.xml that when used lets me to see the welcome page of the app, but since PU doesn't exist it blows up at registration page (the error is with ). jdbc/__default org.jboss.seam.example.booking.Booking org.jboss.seam.example.booking.Hotel org.jboss.seam.example.booking.User So, even though PU's not created the webapp's deployed (almost) fine - I can open /seam-jee5, but when I register a new user it blows up with NPE (due to PU not being available). jlaskowski@dev /cygdrive/c/geronimo $ ./bin/deploy.sh -u system -p manager deploy jboss-seam-jee5.ear jboss-seam-jee5-geronimo-plan.xml Using GERONIMO_BASE: c:\geronimo Using GERONIMO_HOME: c:\geronimo Using GERONIMO_TMPDIR: c:\geronimo\var\temp Using JRE_HOME: c:\apps\java5\jre Deployed org.jboss.seam.examples.jee5/jboss-seam-jee5/2.0.0.GA/ear `-> jboss-seam-jee5.war @ /seam-jee5 `-> jboss-seam.jar `-> jboss-seam-jee5.jar `-> seam-jee5-dbpool I think I could work it around if I could turn off openjpa to not perform the runtime enhancement on all classes, but the entities (via element in persistence.xml). I tried non-overridable-classes and hidden-classes on ear, jar and war level, but unless I did it wrong it didn't help. How can I fix it? Any hints greatly appreciated. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl