GlassFish 2.1.1 - TopLink (JPA1) 持久性异常 7106 - 字符串加密之谜
我正在使用 NetBeans 6.8 和 Glassfish Enterprise Server 2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)。
我创建了一个 servlet,并使用 Netbeans 代码生成功能通过 TopLink (JPA1) 实现持久性。
当我尝试使用以下代码创建实体管理器时:
EntityManagerFactory entityManagerFactory=Persistence.createEntityManagerFactory("xyzPU");
EntityManager entityManager=entityManagerFactory.createEntityManager();
我收到以下可怕的异常:
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...
试图弄清楚发生了什么,我将上面的两行代码放入一个带有 main() 方法的新类中(相同的包代码位于之前但在 servlet 之外的代码)并且一切正常。因此,库导入、配置文件等应该不会有问题。此外,我还尝试使用另一个版本的 glassfish(我猜只是一个更轻的版本)运行 servlet,它也工作得很好。
谁能解释一下发生了什么事吗?是否与 Glassfish Enterprise Server Edition 以及 servlet 环境的某些设置/配置有关?我应该怎么办?
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 explain 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我发现的有关错误 TOP-07106 的内容(来自 这里):
有帮助吗?您是否也面临着类似的情况?
Here is something I found about the error TOP-07106 (from here):
Does it help? Could you be facing a similar situation?