xingzhi 发表于 2018-7-16 14:16:10

数据库导入 修改后 同步数据库报错

本帖最后由 xingzhi 于 2018-7-17 18:17 编辑

数据库导入后 修改字段同步数据库报错

admin 发表于 2018-7-16 15:30:25

请按照发帖要求补充版本号等信息

xingzhi 发表于 2018-7-17 18:15:46

admin 发表于 2018-7-16 15:30 static/image/common/back.gif
请按照发帖要求补充版本号等信息

版本是3.7.6jeecgOracle数据库

xingzhi 发表于 2018-7-30 16:17:53

Hibernate: alter tableTQP_QTYSTD_NKDROP COLUMN C_STATUS
SQL Error: 904, SQLState: 42000
ORA-00904: "C_STATUS": 标识符无效

ORA-00904: "C_STATUS": 标识符无效

org.hibernate.exception.SQLGrammarException: ORA-00904: "C_STATUS": 标识符无效

        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:122)
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
        at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
        at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
        at com.sun.proxy.$Proxy143.executeUpdate(Unknown Source)
        at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:916)
        at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:909)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:644)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:909)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:980)
        at org.jeecgframework.core.common.dao.impl.GenericBaseCommonDao.executeSql(GenericBaseCommonDao.java:933)
        at org.jeecgframework.core.common.service.impl.CommonServiceImpl.executeSql(CommonServiceImpl.java:395)
        at org.jeecgframework.web.cgform.service.impl.config.CgFormFieldServiceImpl.dbSynch(CgFormFieldServiceImpl.java:229)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
        at com.sun.proxy.$Proxy107.dbSynch(Unknown Source)
        at org.jeecgframework.web.cgform.controller.config.CgFormHeadController.doDbSynch(CgFormHeadController.java:284)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
这个是另一次报错信息   每次导入数据库表都会有这个问题

admin 发表于 2018-7-30 17:20:02

请用最新版本测试下,如果存在问题,请给出重现步骤

xingzhi 发表于 2018-7-31 10:07:21

3.7.7还是存在那个问题

getColumnMetadataFormCgForm ---->COLUMN_NAME:tqp_vertime TYPE_NAME:string DECIMAL_DIGITS:0 COLUMN_SIZE:20

SQL Error: 904, SQLState: 42000
ORA-00904: "C_STATUS": 标识符无效

ORA-00904: "C_STATUS": 标识符无效

org.hibernate.exception.SQLGrammarException: ORA-00904: "C_STATUS": 标识符无效

admin 发表于 2018-7-31 14:31:03

用的什么数据库?

admin 发表于 2018-7-31 14:33:13

你这个表设计也没有 c_status状态字段啊

xingzhi 发表于 2018-7-31 15:57:06

我的原始表都是c_开始的 由于平台支持不好现在我都是自己写建表语句将c_改为tqp_生成空表我数据库的表都是tqp_
CREATE TABLE "JEECG3"."TQP_QTYSTD_NK" (
"ID" VARCHAR2(32 BYTE) NOT NULL ,
"CREATE_NAME" VARCHAR2(50 BYTE) NULL ,
"CREATE_BY" VARCHAR2(50 BYTE) NULL ,
"CREATE_DATE" DATE NULL ,
"UPDATE_NAME" VARCHAR2(50 BYTE) NULL ,
"UPDATE_BY" VARCHAR2(50 BYTE) NULL ,
"UPDATE_DATE" DATE NULL ,
"SYS_ORG_CODE" VARCHAR2(50 BYTE) NULL ,
"SYS_COMPANY_CODE" VARCHAR2(50 BYTE) NULL ,
"RID" VARCHAR2(32 BYTE) NOT NULL ,
"TQP_GB_STD_CODE" VARCHAR2(60 BYTE) NOT NULL ,
"TQP_GB_STD_NAME" VARCHAR2(100 BYTE) NULL ,
"TQP_GB_STL_GRD" VARCHAR2(60 BYTE) NULL ,
"TQP_NK_STD_CODE" VARCHAR2(60 BYTE) NOT NULL ,
"TQP_NK_STD_NAME" VARCHAR2(100 BYTE) NULL ,
"TQP_VERSION" NUMBER(5) NOT NULL ,
"TQP_STATUS" VARCHAR2(1 BYTE) NOT NULL ,
"TQP_NK_STL_GRD" VARCHAR2(60 BYTE) NULL ,
"TQP_PROD_KIND" VARCHAR2(50 BYTE) NULL ,
"TQP_PROD_NAME" VARCHAR2(50 BYTE) NULL ,
"TQP_STD_NM_CH" VARCHAR2(150 BYTE) NULL ,
"TQP_STD_NM_EN" VARCHAR2(150 BYTE) NULL ,
"TQP_ASSO_CODE" VARCHAR2(20 BYTE) NULL ,
"TQP_KEY_TOL_STD_CODE" VARCHAR2(20 BYTE) NULL ,
"TQP_KEY_SPETQP_CODE" VARCHAR2(20 BYTE) NULL ,
"TQP_KEY_SMP_STD_CODE" VARCHAR2(20 BYTE) NULL ,
"TQP_PUB_YEAR" VARCHAR2(20 BYTE) NULL ,
"TQP_CTRL_TYPE" VARCHAR2(1 BYTE) NULL ,
"TQP_ERP_STL_GRD" VARCHAR2(100 BYTE) NULL ,
"TQP_MOD_DT" VARCHAR2(32 BYTE) NULL ,
"TQP_REMARK" VARCHAR2(500 BYTE) NULL ,
"TQP_USE" VARCHAR2(100 BYTE) NULL ,
"TQP_FLAG" VARCHAR2(1 BYTE) NULL ,
"TQP_FLAG_DESC" VARCHAR2(20 BYTE) NULL ,
"TQP_VERTIME" VARCHAR2(20 BYTE) NULL
)
LOGGING
NOCOMPRESS
NOCACHE

;
COMMENT ON TABLE "JEECG3"."TQP_QTYSTD_NK" IS '质量标准-内控';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."ID" IS '主键';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."CREATE_NAME" IS '创建人名称';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."CREATE_BY" IS '创建人登录名称';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."CREATE_DATE" IS '创建日期';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."UPDATE_NAME" IS '更新人名称';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."UPDATE_BY" IS '更新人登录名称';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."UPDATE_DATE" IS '更新日期';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."SYS_ORG_CODE" IS '所属部门';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."SYS_COMPANY_CODE" IS '所属公司';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."RID" IS '真实id';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_GB_STD_CODE" IS '国标代码';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_GB_STD_NAME" IS '国标描述';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_GB_STL_GRD" IS '标准钢种/外部牌号';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_NK_STD_CODE" IS '内控标准代码';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_NK_STD_NAME" IS '内控标准描述';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_VERSION" IS '版本号';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_STATUS" IS '数据状态:0-失效;1-生效'; Q_P_Status
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_NK_STL_GRD" IS '内控钢种/子钢号';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_PROD_KIND" IS '品种';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_PROD_NAME" IS '品名';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_STD_NM_CH" IS '标准名称 标准名称(中)';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_STD_NM_EN" IS '标准名称 标准名称(英)';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_ASSO_CODE" IS '标准协会代码';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_KEY_TOL_STD_CODE" IS '公差标准PK';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_KEY_SPETQP_CODE" IS '制造规范PK';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_KEY_SMP_STD_CODE" IS '取样标准PK';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_PUB_YEAR" IS '发布年度';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_CTRL_TYPE" IS '控制类型:0-全不控制;1-全控制;2-成分控制;3-性能控制;';        Q_P_CTRLType
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_ERP_STL_GRD" IS 'ERP钢种';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_MOD_DT" IS '录入时间';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_REMARK" IS '备注';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_USE" IS '用途';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_FLAG" IS '审批状态';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_FLAG_DESC" IS '状态描述:0-待编制;1-待审核;2-待批准;3-已批准';
COMMENT ON COLUMN "JEECG3"."TQP_QTYSTD_NK"."TQP_VERTIME" IS '版次';

-- ----------------------------
-- Indexes structure for table TQP_QTYSTD_NK
-- ----------------------------

-- ----------------------------
-- Checks structure for table TQP_QTYSTD_NK
-- ----------------------------
ALTER TABLE "JEECG3"."TQP_QTYSTD_NK" ADD CHECK ("ID" IS NOT NULL);
ALTER TABLE "JEECG3"."TQP_QTYSTD_NK" ADD CHECK ("TQP_GB_STD_CODE" IS NOT NULL);
ALTER TABLE "JEECG3"."TQP_QTYSTD_NK" ADD CHECK ("TQP_NK_STD_CODE" IS NOT NULL);
ALTER TABLE "JEECG3"."TQP_QTYSTD_NK" ADD CHECK ("TQP_VERSION" IS NOT NULL);
ALTER TABLE "JEECG3"."TQP_QTYSTD_NK" ADD CHECK ("TQP_STATUS" IS NOT NULL);

-- ----------------------------
-- Primary Key structure for table TQP_QTYSTD_NK
-- ----------------------------
ALTER TABLE "JEECG3"."TQP_QTYSTD_NK" ADD PRIMARY KEY ("ID");
我的建表语句

admin 发表于 2018-7-31 16:11:42

那你强制同步吧
页: [1]
查看完整版本: 数据库导入 修改后 同步数据库报错