2016-05-31 2 views
0

Wildfly 9를 사용하여 두 개의 웹 응용 프로그램 (전쟁)을 동시에 배포하고 있습니다. 최근 응용 프로그램 중 하나에 의해 사용되는 석영의 버전을 업그레이드하고 내가 배포 할 때 지금은 다음과 같은 오류를 받고 있어요 :Wildfly 9 - 석영 의존성을 제외한 문제

Caused by: org.quartz.SchedulerConfigException: Unable to instantiate InstanceIdGenerator class: org.quartz.simpl.SimpleInstanceIdGenerator cannot be cast to org.quartz.spi.InstanceIdGenerator [See nested exception: java.lang.ClassCastException: org.quartz.simpl.SimpleInstanceIdGenerator cannot be cast to org.quartz.spi.InstanceIdGenerator] 
    at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:814) 
    at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1519) 
    at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:597) 
    at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:480) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568) 
    ... 42 more 

Caused by: java.lang.ClassCastException: org.quartz.simpl.SimpleInstanceIdGenerator cannot be cast to org.quartz.spi.InstanceIdGenerator 
    at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:811) 
    ... 47 more 

지금까지 내가 말할 수있는, 제이보스는 않습니다 (석영을 사용하지 않는 이유는 무엇입니까?), 그래서 나는 거기에 다른 응용 프로그램에서 석영 의존성과 클래스 로딩 confilct 있다고 가정합니다. Jboss-deployment-structure에 쿼츠 제외를 추가하려고 시도했지만 충돌은 계속 발생합니다.

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"> 
    <deployment> 
     <dependencies> 
      <module name="deployment.urtdsm-historian"/> 

      <!-- ANTLR --> 
      <module name="org.antlr" /> 

      <!-- ASM --> 
      <module name="asm.asm" /> 

      <!-- APACHE COMMONS --> 
      <module name="org.apache.commons.beanutils" /> 
      <module name="org.apache.commons.codec" /> 
      <module name="org.apache.commons.collections" /> 
      <module name="org.apache.commons.io" /> 
      <module name="org.apache.commons.pool" /> 

      <!-- JAVAX.VALIDATION --> 
      <module name="javax.validation.api" /> 

      <!-- DOM4J --> 
      <module name="org.dom4j" /> 

      <!-- JTA --> 
      <module name="javax.transaction.api" /> 

      <!-- WOODSTOX --> 
      <module name="org.codehaus.woodstox" /> 

      <!-- JETTISON --> 
      <module name="org.codehaus.jettison" /> 

      <!-- JACKSON --> 
      <module name="org.codehaus.jackson.jackson-core-asl" /> 
      <module name="org.codehaus.jackson.jackson-mapper-asl" /> 

      <!-- JAVASSIST --> 
      <module name="org.javassist" /> 

      <!-- APACHE NEETHI --> 
      <module name="org.apache.neethi" /> 

     </dependencies> 

     <exclusions> 
      <module name="org.hibernate" /> 
      <module name="org.hibernate.validator" /> 
      <module name="org.slf4j" /> 
      <module name="org.slf4j.impl" /> 
      <module name="org.apache.commons.logging" /> 
      <module name="org.apache.log4j" /> 
      <module name="org.jboss.logging" /> 
      <module name="org.jboss.logging.jul-to-slf4j-stub" /> 
      <module name="org.jboss.logmanager" /> 
      <module name="org.jboss.logmanager.log4j" /> 
      <module name="com.sun.xml.bind" /> 
      <module name="org.quartz-scheduler" /> 
     </exclusions> 

     <exclude-subsystems> 
      <subsystem name="webservices" /> 
      <subsystem name="weld" /> 
     </exclude-subsystems> 
    </deployment> 
    <module name="deployment.urtdsm-historian"> 
     <dependencies> 
      <module name="deployment.urtdsm-historian-0.1-SNAPSHOT.war"> 
       <exports>     
        <exclude path="org/hibernate/**" /> 
        <exclude path="org/springframework/orm/**" /> 
        <exclude path="org/springframework/transaction/**" /> 
        <exclude path="org/quartz-scheduler/**" /> 
        <include path="com/tdf/**" /> 
        <include path="com/psymetrix/**" /> 
        <include path="org/springframework/**" /> 
        <include path="org/aopalliance/**" /> 
        <include path="org/aspectj/**" /> 
        <include path="org/postgresql/**" /> 
       </exports> 
      </module> 
     </dependencies> 
    </module> 
</jboss-deployment-structure> 

내가이 배치 된 전쟁 사이의 갈등 클래스로드에 대한 문서의 방법으로 많이 찾을 수 없습니다 :이 내 JBoss에 배포 구조입니다. 내가 여기서 뭔가 잘못하고있는거야? 어떤 도움을 주시면 감사하겠습니다. 감사.

석영 - 2.2.1

제이보스는 - 9.0.1

+0

석영 라이브러리는 어떻게 설정됩니까? WildFly 모듈로 생성되었거나 전쟁에 직접 상주합니까? – Quincy

+0

그것은 전쟁에서 산다. – user3029642

답변

0

나는 봄 스케줄링을 제외하여 문제를 해결했습니다. 내 Quartz 제외가 작동했지만 Quartz는 여전히 종속성 체인을 통해 들어갔다.