2014-06-10 3 views
0

wildfly 8.0.0 Final에서 Eclipse를 사용하여 단일 EAR 프로젝트에 webproject (jsf 사용)와 ejb 프로젝트를 결합하려고 시도하면 다음 오류가 발생합니다 쪽으로. 이러한 오류가 나타나는 이유를 알 수 없습니다. 실제로 개별 프로젝트 (jsf 웹 프로젝트와 ejb 프로젝트 모두)는 단일 귀로 결합되기 전에 잘 작동합니다.Wildfly 8 배포 오류 (또는) org.jboss.weld.context.ContextNotActiveException

21:38:31,951 INFO [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016005: Starting Services for CDI deployment: test.ear 
21:38:31,953 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016008: Starting weld service for deployment test.ear 
21:38:31,967 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-6) Initializing Mojarra 2.2.5-jbossorg-3 20140128-1641 for context '/JSFTest' 
21:38:32,081 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-6) Critical error during deployment: : org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.faces.flow.builder.FlowDefinition 
    at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:680) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23] 
    at org.jboss.weld.util.ForwardingBeanManager.getContext(ForwardingBeanManager.java:181) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23] 
    at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:323) [jsf-impl-2.2.5-jbossorg-3.jar:] 
    at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.processEvent(ApplicationAssociate.java:303) [jsf-impl-2.2.5-jbossorg-3.jar:] 
    at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5] 
    at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.5-jbossorg-3.jar:] 
    at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.5-jbossorg-3.jar:] 
    at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) [jsf-impl-2.2.5-jbossorg-3.jar:] 
    at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:294) [wildfly-jsf-injection-8.0.0.Final.jar:8.0.0.Final] 
    at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.5-jbossorg-3.jar:] 
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.5-jbossorg-3.jar:] 
    at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final] 
    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:187) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final] 
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86) 

내 JSF 프로젝트에는 다음과 같은 하나의 index.xhtml 만 있습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core"> 
    <h:head> 
     <title>JSF tutorial</title>   
    </h:head> 
    <h:body> 
    <h2>hello Example</h2> 
    <h:form> 
     <h:outputLabel>Hello</h:outputLabel> 
    </h:form> 
</h:body> 
</html> 

web.xml은 다음과 같습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> 
    <display-name>JSF</display-name> 
    <welcome-file-list> 
    <welcome-file>index.html</welcome-file> 
    <welcome-file>index.htm</welcome-file> 
    <welcome-file>index.jsp</welcome-file> 
    <welcome-file>default.html</welcome-file> 
    <welcome-file>default.htm</welcome-file> 
    <welcome-file>default.jsp</welcome-file> 
    </welcome-file-list> 

    <!-- Change to "Production" when you are ready to deploy --> 
    <context-param> 
     <param-name>javax.faces.PROJECT_STAGE</param-name> 
     <param-value>Development</param-value> 
    </context-param> 

    <!-- JSF mapping --> 
    <servlet> 
     <servlet-name>Faces Servlet</servlet-name> 
     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
     <load-on-startup>1</load-on-startup> 
    </servlet> 

    <!-- Map these files with JSF --> 
    <servlet-mapping> 
     <servlet-name>Faces Servlet</servlet-name> 
     <url-pattern>/faces/*</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>Faces Servlet</servlet-name> 
     <url-pattern>*.jsf</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>Faces Servlet</servlet-name> 
     <url-pattern>*.faces</url-pattern> 
    </servlet-mapping> 
    <servlet-mapping> 
     <servlet-name>Faces Servlet</servlet-name> 
     <url-pattern>*.xhtml</url-pattern> 
    </servlet-mapping> 
</web-app> 

My EJB 프로젝트에는 로컬 및 원격 인터페이스가 모두있는 상태 비 저장 세션빈이 하나만 있습니다.

package test; 

import javax.ejb.LocalBean; 
import javax.ejb.Stateless; 

/** 
* Session Bean implementation class Hello 
*/ 
@Stateless 
@LocalBean 
public class Hello implements HelloRemote, HelloLocal { 

    /** 
    * Default constructor. 
    */ 
    public Hello() { 
     // TODO Auto-generated constructor stub 
    } 

    @Override 
    public String sayHello() { 

     return "hello"; 
    } 

} 

답변

2

이러한 오류 코드 (WELD-001303)로 Google에서 검색 한 결과 여전히 wildfly 8.0.0 final의 문제인 것으로 나타났습니다. web-inf 아래 beans.xml을 작성하여이를 해결할 수 있습니다. 참고 : CDI는 사용 여부에 관계없이 기본적으로 사용하도록 설정되어 있습니다.

+0

은 8.1.0.CR2로 수정 된 것 같습니다 : https://issues.jboss.org/browse/WFLY-3207?_sscc=t –

관련 문제