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

时间:2010-07-01 21:00:05

标签: java servlets jpa glassfish toplink

我正在使用NetBeans 6.8和Glassfish Enterprise Server 2.1.1((v2.1 Patch06)(9.1_02 Patch12))(构建b31g-fcs)。

我使用TopLink(JPA1)创建了一个servlet并使用Netbeans代码生成功能来实现永久性。

当我尝试使用以下代码创建实体管理器时:

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环境有关吗?我该怎么办?

1 个答案:

答案 0 :(得分:1)

以下是我发现的错误TOP-07106(来自here):

  

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

     

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

     

行动:   尝试时出错   加密密码字符串。普通的   这种例外的原因是用法   JDK 1.3及更早版本。该   TopLink JCE加密机制   需要JDK 1.4及更高版本(或JDK 1.3   配置了JCE插件)   功能正常。

     

等级: 1

     

输入:错误

     

影响:配置

有帮助吗?你能面对类似的情况吗?