GithubHelp home page GithubHelp logo

hellohibernate's Introduction

##课程实验原因,初步学习hibernate框架

1. mysql 数据库登录问题

  1. 打开命令窗口或者是ide集成的terminal窗口

    mysql -u root -p
    
  2. 输入密码。

  3. 显示当前数据库中的数据

    show databases
    
  4. 选择进入哪一个数据库

    use databasename
    

2. 中间碰到的问题

  1. [问题描述] java.lang.ClassNotFoundException: javax.transaction.SystemException
    出错在Configuration cfg = new Configuration().configure();

    **[解决措施]**将下载的hibernate中的文件jta.jar放到自己的lib目录下面就好了。

  2. **[问题描述]**Exception in thread “main” java.lang.NoClassDefFoundError:javax/ persistence/Cacheable

    [解决措施] 将hibernate包文件下的 hibernate-jpa-2.0-api-1.0.0.Final放到自己的项目目录下。

  3. **[问题描述]**com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

    [解决措施] 修改hibernate.hb.xml文件,增加serverTimezone=UTC 解决完成之后如下 jdbc:mysql://localhost:3306/hibernate?serverTimezone=UTC

  4. **[问题描述]**java.sql.SQLSyntaxErrorException: Unknown table 'sequences' in information_schema

    [解决措施] 在hibernate.hbm.xml中的dialect出现了问题。改成自己对应的dialect就可以了。 本机mysql用的方言是org.hibernate.dialect.MySQLDialect

  5. [问题描述] java.lang.ClassNotFoundException: org.apache.lucene.analysis.standard.StandardAnalyzer

    [解决措施] 将download jar(lucene-1.2.jar)放到自己的lib目录下面

hellohibernate's People

Contributors

aweng126 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.