java序列不存在错误_关于异常ORA-02289: 序列不存在的解决办法

而RCP中我们要添加在runtime的classpath中,如许RCP才调辨认出来。

那解决规划:

1.选择Runtime页面

2.查看右侧的classpath

3.点击add按钮,添加第三方的jar

霸占科学堡垒,就像兵戈一样,总会有人就义,有人受伤,我要为科学而献身。Java开辟过程中有很多异常,并且同一种异常的原因也不一样,这是我在开辟EJB+JPA+Oracle的时辰碰到的一个题目。

人生应为生活生计而食,不该为食而生活生计。

09:25:42,275 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

09:25:42,278 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container

09:25:42,285 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.util.List com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.getPartitions()

09:25:42,297 WARN [InterceptorRegistry] applicable interceptors is non-existent for public com.xtfggef.blog.bbs.bean.Partition com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.getPartition(java.lang.Integer)

09:25:42,304 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.save(com.xtfggef.blog.bbs.bean.Partition)

09:25:42,315 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.(java.lang.Integer)

09:25:42,319 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.(com.xtfggef.blog.bbs.bean.Partition)

09:25:42,324 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.util.List com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.getPartitions()

09:25:42,329 WARN [InterceptorRegistry] applicable interceptors is non-existent for public com.xtfggef.blog.bbs.bean.Partition com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.getPartition(java.lang.Integer)

09:25:42,334 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.save(com.xtfggef.blog.bbs.bean.Partition)

09:25:42,338 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.(java.lang.Integer)

09:25:42,343 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.xtfggef.blog.bbs.eao.impl.PartitionEaoBean.(com.xtfggef.blog.bbs.bean.Partition)

09:25:43,659 WARN [JDBCExceptionReporter] SQL Error: 2289, SQLState: 42000

09:25:43,660 ERROR [JDBCExceptionReporter] ORA-02289: 序列不存在

解决办法:在persistence.xml文件里加上就行了

固然每小我碰到的原因可能不一样,然则我的就如许解决了。罗蒙诺索夫

hibernate配置属性中,hibernate.hbm2ddl.auto可以帮助你实现正向工程,即由java代码生成数据库脚本,进而生成具体的表结构.

在hibernate.cfg.xml中:

Java代码

它包含4个属性:

create : 会根据你的model类来生成表,但是每次运行都会删除上一次的表,重新生成表,哪怕2次没有任何改变

create-drop : 根据model类生成表,但是sessionFactory一关闭,表就自动删除

update : 最常用的属性,也根据model类生成表,即使表结构改变了,表中的行仍然存在,不会删除以前的行

validate : 只会和数据库中的表进行比较,不会创建新表,但是会插入新值

下面是个老外写的文章,大家可以看看

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值