2016-09-05 5 views
1

WildFly 10에서 응용 프로그램을 실행하고 있습니다. EAR에 여러 개의 EJB가 포함되어 있습니다. 하나의 EJB "gt"가 JMS를 통해 트리거됩니다. 즉, EJB는 궁극적으로 오류의 결과로,종속성이 설정되어 있어도 Wildfly 10에서 ClassNotFoundException이 발생했습니다.

내 JBoss에 배포-structure.xml이

<sub-deployment name="ps.jar"> 
    <dependencies> 
    <module name="org.apache.commons.io"/> 
    </dependencies> 
</sub-deployment> 

를 포함하고 이름의 모듈 "이

Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.filefilter.IOFileFilter from [Module "deployment.MyApplication.ear:main" from Service Module Loader]

조직 다른 EJB"PS "를 호출 .apache.commons.io "이하 jboss\modules\system\layers\base\org\apache\commons\io\main

내가 뭘 잘못하고 있니? jboss\modules 이하가 아닌 jboss\modules\system\layers 아래에있는 물건의 중요성은 무엇입니까?

런타임시 하위 배포의 구성된 종속성 (예 : jboss-cli?)을 조사하는 방법이 있습니까?

업데이트 :
https://docs.jboss.org/author/display/WFLY10/Class+Loading+in+WildFly에 따르면 [Module "deplyoment.MyApplication.ear.ps.jar:main" ...]이라는 오류 메시지가 표시되지만 예상하지 못합니다. 그러나 컨텍스트가 특정 하위 배포보다는 글로벌 배포 인 이유는 무엇입니까?

논리적 호출 스택은 다음과 같습니다

당신은이 경우 수동으로 클래스를로드 할 필요
general.GeneralSomeClass.getIOFileFilter() 
    <-- static method. return type is IOFileFilter from Commons IO. 
     general is just a POJO lib (MyApplication.ear/lib/general.jar) 
     the exception occurs on loading the GeneralSomeClass, before calling the method 
ps.PsSomeClass.run() 
ps.PsEJB.run() 
gt.GtEJB.run() 
+0

하위 배포 대신 EAR에 종속성을 추가하려고 했습니까? 모듈 디렉토리 질문에 대답하기 만하면됩니다. 'modules \ system \ layers'는 서버가 제공하는 모듈을 의미합니다. 사용자 모듈은'modules' 디렉토리에 있어야합니다. 'modules/org/postgresql/main'에 있습니다. –

답변

0

, 나는 우리의 응용 프로그램에 대한 standalone.xml에 이런 짓을했는지.

<subsystem xmlns="urn:jboss:domain:ee:4.0"> 
      <global-modules> 
       <module name="com.tibco.tibjms"/> 
       <module name="org.apache.logging.log4j.api"/> 
       <module name="org.apache.logging.log4j.core"/> 
       <module name="org.apache.logging.log4j.web"/> 
      </global-modules> 
관련 문제