EJB3.x异常:Unsuccessful: alter table ORDER add constraint FK47F8F2EFC558D0A foreign key (ORDER_USR_ID)
Posted yexianyi
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了EJB3.x异常:Unsuccessful: alter table ORDER add constraint FK47F8F2EFC558D0A foreign key (ORDER_USR_ID)相关的知识,希望对你有一定的参考价值。
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)的主要内容,如果未能解决你的问题,请参考以下文章
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: F
Ionic App 启动时报Application Error - The connection to the server was unsuccessful
phpmailer 发送Outlook邮件时535 5.7.3 authentication unsuccessful错误的解决办法
phpmailer 发送Outlook邮件时535 5.7.3 authentication unsuccessful错误的解决办法
The data protection operation was unsuccessful. This may have been caused by not having the user pro