用户名不存在或者表名不存在

来源:互联网 发布:淘宝卖家威胁我怎么办 编辑:程序博客网 时间:2024/05/29 17:39

高手帮忙看看这是为什么?

用的是Hibernate+oracle。。。

错误如下:

 

 

 

15 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
31 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
31 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
47 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
125 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
125 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
218 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : cn/jbit/houserent/bean/User.hbm.xml
312 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: cn.jbit.houserent.bean.User -> users
328 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : cn/jbit/houserent/bean/District.hbm.xml
375 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: cn.jbit.houserent.bean.District -> district
375 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : cn/jbit/houserent/bean/Street.hbm.xml
406 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: cn.jbit.houserent.bean.Street -> street
468 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : cn/jbit/houserent/bean/Type.hbm.xml
484 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: cn.jbit.houserent.bean.Type -> housetype
484 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : cn/jbit/houserent/bean/House.hbm.xml
500 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: cn.jbit.houserent.bean.House -> house
500 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
500 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: cn.jbit.houserent.bean.District.streets -> street
515 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
515 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
515 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
609 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:orcl
609 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=epet, password=****}
1484 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
1484 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: Oracle JDBC driver, version: 11.1.0.6.0-Production
1531 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle9Dialect
1531 [main] WARN org.hibernate.dialect.Oracle9Dialect - The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
1546 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
1546 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
1546 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
1546 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
1546 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
1546 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
1593 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
1781 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
1781 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - Running hbm2ddl schema update
1781 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - fetching database metadata
1937 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - updating schema
2093 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - table found: EPET.DISTRICT
2093 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - columns: [name, id]
2093 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - foreign keys: []
2093 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - indexes: []
2171 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - table found: EPET.HOUSETYPE
2171 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - columns: [type_name, id]
2171 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - foreign keys: []
2171 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - indexes: [sys_c005147]
2171 [main] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: house
2171 [main] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: users
2203 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - table found: EPET.STREET
2203 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - columns: [district_id, name, id]
2203 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - foreign keys: []
2203 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - indexes: []
2203 [main] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: house
2203 [main] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: users
2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table jbit.house (id number(10,0) not null, user_id number(10,0) not null, type_id number(10,0) not null, street_id number(10,0) not null, title varchar2(50 char), description clob, price double precision, pubdate timestamp, floorage number(10,0), contact varchar2(10 char), primary key (id))
2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-01918: 用户 'JBIT' 不存在

2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table jbit.users (id number(10,0) not null, name varchar2(50 char) not null, password varchar2(50 char) not null, telephone varchar2(12 char), username varchar2(50 char), isadmin varchar2(2 char), primary key (id))
2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-01918: 用户 'JBIT' 不存在

2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table jbit.house add constraint FK5EDC7203DFEF63B foreign key (user_id) references jbit.users
2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-00942: 表或视图不存在

2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table jbit.house add constraint FK5EDC72013EA8BDB foreign key (type_id) references housetype
2203 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-00942: 表或视图不存在

2218 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table jbit.house add constraint FK5EDC7208FF856FB foreign key (street_id) references street
2218 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-00942: 表或视图不存在

2218 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table street add constraint FKCAD5500328C722DB foreign key (district_id) references district
2218 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - ORA-02268: 引用的表不具有主键

2218 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - schema update complete
Hibernate: select street0_.id as id2_, street0_.district_id as district2_2_, street0_.name as name2_ from street street0_
Hibernate: select district0_.id as id1_0_, district0_.name as name1_0_ from district district0_ where district0_.id=?
Hibernate: select district0_.id as id1_0_, district0_.name as name1_0_ from district district0_ where district0_.id=?
Hibernate: select streets0_.district_id as district2_1_, streets0_.id as id1_, streets0_.id as id2_0_, streets0_.district_id as district2_2_0_, streets0_.name as name2_0_ from street streets0_ where streets0_.district_id=?
Hibernate: select streets0_.district_id as district2_1_, streets0_.id as id1_, streets0_.id as id2_0_, streets0_.district_id as district2_2_0_, streets0_.name as name2_0_ from street streets0_ where streets0_.district_id=?
2609 [main] INFO org.hibernate.impl.SessionFactoryImpl - closing
2609 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:oracle:thin:@localhost:1521:orcl
Exception in thread "main" java.lang.ClassCastException: cn.jbit.houserent.bean.Street
 at cn.lp.hibernate.one2many.TestHQL.main(TestHQL.java:27)

 

跪求!!!!!
原创粉丝点击