[Resin-interest] JPA 2.1 (was Re: Resin 4 and Java 8)
This is my workaround for JPA 2.1 on Resin. We've had to put that upgrade aside for a while now so it hasn't been thoroughly tested and there may be bumps down the road, but at least this allowed us to boot :-/ /** Remove Caucho's JPA implementation Amber - included in Resin - from the list of registered persistence providers. */ public static void removeAmberPersistenceProvider() { final PersistenceProviderResolver persistenceProviderResolver = PersistenceProviderResolverHolder.getPersistenceProviderResolver(); persistenceProviderResolver.getPersistenceProviders(); // Make sure the persistence provider cache has been initialized final MapClassLoader, PersistenceProviderResolver resolvers = (MapClassLoader, PersistenceProviderResolver) ReflectionUtils.getPrivateField(persistenceProviderResolver, resolvers); PersistenceProviderResolver clPersistenceProviderResolver = resolvers.get(Thread.currentThread().getContextClassLoader()); final ListWeakReferenceClass? extends PersistenceProvider resolverClasses = (ListWeakReferenceClass? extends PersistenceProvider) ReflectionUtils.getPrivateField(clPersistenceProviderResolver, resolverClasses); IteratorWeakReferenceClass? extends PersistenceProvider iter = resolverClasses.iterator(); while(iter.hasNext()) { WeakReferenceClass? extends PersistenceProvider ref = iter.next(); if(ref.get() != null com.caucho.amber.manager.AmberPersistenceProvider.equals(ref.get().getName())) { iter.remove(); } } } - Original Message - Subject: Re: [Resin-interest] [Resin] Resin 4 and Java 8 Date: Tue, 24 Mar 2015 12:44:17 -0700 From: Chris Pratt thechrispr...@gmail.com I'm basically having the same problem that is outlined in the previous resin-interest pose ( https://www.mail-archive.com/resin-interest@caucho.com/msg06062.html) and on Stack Overflow ( http://stackoverflow.com/questions/26352912/jpa-2-1-not-loaded-in-resin-3-1-9), but I'm using the latest Resin (4.0.43). I've tried following the instructions in the sited caucho bug report ( http://bugs.caucho.com/view.php?id=5678), but I still get the same exception. Any pointers would definitely be appreciated. (*Chris*) On Tue, Mar 24, 2015 at 11:37 AM, Nam Nguyen n...@caucho.com wrote: Message: 2 Date: Tue, 24 Mar 2015 16:40:20 + From: Chris Prattthechrispr...@gmail.com Subject: Re: [Resin-interest] [Resin] Resin 4 and Java 8 To: General Discussion for the Resin application server resin-interest@caucho.com Message-ID: CAALdY0z9yi0VE=Ac1_4U0hD7Ti74zdeEEu8= r3riz_xjxv4...@mail.gmail.com Content-Type: text/plain; charset=utf-8 Yes, I have it working just fine on Java 8. But, I can't seem to get it working with the new JPA 2.1 (from Hibernate 4.3). (*Chris*) Resin works with Java8. Chris, can you elaborate on the issue you are having with JAP 2.1? Thanks, -- Nam ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest -- /Mattias ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] [Resin] Resin 4 and Java 8
Message: 2 Date: Tue, 24 Mar 2015 16:40:20 + From: Chris Prattthechrispr...@gmail.com Subject: Re: [Resin-interest] [Resin] Resin 4 and Java 8 To: General Discussion for the Resin application server resin-interest@caucho.com Message-ID: CAALdY0z9yi0VE=Ac1_4U0hD7Ti74zdeEEu8=r3riz_xjxv4...@mail.gmail.com Content-Type: text/plain; charset=utf-8 Yes, I have it working just fine on Java 8. But, I can't seem to get it working with the new JPA 2.1 (from Hibernate 4.3). (*Chris*) Resin works with Java8. Chris, can you elaborate on the issue you are having with JAP 2.1? Thanks, -- Nam ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] [Resin] Resin 4 and Java 8
On Tue, Mar 24, 2015 at 5:40 PM, Chris Pratt thechrispr...@gmail.com wrote: Yes, I have it working just fine on Java 8. But, I can't seem to get it working with the new JPA 2.1 (from Hibernate 4.3). (*Chris*) On Tue, Mar 24, 2015, 8:28 AM Maria Elena ringmeiste...@gmail.com wrote: Hello, has anyone tried using Resin 4 on Java 8? I only found documentation about Java 6 (Oracle site) and Java 7 (Caucho site). Thanks and regards Maria Elena -- PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x34977A00 ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest Hi Chris, many thanks for your reply! Did you find any resource (e.g. link, wiki page) about Resin 4 experience with Java 8 or you installed just from scratch? Thanks and regards Maria Elena -- PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x34977A00 ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] [Resin] Resin 4 and Java 8
Nope just tried it out and it worked just fine. (*Chris*) On Tue, Mar 24, 2015 at 2:14 PM Maria Elena ringmeiste...@gmail.com wrote: On Tue, Mar 24, 2015 at 5:40 PM, Chris Pratt thechrispr...@gmail.com wrote: Yes, I have it working just fine on Java 8. But, I can't seem to get it working with the new JPA 2.1 (from Hibernate 4.3). (*Chris*) On Tue, Mar 24, 2015, 8:28 AM Maria Elena ringmeiste...@gmail.com wrote: Hello, has anyone tried using Resin 4 on Java 8? I only found documentation about Java 6 (Oracle site) and Java 7 (Caucho site). Thanks and regards Maria Elena -- PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x34977A00 ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest Hi Chris, many thanks for your reply! Did you find any resource (e.g. link, wiki page) about Resin 4 experience with Java 8 or you installed just from scratch? Thanks and regards Maria Elena -- PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x34977A00 ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest