0

JBoss を使用してアプリケーションを開発しています。

新しいモジュールを作成しますCAMUNDA_HOME\server\jboss-as-7.2.0.Final\modules\org\camunda\bpm\identity\camunda-identity-dbldap\main

フォルダーには、camunda-identity-dbldap-7.2.0.jar と module.xml の 2 つのファイルが含まれます。

<module xmlns="urn:jboss:module:1.0" name="org.camunda.bpm.identity.camunda-identity-dbldap">
  <resources>
    <resource-root path="camunda-identity-dbldap-7.2.0.jar" />
  </resources>

  <dependencies>

    <module name="sun.jdk" />

    <module name="javax.api" />
    <module name="org.camunda.bpm.camunda-engine" />
    <module name="org.camunda.bpm.identity.camunda-identity-ldap" />

  </dependencies>
</module>

pom.xml に「camunda-identity-dbldap」を含めました。

    <dependency>
        <groupId>org.camunda.bpm.identity</groupId>
        <artifactId>camunda-identity-dbldap</artifactId>
        <version>${camunda-version}</version>
    </dependency>

DbAndLdapIdentityProviderFactory は「camunda-identity-dbldap.jar」に存在し、pom にもロードされます。

プロジェクトでクラスをキャストしようとしました。

    ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl)ProcessEngines.getDefaultProcessEngine().getProcessEngineConfiguration();
    DbAndLdapIdentityProviderFactory factory = (DbAndLdapIdentityProviderFactory)processEngineConfiguration.getIdentityProviderSessionFactory();
    LdapConfiguration configuration = factory.getLdapConfiguration();

残念ながら、ClassCastException が報告され、DbAndLdapIdentityProviderFactory を DbAndLdapIdentityProviderFactory にキャストできません。2 つのクラスが異なるクラス ローダーにロードされたようです。修正方法は?

4

1 に答える 1