Charscanner; PANIC: ClassNotFoundException

xiaoxiao2021-04-04  253

Will publish using Hibernate3.0 web applications to WebLogic8.1.4, once an action that occurs accesses the database, prompt Charscanner; PANIC: classNotFoundException: org.hibernate.hql.ast.hqltoken, and the WebLogic process will be automatically closed.

After the Internet, the reason is: Antlr.jar is required in Hibernate3, however this package already contains an ANTRL class library in WebLogic.jar, and generates some types of loaded errors that cannot be found in WAR or EAR. Hibernate3. .jar. After this error occurs, Antlr calls system.exit () so that WebLogic will abort service.

The solution provided online is: Solution is to add attributes in the hibernate.properties file: hibernate.query.Factory_Class, the value of the property is org.hibernate.hql.classic.classicQueryTranslatorFactory. But I used the cfg.xml file, so I will add a declaration in in hibernate.cfg.xml: org.hibernate.hql.classic.classicQueryTranslatorFactory , problem solving.

Reference: http://www.ublog.net/User2/3261/archives/2006/18103.SHTML

转载请注明原文地址:https://www.9cbs.com/read-131763.html

New Post(0)