Topic: EJB问题!希望大家赐教! |
Print this page |
1.EJB问题!希望大家赐教! | Copy to clipboard |
Posted by: TJCEO Posted on: 2004-05-14 17:07 我参考的书籍是<J2EE经典实例详解>介绍的是怎样创建一个网上银行.我的源代码都写好进行编译的时候,系统出现以下提示: "myModule.ejbgrpx": ERROR: ejbc found errors while parsing the descriptor for C:/Documents and Settings/TJCEO/jbproject/Bank/myModule.jar.jar: "myModule.ejbgrpx": ERROR: Error from ejbc: Error parsing 'ejb-jar.xml' line 128: The content of element type "container-transaction" is incomplete, it must match "(description?,method+,trans-attribute)". "myModule.ejbgrpx": ERROR: ejbc found errors 请问这是什么错误造成的??谢了! |
2.Re:EJB问题!希望大家赐教! [Re: TJCEO] | Copy to clipboard |
Posted by: tangming Posted on: 2004-05-14 17:21 你必须为container-transaction指定你要用容器管理的方法。 |
3.Re:EJB问题!希望大家赐教! [Re: TJCEO] | Copy to clipboard |
Posted by: TJCEO Posted on: 2004-05-14 21:26 怎么指定啊?能详细点吗? |
4.Re:EJB问题!希望大家赐教! [Re: TJCEO] | Copy to clipboard |
Posted by: slacker Posted on: 2004-05-15 10:47 我觉的可能是你把顺序搞错了. check http://java.sun.com/dtd/ejb-jar_2_0.dtd <!ELEMENT container-transaction (description?, method+, trans-attribute)> all three sub-element of "container-transaction" must be in order. Check your ejb-jar.xml. slacker. or you missed either a method or trans-attribute, since both must occur in the container-transaction. |
5.Re:EJB问题!希望大家赐教! [Re: TJCEO] | Copy to clipboard |
Posted by: TJCEO Posted on: 2004-05-15 14:13 是不是我的EJB中没有定义方法呢?? |
6.Re:EJB问题!希望大家赐教! [Re: TJCEO] | Copy to clipboard |
Posted by: slacker Posted on: 2004-05-15 15:04 From the error message: "myModule.ejbgrpx": ERROR: Error from ejbc: Error parsing 'ejb-jar.xml' line 128: The content of element type "container-transaction" is incomplete, it must match "(description?,method+,trans-attribute)". I believe it is the problem of "container-transaction". Based on the DTD, container-transaction must have at least one sub-element "method", and exactly one "trans-attribute". Also subelements must list in order which may the problem casued the Exception when ejb container read the ejb-xml.jar. pls double check your ejb-xml.jar. slacker. |
7.Re:EJB问题!希望大家赐教! [Re: TJCEO] | Copy to clipboard |
Posted by: TJCEO Posted on: 2004-05-15 20:25 我用的是JBuilder啊!我没有发现ejb-jar.xml文件啊!! |
8.Re:EJB问题!希望大家赐教! [Re: TJCEO] | Copy to clipboard |
Posted by: slacker Posted on: 2004-05-16 00:21 ft ejb-jar.xml is the J2EE standard configure fie for EJB jar file. Whateve development tools you use, it does exist in the META-INF directory. slacker. |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |