2017-04-03 118 views
0

这个问题不回答。(标记为假定回答) 安迪的Gowdy 新手 安迪的Gowdy 31-MAR-2017 6点56 HIJBOSS迁移到AS6 EAP 7 404错误

我有困难引用在我将它部署到EAP 7后的耳朵文件。我没有部署错误,但是当我尝试通过URL访问ear/beans时,出现404错误。在现在已弃用的JBOSS.xml中,URI被配置为如图所示。任何帮助将非常感激。非常感谢安迪

<jboss> 
    <enterprise-beans> 
    <session> 
    <ejb-name>HousingFacadeEJB</ejb-name> 
    <jndi-name>HousingFacadeEJB</jndi-name> 
    <local-jndi-name>LocalHousingFacadeEJB</local-jndi-name> 
    <call-by-value>false</call-by-value> 
    <!-- <configuration-name>Facade</configuration-name> --> 
    <clustered>false</clustered> 
      <port-component> 
       <port-component-name>HousingFacade</port-component-name> 
       <port-component-uri>HousingFacade/HousingFacadeEJB 
       </port-component-uri> 
      </port-component> 
    </session> 
    </enterprise-beans> 
    <container-configurations> 
    <container-configuration extends="Standard Stateless SessionBean"> 
     <container-name>HousingFacade</container-name> 
    <container-pool-conf> 
     <MinimumSize>50</MinimumSize> 
    <MaximumSize>150</MaximumSize> 
     </container-pool-conf> 
    </container-configuration> 
    </container-configurations> 
</jboss> 

---------------------------------------------------------- 

I have replaced this with a JBOSS-EJB3.xml 

<enterprise-beans> 
    <session> 
    <ejb-name>HousingFacadeEJB2_Live</ejb-name> 

    <home>com.comino.cxm.housingfacade.HousingFacadeHome</home> 
    <remote>com.comino.cxm.housingfacade.HousingFacade</remote> 
    <local-home>com.comino.cxm.housingfacade.LocalHousingFacadeHome</local-home> 
    <local>com.comino.cxm.housingfacade.LocalHousingFacade</local> 

    <ejb-class>com.comino.cxm.housingfacade.HousingFacadeBean</ejb-class> 

    <session-type>Stateless</session-type> 
    <transaction-type>Container</transaction-type> 
    <env-entry> 
       <env-entry-name>UHDSJNDINAME</env-entry-name> 
        <env-entry-type>java.lang.String</env-entry-type> 
        <env-entry-value>java:/UHTLIVE_2</env-entry-value> 
    </env-entry> 

    </session> 
    </enterprise-beans> 

<assembly-descriptor> 
    <container-transaction> 
      <method> 
      <ejb-name>HousingFacadeEJB2_Live</ejb-name> 
    <method-name>*</method-name> 
      </method> 
      <trans-attribute>Required</trans-attribute> 
     </container-transaction> 
</assembly-descriptor> 

我的ejb-jar.xml中

<jboss:ejb-jar> 

    <enterprise-beans> 
    <session> 
    <ejb-name>HousingFacadeEJB2_Live</ejb-name> 

    <home>com.comino.cxm.housingfacade.HousingFacadeHome</home> 
    <remote>com.comino.cxm.housingfacade.HousingFacade</remote> 
    <local-home>com.comino.cxm.housingfacade.LocalHousingFacadeHome</local-home> 
    <local>com.comino.cxm.housingfacade.LocalHousingFacade</local> 

    <ejb-class>com.comino.cxm.housingfacade.HousingFacadeBean</ejb-class> 

    <session-type>Stateless</session-type> 
    <transaction-type>Container</transaction-type> 
    <env-entry> 
       <env-entry-name>UHDSJNDINAME</env-entry-name> 
       <env-entry-type>java.lang.String</env-entry-type> 
       <env-entry-value>java:/UHTLIVE_2</env-entry-value> 
    </env-entry> 

    </session> 
    </enterprise-beans> 

    <assembly-descriptor> 
    <container-transaction> 
      <method> 
      <ejb-name>HousingFacadeEJB2_Live</ejb-name> 
    <method-name>*</method-name> 
      </method> 
      <trans-attribute>Required</trans-attribute> 
     </container-transaction> 
    </assembly-descriptor> 

</jboss:ejb-jar> 

JBoss服务器日志提取物..我删节的连接地址。

---------------------------- REQUEST ----------------- ----------

URI=/HousingFacade2_Live/HousingFacadeEJB2_Live 
characterEncoding=null 
    contentLength=1304 
     contentType=[text/xml; charset=utf-8] 
      header=Connection=Keep-Alive 
      header=SOAPAction="" 
      header=Cache-Control=no-cache 
      header=Content-Type=text/xml; charset=utf-8 
      header=Content-Length=1304 
      header=User-Agent=W2 
      header=Host=************** 
      locale=[] 
      method=POST 
      protocol=HTTP/1.1 
     queryString= 
     remoteAddr=************* 
     remoteHost=************ 
      scheme=http 
       host=******************* 
     serverPort=8080 
--------------------------RESPONSE-------------------------- 
    contentLength=74 
     contentType=text/html 
      header=Connection=keep-alive 
      header=X-Powered-By=Undertow/1 
      header=Server=JBoss-EAP/7 
      header=Content-Length=74 
      header=Content-Type=text/html 
      header=Date=Fri, 31 Mar 2017 10:31:43 GMT 
      status=404 
============================================================== 

回答

0
+0

感谢阿努普 - 我已经检查的文件,并审查了耳朵的设置和代码所做的,但轻微的调整,如图仍然得到404错误。我没有使用maven,也没有pom文件。 \t \t \t final Hashtable jndiProperties = new Hashtable(); \t \t \t jndiProperties.put(InitialContext.URL_PKG_PREFIXES,“org.jboss.ejb.client.naming”); \t \t \t initialContext = new InitialContext(jndiProperties); \t \t // \t initialContext = new InitialContext(); \t \t \t cache = Collections.synchronizedMap(new HashMap()); – Andyrus