站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2EE 专题EJB部署描述问题

EJB部署描述问题

摘要: EJB部署描述问题


请问在开发EJB时能自动生成配置描述吗?可以的话是怎么实现的呢?谢谢.我的开发环境是:eclipse3.12+myeclipse4.1.0+weblogic server9.1 .
我在eclipse手工写了ejb-jar.xml老是提示错误.我写的ejb-jar.xml文件内容如下:
ejb-jar PUBLIC "-//Sun Microsystems,Inc.//DTD Enterprise
JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd" >




Hello
exampleOne.HelloHome
exampleOne.Hello
exampleOne.helloLocalHome
exampleOne.hellolocal
exampleOnem.ejb.HelloBean
Staless
<transaction-type>Container</transaction-type>



提示错误如下:
lement type "***" must be declared.(楼主注:***代表Home,Remote,Session-type等)
The content of element type "ejb-jar" must match "(description?,display-name?,small-icon?,large-icon?,enterprise-beans,relationships?,assembly-descriptor?,ejb-client-jar?)".ejb-jar.xmlEJBHelloworld/src/META-INFline 17July 15, 2006 3:58:29 PM

谢谢




我刚刚在MyEclipse中找到开发XML的工具了,并写了一个新的EJB工程.但还是出现错误.我的ejb-jar.xml文件如下:
<?xml version="1.0" encoding="UTF-8"?>
ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "ejb-jar_2_0.dtd" >

Hello World
Hello World file


helloejbSession
helloejb.HelloEJBBean
helloejb.HelloEJBHome
helloejb.HelloEJBRemote
Stateless
<transaction-type>Container</transaction-type>

INTL
java.lang.Double
15.0


tradeLimit
java.lang.Integer
500






helloejbSession
*

<trans-attribute>Required</trans-attribute>




提示错误如下:
SeverityDescriptionResourceIn FolderLocationCreation TimeId
2
The content of element type "session" must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,ejb-class,session-type,transaction-type,env-entry*,ejb-ref*,ejb-local-ref*,security-role-ref*,security-identity?,resource-ref*,resource-env-ref*)".ejb-jar.xmlEJBFirst/src/META-INFline 24July 15, 2006 5:14:01 PM251

请达人帮忙,谢谢




问题解决,原来真是不匹配.


走过路过,搞定就好,接分。


↑返回目录
前一篇: EJB部署出错: Unable to load a class specified in your ejb-jar.xml
后一篇: 请教关于session的问题