频道栏目
IT货架 > > 正文
与Hibernate有关的代码,该如何处理
网友分享于:Jun 12, 2018 10:50:44 PM    来源: IT货架   
与Hibernate有关的代码
今天做hibernate项目时,测试的时候数据库出现了错误。错误如下:


16 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
16 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
16 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
31 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
94 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
94 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
188 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : cn/lp/hibernate/bean/User.hbm.xml
250 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: cn.lp.hibernate.bean.User -> users
281 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
297 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle9Dialect
328 [main] WARN org.hibernate.dialect.Oracle9Dialect - The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
438 [main] INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running hbm2ddl schema export
438 [main] INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting generated schema to database
438 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
438 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
438 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
531 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@127.0.0.1:1521:orcl
531 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {}
906 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaExport - schema export unsuccessful
java.sql.SQLException: ORA-01017: invalid username/password; logon denied

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:406)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:794)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:391)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:465)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(ManagedProviderConnectionHelper.java:52)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:211)
at cn.lp.hibernate.ExpDB.main(ExpDB.java:14)

请高手帮帮看看。注:我用的是oracle数据库,而且单独登陆oracle数据库是可正确登陆的。

------解决方案--------------------
有一些架包没有导入进来。
------解决方案--------------------
lZ可以在以下考虑:版本与配置文件对应的问题,包的导入等。。。。

广告服务联系QQ:1134687142 | 网站地图

版权所有: IT货架- 内容来自互联网,仅供用于技术学习,请遵循相关法律法规. 京ICP备11030978号-1