persistence@glassfish.java.net

Re: GlassFish 2.1.1 - TopLink (JPA1) Persistence Exception 7106 - String Encryption Mistery...

From: devmardev <devmardev_at_gmail.com>
Date: Wed, 7 Jul 2010 11:08:51 -0700 (PDT)

Thank you for your response. You're probably right. I still don't understand
why I hit the bug only from a servlet context and not from a generic main
method but the cause of the exception seems the one listed in the bug
description. I'm having other issues downgrading to a previous JDK version
and the workarounds are a little bit obscure to me. Where should I add the
following code?

disabledMechanisms = {
   CKM_DES_ECB
   CKM_DES_CBC
}

How can I pass SunJCE as the provider in order to avoid the bug?


Thank you very much for your help.


Mitesh Meswani-2 wrote:
>
> You might be hitting
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6928796.
> Look at the bug description for possible workarounds.
> On 7/1/2010 2:12 PM, devmardev wrote:
>> Hello,
>>
>> I'm using NetBeans 6.8 and Glassfish Enterprise Server 2.1.1 ((v2.1
>> Patch06)(9.1_02 Patch12)) (build b31g-fcs). I created a servlet and used
>> Netbeans code generation features to imlement persistence using TopLink
>> (JPA1).
>>
>> When I try to create an Entity Manager with the following code:
>> EntityManagerFactory
>> entityManagerFactory=Persistence.createEntityManagerFactory("xyzPU");
>> EntityManager entityManager=entityManagerFactory.createEntityManager();
>>
>> I receive the following terrible exception: Exception [TOPLINK-7106]
>> (Oracle
>> TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))):
>> oracle.toplink.essentials.exceptions.ValidationException Exception
>> Description: Error encountered during string encryption. Internal
>> Exception:
>> java.security.ProviderException: update() failed
>> oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:240)
>> oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
>> oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:138)
>> oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:132)
>> oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
>> etc...
>>
>> Trying to figure out what was going on I put the 2 lines of code above
>> into
>> a new class with a main() method (same package of the one where the code
>> was
>> before but outside of the servlet) and everything worked properly. Thus,
>> there should be no issues with libraries importing, configuration files,
>> etc.. Furthermore, I tried also running the servlet using another version
>> of
>> glassfish (I guess just a lighter version) and it worked fine too.
>>
>> CAN ANYONE TELL ME WHAT'S GOING ON??? Could it be anything related to
>> some
>> settings/configurations of the Glassfish Enterprise Server Edition
>> together
>> with the servlet environment? What should I do?
>>
>> Thanks in advance.
>>
>
>
>

-- 
View this message in context: http://old.nabble.com/GlassFish-2.1.1---TopLink-%28JPA1%29-Persistence-Exception-7106---String-Encryption-Mistery...-tp29050185p29099415.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.