把<?xml version="1.0"?>那行删掉,让<!DOCTYPE ejb-jar 出现在第一行,
WEBsphere老是有这样那样的问题,weblogic倒不是很常见,如果实在不行,
就拷贝petstore里边的xml文件,按照他的格式写就完了,好像是不需要你的
那个第一行的

解决方案 »

  1.   

    <?xml version="1.0"?>  <!DOCTYPE ejb-jar PUBLIC 
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'><ejb-jar>   
      <enterprise-beans>     
        <session>
          <ejb-name>HelloWorld</ejb-name>
          <home>HelloWorldHome</home>
          <remote>HelloWorld</remote>
          <ejb-class>HelloWorldBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Bean</transaction-type>     
        </session>
      </enterprise-beans> 
    </ejb-jar>  这样写试试看