OSSEZ

 找回密码
 新用户

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 45|回复: 1

[开发框架] Hibernate 错误 Unable to load class [org.jasypt.hibernate4.type.EncryptedSt...

[复制链接]
 楼主| 发表于 2017-7-23 10:57:08 | 显示全部楼层 |阅读模式
错误的信息如下:

  1. 2017/07/22 22:31:55 ERROR [com.usvisatrack.core.common.Factory] - HIBERNATE DB SESSION INIT ERROR
  2. org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.jasypt.hibernate4.type.EncryptedStringType]
  3.         at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:229) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  4.         at org.hibernate.boot.model.source.internal.hbm.TypeDefinitionBinder.processTypeDefinition(TypeDefinitionBinder.java:34) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  5.         at org.hibernate.boot.model.source.internal.hbm.MappingDocument.processTypeDefinitions(MappingDocument.java:158) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  6.         at org.hibernate.boot.model.source.internal.hbm.HbmMetadataSourceProcessorImpl.processTypeDefinitions(HbmMetadataSourceProcessorImpl.java:80) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  7.         at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processTypeDefinitions(MetadataBuildingProcess.java:161) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  8.         at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:255) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  9.         at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  10.         at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  11.         at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  12.         at org.hibernate.boot.MetadataSources.buildMetadata(MetadataSources.java:179) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  13.         at com.usvisatrack.core.common.Factory.initSession(Factory.java:93) [classes/:?]
  14.         at com.usvisatrack.core.common.Factory.getFactory(Factory.java:71) [classes/:?]
  15.         at com.usvisatrack.core.common.Factory.close(Factory.java:450) [classes/:?]
  16.         at com.usvisatrack.services.common.Main.main(Main.java:51) [classes/:?]
  17. Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.jasypt.hibernate4.type.EncryptedStringType
  18.         at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:217) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  19.         at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_25]
  20.         at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_25]
  21.         at java.lang.Class.forName0(Native Method) ~[?:1.8.0_25]
  22.         at java.lang.Class.forName(Class.java:344) ~[?:1.8.0_25]
  23.         at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:226) ~[hibernate-core-5.1.2.Final.jar:5.1.2.Final]
  24.         ... 13 more
  25. 2017/07/22 22:31:55 ERROR [com.usvisatrack.services.common.Main] - An error occurred starting the specified service (VisaImporter)
  26. java.lang.NullPointerException: null
  27.         at com.usvisatrack.core.common.Factory.close(Factory.java:450) ~[classes/:?]
  28.         at com.usvisatrack.services.common.Main.main(Main.java:51) [classes/:?]
复制代码
 楼主| 发表于 2017-7-23 10:58:19 | 显示全部楼层
检查你的的 HBM 文件,可能在用户字符串中进行了用户密码进行了加密

  1.         <typedef class="org.jasypt.hibernate4.type.EncryptedStringType"
  2.                 name="encryptedString">
  3.                 <param name="algorithm">PBEWithMD5AndTripleDES</param>
  4.                 <param name="password">******</param>
  5.                 <param name="keyObtentionIterations">1000</param>
  6.         </typedef>
复制代码
您需要登录后才可以回帖 登录 | 新用户

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|手机版|小黑屋|Archiver|帮助|OSSEZ (North Tecom)  

GMT+8, 2017-8-17 23:46

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表