hibernate的问题
大侠们好,我在hibernate环境下写了个main()方法此方法是对数据表的记录进行删除操作。方法执行时,可以正常删除数据记录。但是在执行的此方法的时候却报了两个有关数据库的错误:请问哪位大侠能给偶指点一下呢,谢谢
DEBUG [main] - using pooled JDBC connection, pool size: 0
DEBUG [main] - drop table scott.EVENTS if exists
DEBUG [main] - Unsuccessful: drop table scott.EVENTS if exists
DEBUG [main] - ORA-00933: SQL 命令未正确结束
DEBUG [main] - create table scott.EVENTS (EVENT_ID integer generated by default as identity (start with 1), EVENT_DATE timestamp, title varchar(255), primary key (EVENT_ID))
ERROR [main] - Unsuccessful: create table scott.EVENTS (EVENT_ID integer generated by default as identity (start with 1), EVENT_DATE timestamp, title varchar(255), primary key (EVENT_ID))
ERROR [main] - ORA-00907: 缺少右括号
INFO [main] - schema export complete
DEBUG [main] - returning connection to pool, pool size: 1
DEBUG [main] - Checking 0 named HQL queries
--------------product.hbm.xml的配置文件:---------
<hibernate-mapping package="com.sessionfactory">
<class name="Product" table="EVENTS">
<id name="id" column="EVENT_ID">
<generator class="native" />
</id>
<property name="id" type="int" column="EVENT_ID" insert="false" update="false"/>
<property name="date" type="timestamp" column="EVENT_DATE" />
<property name="title" />
</class>
</hibernate-mapping>
--------------------hibernate的配置文件:------------
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:KNOWN</property>
<property name="hibernate.connection.username">scott</property>
<property name="hibernate.connection.password">tiger</property>
<property name="hibernate.default_schema">scott</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<!-- JDBC连接池(内置的) -->
<property name="connection.pool_size">1</property>
<!-- SQL语句的方言 -->
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>
<mapping resource="resources/Product.hbm.xml"/>
</session-factory>
[解决办法]
hibernate没有关闭,右括号少了一个
[解决办法]
信息不太全。不过从log里面可以看出来一些。