gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 11:58:31 25 4
gpt4 key购买 nike

我正在使用 NetBeans 6.8 和 Glassfish Enterprise Server 2.1.1((v2.1 Patch06)(9.1_02 Patch12))(构建 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.ValidationExceptionException 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 环境有关吗?我该怎么办?

最佳答案

这是我发现的有关错误 TOP-07106(来自 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

有帮助吗?您会面临类似的情况吗?

关于java - GlassFish 2.1.1 - TopLink (JPA1) 持久性异常 7106 - 字符串加密之谜,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3161624/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com