<property name="generateDdl" value="true" />时,报表或视图不存在

解决Oracle表未生成问题

基于jpa作为持久层,开发项目的时候,在bean.xml的文件中的数据源配置中设置了

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="jpaVendorAdapter">
			<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
				<property name="database" value="ORACLE" />
				<property name="showSql" value="true" />
				<property name="generateDdl" value="true" />
			</bean>
		</property>
	</bean>

 一般情况下,会在项目启动的过程中,自动检查注解的实体和数据表,如果数据库不存在的标,会根据实体自动生成,但是,今天,遇到了一个奇怪的一个问题,表始终 没有生成,因此,在其他表应用本来须要生成的表的时候,总是报表或视图找不到的错如:

 

2011-05-06 09:45:56 [org.hibernate.tool.hbm2ddl.SchemaUpdate]-[ERROR] Unsuccessful: alter table r_role_x_menu add constraint FK474DC862E1A553E2 foreign key (menu_id) references p_menu 
2011-05-06 09:45:56 [org.hibernate.tool.hbm2ddl.SchemaUpdate]-[ERROR] ORA-00942: 表或视图不存在 

 

 

解决方案:

 

查看其他的同一表空间的其他用户下是否有相同的的表,如果存在,有的话删除即可,其实避免这种情况的根本方法是,给Oracle用户都指定一个自定义的表空间,不要使用Users表空间。

<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>RouteSettingWidget</class> <widget class="QWidget" name="RouteSettingWidget"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>1024</width> <height>682</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_4"> <item> <widget class="QGroupBox" name="groupBox"> <property name="title"> <string>当前主要用来选取X轴,Y轴坐标值,默认俯视图</string> </property> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,0"> <item> <widget class="pclTaskWidget" name="verticalView" native="true"/> </item> <item> <widget class="QGroupBox" name="groupBox_3"> <property name="title"> <string>视图选择</string> </property> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QRadioButton" name="verticalVViewRadio"> <property name="text"> <string>俯视图</string> </property> <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> <widget class="QRadioButton" name="upVViewRadio"> <property name="text"> <string>仰视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="frontVViewRadio"> <property name="text"> <string>正(前)视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="backVViewRadio"> <property name="text"> <string>后视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="rightVViewRadio"> <property name="text"> <string>右视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="leftVViewRadio"> <property name="text"> <string>左视图</string> </property> </widget> </item> <item> <widget class="QPushButton" name="resetVView"> <property name="text"> <string>复位</string> </property> </widget> </item> </layout> </widget> </item> </layout> </widget> </item> 注释上述代码
09-13
<?xml version="1.0" encoding="gbk"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <import resource="classpath:/nc/ui/fdcpr/uipub/view/config/ServiceCenterBillManage.xml" /> <bean id="billType" class="java.lang.String"> <constructor-arg value="H33K" /> </bean> <bean id="headVoClassName" class="java.lang.String"> <constructor-arg value="nc.vo.fdcprcm.feelist.CmFeeListVO" /> </bean> <bean id="mnyNumFldInfoClassName" class="java.lang.String"> <constructor-arg value="nc.vo.fdcprcm.feelist.FeeListMnyNumFldInfo" /> </bean> <bean id="bodyVoClassName" class="java.util.ArrayList"> <constructor-arg> <list> </list> </constructor-arg> </bean> <bean id="aggVoName" class="java.lang.String"> <constructor-arg value="nc.vo.fdcprcm.feelist.AggCmFeeListVO" /> </bean> <!-- 自定义项配置,目前区分卡片显示还是列显示,减小重复配置 --> <bean id="userdefQueryParam" class="java.util.ArrayList"> <constructor-arg> <list> <bean class="nc.ui.uif2.editor.UserdefQueryParam"> <property name="mdfullname" value="fdcprcm.CmFeeListVO" /> <property name="pos" value="0" /> <property name="prefix" value="vdef" /> </bean> </list> </constructor-arg> </bean> <!-- 数量金额精度换算字段配置 --> <!-- 查询条件初始化 --> <bean id="qryCondInitializer" class="nc.ui.fdcprcm.feelist.query.FeeListQueryConditionInitializer" > <property name="serviceCenterField" ref="serviceCenterField"/> </bean> <!-- ? --> <bean id="pageQueryService" class="nc.ui.fdcpr.uipub.pagination.JZFDCUIPageQueryService"> <property name="allPagePkQueryServiceMethod" value="nc.itf.fdcprcm.feelist.IFeeCalculation.queryPKs"></property> <property name="dataOfPksQueryServiceMethod" value="nc.itf.fdcprcm.feelist.IFeeCalculation.queryBillByPK"></property> <property name="headVoClassName" ref="headVoClassName"></property> <property name="aggVoName" ref="aggVoName"></property> </bean> <!-- 费用计算--> <bean id="feeCalcAction" class="nc.ui.fdcprcm.feelist.action.FeeCalculateAction"> <property name="dialog" ref="feeCalcDlg" /> <property name="paginationModel" ref="paginationModel" /> <property name="context" ref="context" /> </bean> <!-- 修改--> <bean id="editAction" class="nc.ui.pubapp.uif2app.actions.EditAction"> <property name="model" ref="manageAppModel" /> <property name="interceptor" ref="showCardInterceptor" /> </bean> <!-- 生成账单按钮 --> <bean id="generateBillsAction" class="nc.ui.fdcprcm.feelist.action.GenerateBillsAction"> <property name="model" ref="manageAppModel" /> <property name="billForm" ref="billFormEditor" /> </bean> <!-- 生成应收单按钮 --> <bean id="generateArapRecBillAction" class="nc.ui.fdcprcm.feelist.action.GenerateArapRecBillAction"> <property name="model" ref="manageAppModel" /> <property name="billForm" ref="billFormEditor" /> </bean> <bean id="feeCalcDlg" class="nc.ui.fdcprcm.feelist.dlg.FeeCalcChooseDlg"> <constructor-arg ref="container" /> <constructor-arg ref="context" /> </bean> <!-- 列视图 --> <bean id="listView" class="nc.ui.fdcpr.uipub.view.JZFDCShowUpableBillListView" init-method="initUI"> <property name="paginationBar" ref="paginationBar" /> <property name="model" ref="manageAppModel" /> <property name="templateContainer" ref="templateContainer" /> <property name="multiSelectionMode" value="1" /> <property name="showTotalLine" value="true" /> <!-- 列自定义项处理 --> <property name="userdefitemListPreparator"> <bean class="nc.ui.fdcpr.uipub.view.prepare.JZFDCCompositeBillListDataPrepare"> <property name="billListDataPrepares"> <list> <ref bean="userdefitemlistPreparator" /> </list> </property> </bean> </property> </bean> <bean id="billFormEditor" class="nc.ui.fdcprcm.bd.sevrecord.view.FeeListBillForm" init-method="initUI"> <property name="model" ref="manageAppModel"></property> <property name="templateContainer" ref="templateContainer" /> <property name="billOrgPanel" ref="serciveCenterPanel" /> <property name="showOrgPanel" value="true" /> <!-- 是否自动增行 --> <property name="autoAddLine" value="false" /> <!-- 卡片自定义项处理 --> <property name="userdefitemPreparator"> <bean class="nc.ui.fdcpr.uipub.view.prepare.JZFDCCompositeBillDataPrepare"> <property name="billDataPrepares"> <list> <ref bean="userdefitemPreparator" /> </list> </property> </bean> </property> </bean> <!-- 列显示下的按钮 --> <bean id="actionsOfListBase" class="nc.ui.fdcpr.uipub.action.container.JZFDCStandAloneToftPanelActionContainer"> <constructor-arg ref="listView" /> <property name="model" ref="manageAppModel" /> <property name="actions"> <list> <ref bean="deleteAction" /> <ref bean="queryAction" /> <ref bean="refreshAction" /> <ref bean="separatorAction" /> <ref bean="feeCalcAction" /> <ref bean="separatorAction" /> <ref bean="commitMenuAction" /> <ref bean="auditMenuAction" /> <ref bean="assistMenuAction" /> <ref bean="linkMenuAction" /> <ref bean="printMenuAction" /> <ref bean="separatorAction" /> <ref bean="generateBillsAction" /> <ref bean="separatorAction" /> <ref bean="generateArapRecBillAction" /> </list> </property> </bean> <!-- 卡片显示下的按钮 --> <bean id="actionsOfCardBase" class="nc.ui.fdcpr.uipub.action.container.JZFDCStandAloneToftPanelActionContainer"> <constructor-arg ref="billFormEditor" /> <property name="model" ref="manageAppModel" /> <!-- 此处配置的Action浏览态始终可见 --> <property name="actions"> <list> <ref bean="queryAction" /> <ref bean="editAction" /> <ref bean="cardRefreshAction" /> <ref bean="separatorAction" /> <ref bean="commitMenuAction" /> <ref bean="auditMenuAction" /> <ref bean="assistMenuAction" /> <ref bean="linkMenuAction" /> <ref bean="printMenuAction" /> <ref bean="separatorAction" /> <ref bean="generateBillsAction" /> <ref bean="separatorAction" /> <ref bean="generateArapRecBillAction" /> </list> </property> <!-- 此处配置的Action编辑态始终可见 --> <property name="editActions"> <list> <ref bean="saveAction" /> <ref bean="separatorAction" /> <ref bean="cancelAction" /> </list> </property> </bean> </beans> 单据 XML代码,如何找到错误代码的 文件名?
最新发布
10-14
为以下代码注释:<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ChangeListManager"> <list default="true" id="0fdc712c-b442-48b5-b5ec-72c0e9b163ca" name="Default Changelist" comment="" /> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="LAST_RESOLUTION" value="IGNORE" /> </component> <component name="ProjectId" id="2QVuimGepuP2YY8QMsZ0qPrP6Yt" /> <component name="ProjectViewState"> <option name="hideEmptyMiddlePackages" value="true" /> <option name="showLibraryContents" value="true" /> </component> <component name="PropertiesComponent"> <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> <property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="WebServerToolWindowFactoryState" value="false" /> <property name="aspect.path.notification.shown" value="true" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="settings.editor.selected.configurable" value="preferences.lookFeel" /> </component> <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> <component name="TaskManager"> <task active="true" id="Default" summary="Default task"> <changelist id="0fdc712c-b442-48b5-b5ec-72c0e9b163ca" name="Default Changelist" comment="" /> <created>1685451198775</created> <option name="number" value="Default" /> <option name="presentableId" value="Default" /> <updated>1685451198775</updated> <workItem from="1685451199972" duration="592000" /> <workItem from="1685453362061" duration="917000" /> </task> <servers /> </component> <component name="TypeScriptGeneratedFilesManager"> <option name="version" value="3" /> </component> </project>
05-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值