NutzCN Logo
问答 请教一下nutzwk自动建表问题
发布于 2091天前 作者 码农 1236 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

各位大神!今天创建了个实体类,然后运行之后就是无法正常在数据库中建表,一直报错提示我某个标识符无效,可是我没有定义那个标识符呀。。。


import org.nutz.dao.entity.annotation.*; import java.io.Serializable; @Table("ROADCOMMUNITYLEVEL") public class RoadCommunityLevelObj implements Serializable { @Column @Name @ColDefine(type = ColType.VARCHAR, width = 255) private String id; @Column @ColDefine(type = ColType.VARCHAR, width = 255) private String name; @Column @ColDefine(type = ColType.INT, width = 8) private int level; @Column @ColDefine(type = ColType.VARCHAR, width = 255) private String description; @Column @ColDefine(type = ColType.VARCHAR, width = 255) private String measure;
错误代码如下:
[DEBUG] 2019-03-03 18:13:06,783 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - CREATE TABLE ROADCOMMUNITYLEVEL(
id VARCHAR2(255) primary key ,
name VARCHAR2(255),
level NUMBER(8),
description VARCHAR2(255),
measure VARCHAR2(255))
org.nutz.dao.DaoException: !Nutz SQL Error: 'CREATE TABLE ROADCOMMUNITYLEVEL(
id VARCHAR2(255) primary key ,
name VARCHAR2(255),
level NUMBER(8),
description VARCHAR2(255),
measure VARCHAR2(255))'
PreparedStatement: 
'CREATE TABLE ROADCOMMUNITYLEVEL(
id VARCHAR2(255) primary key ,
[DEBUG] 2019-03-03 18:13:06,809 org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:97) - SQLException
name VARCHAR2(255),
java.sql.SQLSyntaxErrorException: ORA-00904: : 标识符无效
level NUMBER(8),

description VARCHAR2(255),
	at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
measure VARCHAR2(255))'
	at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
CaseMessage=ORA-00904: : 标识符无效
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)

	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:104)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor._exec(CachedNutDaoExecutor.java:317)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:187)
	at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:942)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1770)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1739)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:299)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
	at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2489)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125)
	at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2451)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
	at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2487)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.execute(StatementProxyImpl.java:137)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:418)
	at org.nutz.dao.impl.DaoSupport.execute(DaoSupport.java:236)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runStatement(NutDaoExecutor.java:357)
	at org.nutz.dao.impl.jdbc.oracle.OracleJdbcExpert.createEntity(OracleJdbcExpert.java:137)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:60)
	at org.nutz.dao.impl.NutDao.create(NutDao.java:812)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor._exec(CachedNutDaoExecutor.java:317)
	at org.nutz.dao.util.Daos.createTablesInPackage(Daos.java:470)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:187)
	at cn.wizzer.app.web.commons.core.Setup.initSysData(Setup.java:457)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at cn.wizzer.app.web.commons.core.Setup.init(Setup.java:111)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:274)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4700)
	at org.nutz.dao.impl.DaoSupport.execute(DaoSupport.java:236)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5340)
	at org.nutz.dao.impl.jdbc.oracle.OracleJdbcExpert.createEntity(OracleJdbcExpert.java:137)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.nutz.dao.impl.NutDao.create(NutDao.java:812)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
	at org.nutz.dao.util.Daos.createTablesInPackage(Daos.java:470)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
	at cn.wizzer.app.web.commons.core.Setup.initSysData(Setup.java:457)
	at cn.wizzer.app.web.commons.core.Setup.init(Setup.java:111)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:274)
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1733)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4700)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:484)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5340)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:433)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1733)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:484)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:433)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.Thread.run(Thread.java:748)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: : 标识符无效
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)

	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
	at java.security.AccessController.doPrivileged(Native Method)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:942)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
	at java.security.AccessController.doPrivileged(Native Method)
	at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1770)
	at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1739)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:299)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2489)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2451)
	at java.lang.Thread.run(Thread.java:748)
	at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188)
[INFO ] 2019-03-03 18:13:06,817 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:141) - Nutz.Mvc[nutz] is up in 3727ms
	at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2487)
[INFO ] 2019-03-03 18:13:06,817 org.nutz.mvc.NutFilter._init(NutFilter.java:121) - exclusionsSuffix = ([.].*)$
	at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.execute(StatementProxyImpl.java:137)
	at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:418)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runStatement(NutDaoExecutor.java:357)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:60)
2 回复

description是关键字

添加回复
请先登陆
回到顶部