The following message is prompted when you start WebLogic when deploying a hibernate project in WebLogic:Classnotfoundexception: org. hibernate. hql. Ast. hqltoken
Error cause:
Anlr is required in hibernate3. However, this package already contains the antrl class library in weblogic. jar, and some class loading errors will occur and the hibernate3.jar in war or ear cannot be found.
After this error occurs, anlr will call system. Exit (), so that WebLogic will stop the service.
The solution is as follows: three steps
1. Create the XML file weblogic. xml under the user's project code web-INF.
<? XML version = "1.0" encoding = "UTF-8"?>
<! Doctype Weblogic-web-app public "-// BEA Systems, Inc. // DTD web application 8.1 //" http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd ">
<Weblogic-web-app>
<Container-Descriptor>
<Prefer-web-INF-classes> true </prefer-web-INF-classes>
</Container-Descriptor>
</Weblogic-web-app>
2: copy the antlr-2.7.6rc1.jar in the user project to the weblogic10 Directory: D:/BEA/wlserver_10.0/Server/lib
3: rebuild the current WebLogic user's startweblogic. cmd
Set pre_classpath = % wl_home %/Server/lib/antlr-2.7.6rc1.jar
Set classpath = % save_classpath % --------- original
Set classpath = % pre_classpath %; % classpath %
The Internet says:
Add the attribute hibernate. query. factory_class to the hibernate. properties file. The attribute value is org. hibernate. hql. Classic. classicquerytranslatorfactory.
However, some functions may be faulty, such
However, problems may occur during batch deletion and update.