From open-jpa-dev-return-588-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Tue Aug 29 09:54:29 2006 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 15993 invoked from network); 29 Aug 2006 09:54:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Aug 2006 09:54:22 -0000 Received: (qmail 98000 invoked by uid 500); 29 Aug 2006 09:54:15 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 97955 invoked by uid 500); 29 Aug 2006 09:54:15 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 97901 invoked by uid 99); 29 Aug 2006 09:54:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 02:54:14 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mprudhomapache@gmail.com designates 64.233.166.183 as permitted sender) Received: from [64.233.166.183] (HELO py-out-1112.google.com) (64.233.166.183) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 02:54:13 -0700 Received: by py-out-1112.google.com with SMTP id c30so2812026pyc for ; Tue, 29 Aug 2006 02:53:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=LfyMqb2bkmjvzc8O4X9xWrMXOEJEYHpftziGOY9apc4PQNYHXjZrLnnwN4yKhuhY7ZdbmyAfzmvhd5owfm6JhAvkUzWNi/v7iDsm7TzJuR1ru9t7hd8IFPJU3CxeCz4l90iydv0dZgJZfg1LPGJjZZvNdh2Vgmz0vXxyNX60980= Received: by 10.35.39.2 with SMTP id r2mr14581716pyj; Tue, 29 Aug 2006 02:53:25 -0700 (PDT) Received: from ?192.168.1.104? ( [69.228.91.172]) by mx.gmail.com with ESMTP id f19sm160706pyf.2006.08.29.02.53.20; Tue, 29 Aug 2006 02:53:25 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: References: <89c0c52c0608280656v828654cg6e422370ea7422a8@mail.gmail.com> <89c0c52c0608280740h3c050586ma7ab101c45df60db@mail.gmail.com> <89c0c52c0608280832t3d1b89b2of322a740a9c3620b@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <00655410-B017-4C31-93DB-0EEE2874908E@apache.org> Content-Transfer-Encoding: 7bit From: Marc Prud'hommeaux Subject: Re: Problems with latest repository updates? Date: Tue, 29 Aug 2006 02:52:57 -0700 To: open-jpa-dev@incubator.apache.org X-Mailer: Apple Mail (2.752.2) Sender: Marc Prud'hommeaux X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It turns out that this problem was a little tricky. There's a Maven bug (http://jira.codehaus.org/browse/MNG-2221 , which they say will be fixed in Maven 2.0.5) affecting cases where a parent pom.xml and a child pom.xml both declare the same plugin type, then both those plugins will wind up being executed twice in the build process. This problem was triggered when I added the additional "maven-antrun- plugin" in the parent pom.xml to get the subversion version number. Aside from slowing down the build a bit, this shouldn't have been much of a problem. However, the first time the enhancer is run, the openjpa jars are not yet built, and the second time it is run, the openjpa jars have been built. In both cases, we have the same declared classpath, which includes the openjpa jar paths. The first time we run the task, we try to get the META-INF/services/... resources from the classloader, which looks at the path entries, sees the absence of the jar entries that are listed in the classpath, and dutifully makes a note of it. The second time the enhancer is run, we again request the services resource, but the classloader has already cached the fact that the jars were missing, and so doesn't pick up that they are now present. The attempt to fetch the URL from the jar is intercepted and an exception is thrown. Anyway, I've just moved the subversion detection code to openjpa-lib, at least until a release of Maven with the bugfix is available. "mvn clean package" should again work. On Aug 28, 2006, at 9:06 AM, Bill Dudney wrote: > Hi Kevin, > > I've not looked closely at this but I'll offer my opinion just the > same :-) > > It looks to me like there is a problem with the maven (or ant) > dependencies in the build. Perhaps one of the jars that contains > the product derivations is not in the class path during the test or > build? > > Just a thought. > > TTFN, > > -bd- > > On Aug 28, 2006, at 9:32 AM, Kevin Sutter wrote: > >> More experimentation... Only fails when running the build (mvn clean >> install) from the parent "openjpa" project and letting it traverse >> through >> the sub-projects. If I do a top-level clean and then go directly >> to the >> openjpa-persistence-jdbc sub-project, execute the "mvn install", >> everything >> works okay. >> >> From what I can tell so far is that this anomoly seems to be >> related to the >> changes to make the PCEnhancer an ant task instead of a direct java >> invocation. But, nothing is jumping out at me as being the >> culprit just >> yet... >> >> Kevin >> >> On 8/28/06, Kevin Sutter wrote: >>> >>> Interesting. If I do the "mvn clean install", followed by >>> another "mvn >>> install", then it all works as expected. The first "mvn clean >>> install" >>> fails as originally posted with a missing product derivations. >>> And, then >>> the subsequent "mvn install' seems to work okay with all tests >>> succeeding.... >>> >>> >>> On 8/28/06, Kevin Sutter wrote: >>> > >>> > Hi, >>> > With the latest SVN updates over the weekend, I am now >>> experiencing a >>> > failure with a "missing product derivations"... I did a "mvn >>> clean" first, >>> > followed by a "mvn install". I'll start to take a look, but in >>> case >>> > somebody already knows the problem... >>> > >>> > [INFO] >>> > >>> -------------------------------------------------------------------- >>> ----- >>> > --- >>> > [INFO] Building OpenJPA JPA JDBC >>> > [INFO] >>> > >>> -------------------------------------------------------------------- >>> ----- >>> > --- >>> > [INFO] [resources:resources] >>> > [INFO] Using default encoding to copy filtered resources. >>> > [INFO] [compiler:compile] >>> > [INFO] Nothing to compile - all classes are up to date >>> > [INFO] [resources:testResources] >>> > [INFO] Using default encoding to copy filtered resources. >>> > [INFO] [compiler:testCompile] >>> > [INFO] Nothing to compile - all classes are up to date >>> > [INFO] [antrun:run {execution: default}] >>> > [INFO] Executing tasks >>> > [INFO] >>> > >>> -------------------------------------------------------------------- >>> ---- >>> > [ERROR] FATAL ERROR >>> > [INFO] >>> > >>> -------------------------------------------------------------------- >>> ---- >>> > [INFO] null >>> > Your system is missing product derivations. Product >>> derivations provide >>> > configu >>> > ration options for supported data stores and specifications. >>> You must >>> > have a ME >>> > TA-INF/services/org.apache.openjpa.conf.ProductDerivation file >>> in your >>> > classpath >>> > listing the available derivation classes, and some listed >>> class must be >>> > instant >>> > iable. Typically this file is bundled as part of the >>> distribution. >>> > Have you un >>> > bundled it, or unbundled its listed classes? If you are using >>> ant, a >>> > common solu >>> > tion to this problem is to place the jar libraries of the OpenJPA >>> > distribution i >>> > n the ${user.home}/.ant/lib directory. Another common cause of >>> this >>> > problem is a >>> > n overly-restrictive security manager. >>> > [INFO] >>> > >>> -------------------------------------------------------------------- >>> ---- >>> > [INFO] Trace >>> > java.lang.ExceptionInInitializerError >>> > at java.lang.J9VMInternals.initialize >>> (J9VMInternals.java:154) >>> > at org.apache.openjpa.conf.OpenJPAConfigurationImpl >>> > .(OpenJPAConfig >>> > urationImpl.java:510) >>> > at org.apache.openjpa.conf.OpenJPAConfigurationImpl >>> > .(OpenJPAConfig >>> > urationImpl.java:160) >>> > at org.apache.openjpa.conf.OpenJPAConfigurationImpl >>> > .(OpenJPAConfig >>> > urationImpl.java:151) >>> > at org.apache.openjpa.ant.PCEnhancerTask.newConfiguration >>> > (PCEnhancerTask >>> > .java:77) >>> > at org.apache.openjpa.lib.ant.AbstractTask.execute( >>> > AbstractTask.java:156 >>> > ) >>> > at org.apache.tools.ant.UnknownElement.execute( >>> > UnknownElement.java:275) >>> > at org.apache.tools.ant.Task.perform(Task.java:364) >>> > at org.apache.tools.ant.Target.execute(Target.java:341) >>> > at >>> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks >>> > (AbstractA >>> > ntMojo.java:108) >>> > at org.apache.maven.plugin.antrun.AntRunMojo.execute( >>> > AntRunMojo.java:83) >>> > >>> > at >>> org.apache.maven.plugin.DefaultPluginManager.executeMojo >>> > (DefaultPlugi >>> > nManager.java:412) >>> > at >>> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals >>> (Defa >>> > ultLifecycleExecutor.java:534) >>> > at >>> > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithL >>> i >>> > fecycle(DefaultLifecycleExecutor.java:475) >>> > at >>> > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifec >>> y >>> > cle(DefaultLifecycleExecutor.java:891) >>> > at >>> > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle >>> (Def >>> > aultLifecycleExecutor.java:729) >>> > at >>> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals >>> (Defa >>> > ultLifecycleExecutor.java:505) >>> > at >>> > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithL >>> i >>> > fecycle(DefaultLifecycleExecutor.java:475) >>> > at >>> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal >>> (Defau >>> > ltLifecycleExecutor.java:454) >>> > at >>> > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHa >>> n >>> > dleFailures(DefaultLifecycleExecutor.java:306) >>> > at >>> > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegme >>> n >>> > ts(DefaultLifecycleExecutor.java:273) >>> > at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute >>> > (DefaultLi >>> > fecycleExecutor.java:140) >>> > at org.apache.maven.DefaultMaven.doExecute >>> (DefaultMaven.java >>> > :322) >>> > at org.apache.maven.DefaultMaven.execute >>> (DefaultMaven.java:115) >>> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) >>> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>> Method) >>> > at sun.reflect.NativeMethodAccessorImpl.invoke >>> > (NativeMethodAccessorImpl. >>> > java:64) >>> > at sun.reflect.DelegatingMethodAccessorImpl.invoke >>> > (DelegatingMethodAcces >>> > sorImpl.java:43) >>> > at java.lang.reflect.Method.invoke(Method.java:615) >>> > at org.codehaus.classworlds.Launcher.launchEnhanced( >>> > Launcher.java:315) >>> > at org.codehaus.classworlds.Launcher.launch >>> (Launcher.java:255) >>> > at org.codehaus.classworlds.Launcher.mainWithExitCode( >>> > Launcher.java:430) >>> > >>> > at org.codehaus.classworlds.Launcher.main(Launcher.java: >>> 375) >>> > Caused by: java.util.MissingResourceException: Your system is >>> missing >>> > product de >>> > rivations. Product derivations provide configuration options for >>> > supported data >>> > stores and specifications. You must have a >>> > META-INF/services/org.apache.openjp >>> > a.conf.ProductDerivation file in your classpath listing the >>> available >>> > derivation >>> > classes, and some listed class must be instantiable. >>> Typically this >>> > file is bu >>> > ndled as part of the distribution. Have you unbundled it, or >>> unbundled >>> > its list >>> > ed classes? If you are using ant, a common solution to this >>> problem is >>> > to place >>> > the jar libraries of the OpenJPA distribution in the $ >>> {user.home}/.ant/lib >>> > direc >>> > tory. Another common cause of this problem is an overly- >>> restrictive >>> > security man >>> > ager. >>> > at org.apache.openjpa.conf.ProductDerivations >>> > .(ProductDerivation >>> > s.java:55) >>> > at java.lang.J9VMInternals.initializeImpl(Native Method) >>> > at java.lang.J9VMInternals.initialize >>> (J9VMInternals.java:148) >>> > ... 32 more >>> > [INFO] >>> > >>> -------------------------------------------------------------------- >>> ---- >>> > >>> >>> >