Return-Path: X-Original-To: apmail-aries-dev-archive@www.apache.org Delivered-To: apmail-aries-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F19596D6 for ; Thu, 2 Feb 2012 15:38:20 +0000 (UTC) Received: (qmail 32862 invoked by uid 500); 2 Feb 2012 15:38:20 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 32739 invoked by uid 500); 2 Feb 2012 15:38:19 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 32717 invoked by uid 99); 2 Feb 2012 15:38:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 15:38:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 15:38:15 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9FA231880DF for ; Thu, 2 Feb 2012 15:37:53 +0000 (UTC) Date: Thu, 2 Feb 2012 15:37:53 +0000 (UTC) From: "Brian DePradine (Commented) (JIRA)" To: dev@aries.apache.org Message-ID: <888076178.3056.1328197073655.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <824444532.302.1327677020648.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (ARIES-818) JPAWeavingHook fails to add dynamic imports for bundles that contain pre-enhanced classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ARIES-818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198883#comment-13198883 ] Brian DePradine commented on ARIES-818: --------------------------------------- Fair enough, I will close this issue. > JPAWeavingHook fails to add dynamic imports for bundles that contain pre-enhanced classes > ----------------------------------------------------------------------------------------- > > Key: ARIES-818 > URL: https://issues.apache.org/jira/browse/ARIES-818 > Project: Aries > Issue Type: Bug > Components: JPA > Environment: I am using Equinox org.eclipse.osgi_3.7.2.R37x_v20111028-1418.jar with Apache Aries revision 1187719 > Reporter: Brian DePradine > Attachments: patch.txt > > > If the persistence bundle contains pre-enhanced classes then the JPAWeavingHook does not perform any additional enhancement. This has the side-effect of not adding the dynamic imports for the extra packages required by the pre-enhanced classes. The result is the following exception: > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) > at java.lang.reflect.Method.invoke(Method.java:611) > at com.ibm.osgi.jpa.jpa2.TestTools.run(TestTools.java:60) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) > at java.lang.reflect.Method.invoke(Method.java:611) > at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:238) > at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:838) > at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638) > at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:726) > at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:71) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) > at java.util.concurrent.FutureTask.run(FutureTask.java:149) > at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:79) > at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:220) > at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:154) > at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:630) > at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:326) > at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:228) > at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) > at java.util.concurrent.FutureTask.run(FutureTask.java:149) > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:109) > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:218) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) > at java.lang.Thread.run(Thread.java:736) > Caused by: java.lang.NoClassDefFoundError: org.apache.openjpa.enhance.PersistenceCapable > at java.lang.ClassLoader.defineClassImpl(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:275) > at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188) > at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:626) > at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:608) > at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:562) > at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:486) > at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:459) > at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) > at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) > at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476) > at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) > at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) > at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) > at java.lang.ClassLoader.loadClass(ClassLoader.java:619) > at java.lang.Class.forNameImpl(Native Method) > at java.lang.Class.forName(Class.java:172) > at org.apache.openjpa.meta.MetaDataRepository.classForName(MetaDataRepository.java:1552) > at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypesInternal(MetaDataRepository.java:1528) > at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(MetaDataRepository.java:1506) > at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:282) > at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:238) > at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212) > at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) > at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) > at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:50) > at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:35) > at org.apache.aries.jpa.container.impl.CountingEntityManagerFactory.createEntityManager(CountingEntityManagerFactory.java:65) > at Proxy5c17bfcd_497a_4e6b_80f8_395b2e49aa63.createEntityManager(Unknown Source) > at com.ibm.osgi.jpa.jpa2.NewAPITest.primeDB(NewAPITest.java:87) > at com.ibm.osgi.jpa.jpa2.NewAPITest.before(NewAPITest.java:36) > ... 31 more > Caused by: java.lang.ClassNotFoundException: org.apache.openjpa.enhance.PersistenceCapable > at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513) > at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) > at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) > at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) > at java.lang.ClassLoader.loadClass(ClassLoader.java:619) > ... 62 more -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira