EJB3.x异常:Unsuccessful: alter table ORDER add constraint FK47F8F2EFC558D0A foreign key (ORDER_USR_ID) references CUSTOMER
来源:互联网 发布:搜狗音乐软件 编辑:程序博客网 时间:2024/06/11 13:12
EJB3.x异常:Unsuccessful: alter table ORDER add constraint FK47F8F2EFC558D0A foreign key (ORDER_USR_ID) references CUSTOMER
在部署Order Entity Bean时,总是出现以下异常,久思不得其解:
16:57:05,453 ERROR [SchemaUpdate] Unsuccessful: alter table ORDER add constraint FK47F8F2EFC558D0A foreign key (ORDER_USR_ID) references CUSTOMER
16:57:05,453 ERROR [SchemaUpdate] 在关键字 'ORDER' 附近有语法错误。
16:57:05,453 INFO [SchemaUpdate] schema update complete
16:57:05,453 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
16:57:05,703 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=EJBBookStoreEJBModule.jar,name=RoleDAOBean,service=EJB3
16:57:05,703 INFO [EJBContainer] STARTED EJB: net.model.dao.bean.RoleDAOBean ejbName: RoleDAOBean
16:57:05,750 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=EJBBookStoreEJBModule.jar,name=CustomerDAOBean,service=EJB3
16:57:05,765 INFO [EJBContainer] STARTED EJB: net.model.dao.bean.CustomerDAOBean ejbName: CustomerDAOBean
16:57:05,843 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
CustomerDAOBean/remote - EJB3.x Default Remote Business Interface
CustomerDAOBean/remote-net.model.dao.CustomerDAORemote - EJB3.x Remote Business Interface
16:57:05,875 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
RoleDAOBean/remote - EJB3.x Default Remote Business Interface
RoleDAOBean/remote-net.model.dao.RoleDAORemote - EJB3.x Remote Business Interface
最终,知道了原因。是因为我把Order类的Table名称映射成了ORDER,该词在MSSQL2000中是数据库的关键字,因此不能正常生成该表。
- EJB3.x异常:Unsuccessful: alter table ORDER add constraint FK47F8F2EFC558D0A foreign key (ORDER_USR_ID) references CUSTOMER
- alter table *** add constraint
- Liquibase异常 mysql数据库 Cannot add foreign key constraint
- alter table *** add constraint *** 用法
- alter table *** add constraint *** 用法
- alter table *** add constraint *** 用法
- 常用语句(三)alert table ... 、constraint、foreign key(...) references ...(...)、check(... between ...)
- The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_SortId".
- 1215-Cannot add foreign key constraint
- migration cannot add foreign key constraint
- 1215 - Cannot add foreign key constraint
- 1215 - Cannot add foreign key constraint
- 1215 Cannot add the foreign key constraint
- 1215-Cannot add the foreign key constraint
- mysql : cannot add foreign key constraint
- hibernate4.x自动建表时候创建外键失败ERROR: HHH000389: Unsuccessful: alter table ORDERS_NOPK1 add index
- MySQL 1215 Cannot add foreign key constraint 错误解决办法
- Mysql学习之cannot add foreign key constraint
- 用Ogre渲染PhysX Cloth的实现方法(附源代码下载)
- JNDI
- resin配置输出
- 使用XFire实现Web服务
- OGRE中对象的内存分配
- EJB3.x异常:Unsuccessful: alter table ORDER add constraint FK47F8F2EFC558D0A foreign key (ORDER_USR_ID) references CUSTOMER
- 编写模板的一个问题
- 有关Django
- POJ-100留念
- FLEX的menubar用外部xml做数据源
- 删除系统垃圾文件
- 当代 IT 大牛排行榜
- 初识Groovy
- 认识Gralis