mysqlora-1400_oracle错误(⼆)ORA-01400:没法将NULL
插⼊(。。。
以前都是mysql数据库,如今由于项⽬须要开始接触oracle数据库,新⼿上路,不免磕磕碰碰,把本⾝遇到的问题记录下来,⽅便查询!html
⼀ 建表脚本:java
DROP TABLE TEMP_TEST_TABLE;
CREATE TABLE TEMP_TEST_TABLE
婴儿打嗝怎么办怎么止嗝(
id NUMBER NOT NULL,
author VARCHAR2(200),
publishing VARCHAR2(200),
publish_time TIMESTAMP(6),
word_number VARCHAR2(15),
which_edition VARCHAR2(15),
total_page VARCHAR2(15),
print_time TIMESTAMP(6),
print_number VARCHAR2(15),
isbn VARCHAR2(25),
author_summary VARCHAR2(250),
catalogue VARCHAR2(250)
)
--指定表空间(能够不指定)
tablespace DSW
pctfree 10
pctud 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table TEMP_TEST_TABLE is '学习测试表';
-- Add comments to the columns
comment on column TEMP_TEST_TABLE.id is '图书ID';鼻组词
comment on column TEMP_TEST_TABLE.author is '图书做者';
comment on column TEMP_TEST_TABLE.publishing is '出版社';
comment on column TEMP_TEST_TABLE.publish_time is '出版时间';
comment on column TEMP_TEST_TABLE.word_number is '字数';
comment on column TEMP_TEST_TABLE.which_edition is '版本号码';
comment on column TEMP_al_page is '总页数';
comment on column TEMP_TEST_TABLE.print_time is '印刷时间';
comment on column TEMP_TEST_TABLE.print_number is '印刷次数';
comment on column TEMP_TEST_TABLE.isbn is '版本号';
打屁股hcomment on column TEMP_TEST_TABLE.author_summary is '做者简介';
comment on column TEMP_TEST_TABLE.catalogue is '图书描述';
-- Create/Recreate primary, unique and foreign key constraints
alter table TEMP_TEST_TABLE
add constraint PK_TEMP_TEST_TABLE primary key (ID)
using index
tablespace SYSTEM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);结果项⽬成功启动后,调⽤接⼝时,接⼝逻辑没有问题,做新增操做的时候,⼀直在报错;
信息以下:mysql
取消关机命令2015-06-05 10:32:43,996 DEBUG [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - Translating SQLException with SQL state '23000', error code '1400', message [ORA-01400: 没法将 NULL 插⼊签证变更
("SL"."TEMP_TEST_TABLE"."ID")
]; SQL was [] for task [
### Error updating databa. Cau: java.sql.SQLException: ORA-01400: 没法将 NULL 插⼊ ("SL"."TEMP_TEST_TABLE"."ID") ### The error may involve defaultParameterMap
Caud by: java.sql.SQLException: ORA-01400: 没法将 NULL 插⼊ ("SL"."TEMP_TEST_TABLE"."ID")
at oracle.jdbc.driver.DatabaError.throwSqlException(DatabaError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.ive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.uteForRows(T4CPreparedStatement.java:966)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
at oracle.jdbc.uteInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.ute(OraclePreparedStatement.java:3445)
太湖旅游
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2929)
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2927)
水杯刻字刻什么好at com.alibaba.druid.proxy.ute(PreparedStatementProxyImpl.java:94)
at com.alibaba.druid.ute(DruidPooledPreparedStatement.java:476)
flect.GeneratedMethodAccessor14.invoke(Unknown Source)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:606)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:45)
at com.sun.proxy.$ute(Unknown Source)
at org.utor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:22)
at org.utor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:51)
at org.utor.ReuExecutor.doUpdate(ReuExecutor.java:32)
at org.utor.BaExecutor.update(BaExecutor.java:88)
at org.utor.CachingExecutor.update(CachingExecutor.java:43)
at org.apache.ibatis.ssion.defaults.DefaultSqlSession.update(DefaultSqlSession.java:121)
at org.apache.ibatis.ssion.defaults.DefaultSqlSession.inrt(DefaultSqlSession.java:110)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:606)
batis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
韦太后... 44 more
2015-06-05 10:32:43,997 ERROR [cn.xyx.dsw.ller.TempTestTableController] - add save