`
iRoger
  • 浏览: 29375 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

关于ORA-00942: 表或视图不存在

    博客分类:
  • jBPM
阅读更多

最近在研究如何将jbpm与SSH整合起来用,虽然对jbpm也是刚开始研究,找了个现有的SSH+jbpm的项目来看,原有的项目是使用mssql的,我在oracle中将表同样建立起来了,修改了hibernate的配置,但运行起来就出问题了,不知有没高人能解决或给点建议,下面我贴出我的配置及数据库信息,最后放上原项目。

 

首先是错误信息:

2008-9-18 15:17:00 org.apache.catalina.startup.Catalina start
信息: Server startup in 9898 ms
Hibernate: select tbuser0_.user_id as user1_36_, tbuser0_.user_name as user2_36_, tbuser0_.user_password as user3_36_, tbuser0_.user_type as user4_36_ from tb_user tbuser0_ where tbuser0_.user_name='boss' and tbuser0_.user_password='123'
Hibernate: select tbbaoxiaos0_.user_id as user2_1_, tbbaoxiaos0_.baoxiao_id as baoxiao1_1_, tbbaoxiaos0_.baoxiao_id as baoxiao1_34_0_, tbbaoxiaos0_.user_id as user2_34_0_, tbbaoxiaos0_.baoxiao_title as baoxiao3_34_0_, tbbaoxiaos0_.baoxiao_memo as baoxiao4_34_0_, tbbaoxiaos0_.baoxiao_date as baoxiao5_34_0_, tbbaoxiaos0_.baoxiao_flag as baoxiao6_34_0_ from tb_baoxiao tbbaoxiaos0_ where tbbaoxiaos0_.user_id=?
Hibernate: select tbapproves0_.user_id as user2_1_, tbapproves0_.approve_id as approve1_1_, tbapproves0_.approve_id as approve1_33_0_, tbapproves0_.user_id as user2_33_0_, tbapproves0_.baoxiao_id as baoxiao3_33_0_, tbapproves0_.approve_result as approve4_33_0_, tbapproves0_.approve_memo as approve5_33_0_, tbapproves0_.approve_date as approve6_33_0_ from tb_approve tbapproves0_ where tbapproves0_.user_id=?
Hibernate: select taskinstan0_.ID_ as ID1_27_, taskinstan0_.NAME_ as NAME3_27_, taskinstan0_.DESCRIPTION_ as DESCRIPT4_27_, taskinstan0_.ACTORID_ as ACTORID5_27_, taskinstan0_.CREATE_ as CREATE6_27_, taskinstan0_.START_ as START7_27_, taskinstan0_.END_ as END8_27_, taskinstan0_.DUEDATE_ as DUEDATE9_27_, taskinstan0_.PRIORITY_ as PRIORITY10_27_, taskinstan0_.ISCANCELLED_ as ISCANCE11_27_, taskinstan0_.ISSUSPENDED_ as ISSUSPE12_27_, taskinstan0_.ISOPEN_ as ISOPEN13_27_, taskinstan0_.ISSIGNALLING_ as ISSIGNA14_27_, taskinstan0_.ISBLOCKING_ as ISBLOCKING15_27_, taskinstan0_.TASK_ as TASK16_27_, taskinstan0_.TOKEN_ as TOKEN17_27_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN18_27_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM19_27_ from JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.ACTORID_=? and taskinstan0_.ISSUSPENDED_<>1 and taskinstan0_.ISOPEN_=1
Hibernate: select distinct taskinstan2_.ID_ as ID1_27_, taskinstan2_.NAME_ as NAME3_27_, taskinstan2_.DESCRIPTION_ as DESCRIPT4_27_, taskinstan2_.ACTORID_ as ACTORID5_27_, taskinstan2_.CREATE_ as CREATE6_27_, taskinstan2_.START_ as START7_27_, taskinstan2_.END_ as END8_27_, taskinstan2_.DUEDATE_ as DUEDATE9_27_, taskinstan2_.PRIORITY_ as PRIORITY10_27_, taskinstan2_.ISCANCELLED_ as ISCANCE11_27_, taskinstan2_.ISSUSPENDED_ as ISSUSPE12_27_, taskinstan2_.ISOPEN_ as ISOPEN13_27_, taskinstan2_.ISSIGNALLING_ as ISSIGNA14_27_, taskinstan2_.ISBLOCKING_ as ISBLOCKING15_27_, taskinstan2_.TASK_ as TASK16_27_, taskinstan2_.TOKEN_ as TOKEN17_27_, taskinstan2_.SWIMLANINSTANCE_ as SWIMLAN18_27_, taskinstan2_.TASKMGMTINSTANCE_ as TASKMGM19_27_ from JBPM_POOLEDACTOR pooledacto0_, JBPM_TASKACTORPOOL taskinstan1_, JBPM_TASKINSTANCE taskinstan2_ where pooledacto0_.ID_=taskinstan1_.POOLEDACTOR_ and taskinstan1_.TASKINSTANCE_=taskinstan2_.ID_ and pooledacto0_.ACTORID_=? and (taskinstan2_.ACTORID_ is null) and taskinstan2_.ISSUSPENDED_<>1 and taskinstan2_.ISOPEN_=1
Hibernate: select taskinstan0_.ID_ as ID1_27_, taskinstan0_.NAME_ as NAME3_27_, taskinstan0_.DESCRIPTION_ as DESCRIPT4_27_, taskinstan0_.ACTORID_ as ACTORID5_27_, taskinstan0_.CREATE_ as CREATE6_27_, taskinstan0_.START_ as START7_27_, taskinstan0_.END_ as END8_27_, taskinstan0_.DUEDATE_ as DUEDATE9_27_, taskinstan0_.PRIORITY_ as PRIORITY10_27_, taskinstan0_.ISCANCELLED_ as ISCANCE11_27_, taskinstan0_.ISSUSPENDED_ as ISSUSPE12_27_, taskinstan0_.ISOPEN_ as ISOPEN13_27_, taskinstan0_.ISSIGNALLING_ as ISSIGNA14_27_, taskinstan0_.ISBLOCKING_ as ISBLOCKING15_27_, taskinstan0_.TASK_ as TASK16_27_, taskinstan0_.TOKEN_ as TOKEN17_27_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN18_27_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM19_27_ from JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.ACTORID_='4'
Hibernate: select message0_.ID_ as ID1_26_, message0_.DESTINATION_ as DESTINAT3_26_, message0_.EXCEPTION_ as EXCEPTION4_26_, message0_.ISSUSPENDED_ as ISSUSPEN5_26_, message0_.TOKEN_ as TOKEN6_26_, message0_.TEXT_ as TEXT7_26_, message0_.ACTION_ as ACTION8_26_, message0_.NODE_ as NODE9_26_, message0_.TRANSITIONNAME_ as TRANSIT10_26_, message0_.TASKINSTANCE_ as TASKINS11_26_, message0_.CLASS_ as CLASS2_26_ from JBPM_MESSAGE message0_ where message0_.DESTINATION_=? and message0_.ISSUSPENDED_<>1 and (message0_.EXCEPTION_ is null)
2008-9-18 15:25:14 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet action threw exception
java.sql.SQLException: ORA-00942: 表或视图不存在

	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
	at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
	at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
	at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
	at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
	at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
	at org.hibernate.loader.Loader.doQuery(Loader.java:662)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
	at org.hibernate.loader.Loader.doList(Loader.java:2150)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
	at org.hibernate.loader.Loader.list(Loader.java:2024)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
	at org.jbpm.db.MessagingSession.findMessages(MessagingSession.java:103)
	at com.business.BaoxiaoBus.findUserMessageByUsername(BaoxiaoBus.java:162)
	at com.struts.action.TasklistAction.execute(TasklistAction.java:59)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.workflow.servlet.ChinaFilter.doFilter(ChinaFilter.java:23)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)

 在是我的hibernate配置信息:

<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>

	<!-- jdbc connection properties-->

	<property name="connection.pool.size">3</property>
	<property name="show_sql">true</property>

	<property name="hibernate.cache.provider_class">
		org.hibernate.cache.HashtableCacheProvider
	</property>
	<property name="hbm2ddl.auto">update</property>

	<property name="hibernate.show_sql">true</property>
	<!-- ############################################ -->
	<!-- # mapping files with external dependencies # -->
	<!-- ############################################ -->

	<!-- following mapping file has a dependendy on   -->
	<!-- 'bsh-{version}.jar'.                         -->
	<!-- uncomment this if you don't have bsh on your -->
	<!-- classpath.  you won't be able to use the     -->
	<!-- script element in process definition files   -->
	<property name="myeclipse.connection.profile">Oracle</property>
	<property name="connection.url">
		jdbc:oracle:thin:@192.168.162.202:1521:TEST
	</property>
	<property name="connection.username">system</property>
	<property name="connection.password">test</property>
	<property name="connection.driver_class">
		oracle.jdbc.driver.OracleDriver
	</property>
	<property name="dialect">
		org.hibernate.dialect.Oracle9Dialect
	</property>
	<mapping resource="org/jbpm/graph/action/Script.hbm.xml" />

	<!-- following mapping files have a dependendy on  -->
	<!-- 'jbpm-identity-{version}.jar', mapping files  -->
	<!-- of the pluggable jbpm identity component.     -->
	<!-- comment out the following 3 lines if you don't-->
	<!-- want to use the default jBPM identity mgmgt   -->
	<!-- component                                     -->
	<mapping resource="org/jbpm/identity/User.hbm.xml" />
	<mapping resource="org/jbpm/identity/Group.hbm.xml" />
	<mapping resource="org/jbpm/identity/Membership.hbm.xml" />

	<!-- ###################### -->
	<!-- # jbpm mapping files # -->
	<!-- ###################### -->

	<!-- hql queries and type defs -->
	<mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />

	<!-- graph.def mapping files -->
	<mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Node.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Transition.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Event.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Action.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/SuperState.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml" />
	<mapping resource="org/jbpm/instantiation/Delegation.hbm.xml" />

	<!-- graph.node mapping files -->
	<mapping resource="org/jbpm/graph/node/StartState.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/EndState.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/Decision.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/Fork.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/Join.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/State.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml" />

	<!-- context.def mapping files -->
	<mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml" />
	<mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml" />

	<!-- taskmgmt.def mapping files -->
	<mapping
		resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml" />

	<!-- module.def mapping files -->
	<mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml" />

	<!-- bytes mapping files -->
	<mapping resource="org/jbpm/bytes/ByteArray.hbm.xml" />

	<!-- file.def mapping files -->
	<mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml" />

	<!-- scheduler.def mapping files -->
	<mapping
		resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml" />
	<mapping
		resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml" />

	<!-- graph.exe mapping files -->
	<mapping resource="org/jbpm/graph/exe/Comment.hbm.xml" />
	<mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml" />
	<mapping resource="org/jbpm/graph/exe/Token.hbm.xml" />
	<mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml" />

	<!-- module.exe mapping files -->
	<mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml" />

	<!-- context.exe mapping files -->
	<mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml" />
	<mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml" />
	<mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml" />

	<!-- msg.db mapping files -->
	<mapping resource="org/jbpm/msg/Message.hbm.xml" />
	<mapping resource="org/jbpm/msg/db/TextMessage.hbm.xml" />
	<mapping resource="org/jbpm/command/ExecuteActionCommand.hbm.xml" />
	<mapping resource="org/jbpm/command/ExecuteNodeCommand.hbm.xml" />
	<mapping resource="org/jbpm/command/SignalCommand.hbm.xml" />
	<mapping resource="org/jbpm/command/TaskInstanceEndCommand.hbm.xml" />

	<!-- taskmgmt.exe mapping files -->
	<mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml" />

	<!-- scheduler.exe mapping files -->
	<mapping resource="org/jbpm/scheduler/exe/Timer.hbm.xml" />

	<!-- logging mapping files -->
	<mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml" />
	<mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml" />
	<mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml" />
	<mapping
		resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml" />
	<mapping resource="com/po/TbApprove.hbm.xml" />
	<mapping resource="com/po/TbBaoxiao.hbm.xml" />
	<mapping resource="com/po/TbBaoxiaoItem.hbm.xml" />
	<mapping resource="com/po/TbUser.hbm.xml" />
</session-factory>
</hibernate-configuration>

 

 再则是数据库:

--用户表
create table tb_user(
	user_id			int primary key identity(1,1),--用户ID
	user_name		varchar(30),--用户名
	user_password		varchar(30),--密码
	user_type		int --用户类型(0为普通用户,1为主管,2为老板,3为财务人员)
)
go
--报销表
create table tb_baoxiao(
	baoxiao_id		int primary key identity(1,1),
	baoxiao_title		varchar(30),--报销主题
	baoxiao_memo		varchar(30),--备注
	user_id			int,--报销人
	baoxiao_date		datetime, --报销时间
	baoxiao_flag		bit	--报销状态(0为未处理,1为已处理)
)
go
--报销项目表
create table tb_baoxiao_item(
	item_id			int primary key identity(1,1),
	item_name		varchar(30),--项目名称
	item_money		varchar(100),--项目金额
	baoxiao_id		int --报销表ID
)
go
--审核意见表
create table tb_approve(
	approve_id		int primary key identity(1,1),
	user_id			int,--审核人ID
	baoxiao_id		int,--报销表ID
	approve_result		varchar(30),--审核结果
	approve_memo		varchar(30),--审核意见
	approve_date		datetime --审核日期
)
go

--为报销表添加外键
alter table tb_baoxiao add CONSTRAINT baoxiao_foreign_key foreign key (user_id) references tb_user(user_id)
go

--为报销项目表添加外键
alter table tb_baoxiao_item add CONSTRAINT baoxiao_item_foreign_key foreign key (baoxiao_id) references tb_baoxiao(baoxiao_id)
go

--为审核意见表添加外键
alter table tb_approve add CONSTRAINT approve_user_foreign_key foreign key (user_id) references tb_user(user_id)
go

alter table tb_approve add CONSTRAINT approve_baoxiao_foreign_key foreign key (baoxiao_id) references tb_baoxiao(baoxiao_id)
go

 该数据库是其自带的,我已经在oracle中重新建立。

希望有朋友可以帮忙解答分析一下,谢谢

抱歉项目有29MB无法上传,需要的朋友留email

分享到:
评论

相关推荐

    如何处理错误ORA-29275:部分多字节字符

    该错误的出现意味着在查询结果中存在一些多字节字符(通常是汉字或其他非英文字符)未能正确读取或解析,导致数据不完整或者格式异常。 #### 错误原因分析 在深入探讨解决方案之前,我们首先需要了解ORA-29275错误...

    Oracle 授权 ORA-00990: 权限缺失或无效

    - 权限被撤销或者权限的依赖关系存在问题,例如某个表依赖的序列或同义词权限丢失。 2. **解决步骤**: - 验证用户是否拥有正确的角色:检查用户是否已分配了能够执行特定操作的角色,如DBA、CONNECT或RESOURCE。...

    使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查

    此错误表明无法打开指定的日志文件,通常是由于日志文件路径不可访问、文件不存在或权限不足等原因造成的。 #### ORA-29283: invalid file operation 此错误通常与文件系统操作有关,比如试图读取或写入一个不存在...

    创建物化视图ORA-12014错误解决方法

    1. **基表不支持ROWID**:如果基表(即物化视图基于的表)没有定义主键或唯一索引,或者表结构不支持ROWID,则不能创建包含ROWID的物化视图。 2. **列类型限制**:某些列类型不支持ROWID。例如,LOB类型的数据列就...

    oracle ora-各种常见java.sql.SQLException归纳

    ORA-00942: 表或者视图不存在 ORA-00942 是另一个常见的错误信息,通常发生在 SQL 语句中引用了一个不存在的表名或视图名。这种错误通常是由于开发者在编写 SQL 语句时,忘记了某个表名或视图名,导致 Oracle 无法...

    ora-01720 授权选项对于'xxxx'不存在的解决方法

    ### ora-01720 授权选项对于'xxxx'不存在的解决方法 #### 背景介绍 在Oracle数据库管理中,权限管理和授予是非常重要的一个环节。它确保了数据的安全性和访问控制的有效性。然而,在进行权限授予时可能会遇到各种...

    oracle常见错误号

    9. ORA-00942:table or view does not exist - 表或视图不存在。确保表或视图已创建,并且拼写和大小写正确。 10. ORA-12560:TNS:protocol adapter error - 连接问题,可能是网络问题、配置错误或监听器问题。...

    ORACLE ORA-00132 ORA-00214

    ORA-00132错误通常出现在网络配置不正确或数据库实例无法通过网络名识别目标数据库的情况。此错误表明Oracle在尝试解析数据库服务名时遇到了语法错误或者未能找到对应的网络配置。 ##### 2. 产生原因 - **网络配置...

    Oracle删除表、字段之前判断表、字段是否存在

    ORA-00942:表或视图不存在 若在程序中执行该语句则会报异常,这就需要我们在删除表前先判断该表是否存在,若存在则删除. DECLARE num NUMBER; BEGIN SELECT COUNT(1) INTO num FROM USER_TABLES WHERE TABLE_NAME = ...

    ORA错误中文描述(包括所有)

    当尝试访问不存在的模式对象(如表、视图等)时,会出现此错误。可能的原因是对象被误删除,或者是查询语句中的对象名称拼写错误。 #### ORA-00025: 无法打开数据库 此错误表示数据库无法正常启动或打开。常见的...

    oracle+ora-各种常见java.sq

    - `java.sql.SQLException: ORA-00942: table or view does not exist`: 查询的表或视图不存在。核实表名或视图名的拼写和大小写,以及是否有访问权限。 6. **并发问题** - `java.sql.SQLException: ORA-00054: ...

    oracle常用命令及错误类型(error message)

    7. ORA-00942:表或视图不存在 - 解决:检查表或视图名称的拼写,确保它们在当前模式中存在。 8. ORA-29913:执行失败 - 解决:检查PL/SQL过程或函数的调用语法,确保参数正确传递。 9. ORA-01555:快照过旧 - ...

    oracle 错误码

    ### Oracle 错误码详解(ORA-02001 至 ORA-02107) 在Oracle数据库管理过程中,经常会遇到各种错误码,这些错误码是Oracle系统为帮助用户快速定位问题而设计的一套编码体系。下面将详细介绍从ORA-02001至ORA-02107...

    expdp 中ORA-39002、ORA-39070错误详解及解决办法

    当执行expdp命令时遇到ORA-39070错误,通常是因为指定的目录在操作系统中不存在。该错误信息“无法打开日志文件”暗示了在尝试创建或写入日志文件时,操作系统无法找到所指定的目录路径。此时,需要检查Oracle数据库...

    springboot-quartz-elasticsearch

    如果项目包含SQL,那可能涉及到数据初始化或数据库操作,这些操作可能与Quartz任务的触发或结果有关。 这个项目对于学习和理解如何在实际环境中使用Spring Boot、Quartz和Elasticsearch非常有帮助。开发者可以从中...

    《转载》ora-00020超出最大进程数

    在Oracle数据库系统中,"ORA-00020 超出最大进程数"是一个常见的错误,通常出现在用户尝试创建新的会话或进程时,但数据库已经达到了其配置的最大进程限制。这个错误可能会影响到数据库的正常运行,阻止用户执行查询...

    ORACLE错误码及解决方法

    错误码ORA-00903表示尝试在不存在的表中创建索引,这意味着你可能输入了错误的表名。解决方法是核对表名的拼写和大小写,确保其存在于数据库中。 错误码ORA-00904表示尝试引用一个不存在的列,这通常是由于列名输入...

    Drop goldengate用户时报ORA-00604 ORA-20782 ORA-06512问题解决

    ### 解决Drop Goldengate 用户时报ORA-00604 ORA-20782 ORA-06512问题 #### 一、问题背景与现象 在进行Oracle数据库管理过程中,经常会遇到需要删除用户的场景。当尝试执行`drop user goldengate cascade;`命令时,...

    ORACLE 错误一览表part1

    7. ORA-00942: 表或视图不存在 这意味着尝试访问的表或视图在当前用户或指定的模式下找不到。确认表名和模式名的拼写,以及用户是否有足够的权限访问。 8. ORA-01017: 身份验证失败 登录时提供的用户名或密码不正确...

    oracle 错误一览表

    - **描述**:不支持对字典管理的表/视图进行DML操作。 - **解决方法**:使用本地管理的表空间或禁用字典管理。 #### ORA-00056: '.' not allowed in object names for non-default schemas - **描述**:在非默认...

Global site tag (gtag.js) - Google Analytics