LXY3800 发表于 2017-2-18 11:43:14

org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundExcepti

  环境:
      weblogic 10
      hibernate 3
  错误原因:
  在hibernate3中需要用到antlr,然而这个包在weblogic.jar中已经包含了antrl类库,就会产生一些类加载的错误,无法找到在war或者ear中的hibernate3.jar
  解决方法:
  在用户工程代码web-inf下建立xml文件:weblogic.xml
  <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "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>
页: [1]
查看完整版本: org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundExcepti