Conflict solution between weblogic10 and hibernate3

Source: Internet
Author: User

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 //" ">
<Prefer-web-INF-classes> true </prefer-web-INF-classes>

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.