GlassFish 2.1.1 - TopLink (JPA1) 持久性异常 7106 - 字符串加密之谜

发布于 2024-09-08 02:12:57 字数 1601 浏览 3 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相思故 2024-09-15 02:12:57

这是我发现的有关错误 TOP-07106 的内容(来自 这里):

TOP-07106:字符串加密期间遇到错误。

原因:期间遇到错误
密码字符串加密。

操作:
尝试时出现错误
加密密码字符串。一个常见的
此异常的原因是使用
JDK 1.3 及更早版本。这
TopLink JCE加密机制
需要 JDK 1.4 及更高版本(或 JDK 1.3
配置有 JCE 插件)
功能正常。

等级:1

类型:错误

影响:配置

有帮助吗?您是否也面临着类似的情况?

Here is something I found about the error TOP-07106 (from here):

TOP-07106: Error encountered during string encryption.

Cause: Error encountered during
password string encryption.

Action: An
error is raised while trying to
encrypt the password string. A common
reason for this exception is the usage
of JDK 1.3 and earlier versions. The
TopLink JCE encryption mechanism
requires JDK 1.4 and later (or JDK 1.3
configured with the JCE plug-in) to
function properly.

Level: 1

Type: ERROR

Impact: Configuration

Does it help? Could you be facing a similar situation?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文