2017-07-05 2 views
0

ワイルドフラワー群でモジュール間の依存関係はどのように達成されますか?ワイルドフラワー群でモジュール間の依存関係はどのように達成されますか

例えば、私はこれらのコンテンツを持つモジュールがあります。

<module xmlns="urn:jboss:module:1.3" name="com.obbi.domain.security"> 
     <resources> 
     <artifact name="com.obbi.domain.platform:domain-service-security-jboss:2.0.86"/> 
     <artifact name="com.obbi.domain.platform:domain-service-security-client:2.0.86"/> 
     </resources> 
     <dependencies> 
     <module name="org.jboss.as.web"/> 
     <module name="org.jboss.logging"/> 
     <module name="org.picketbox"/> 
     <module name="javax.api"/> 
     <module name="javax.security.auth.message.api"/> 
     <module name="javax.servlet.api"/> 
     </dependencies> 
    </module> 

At runtime, when I try to access my application, it fails because it can't find the dependencies specified in the module. 

2017-07-05 16:58:50,312 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /Test/rest/Ping: java.lang.NoClassDefFoundError: org/jose4j/json/internal/json_simple/parser/ParseException 
at java.lang.Class.getDeclaredConstructors0(Native Method) 
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) 
at java.lang.Class.getConstructor0(Class.java:3075) 
at java.lang.Class.getConstructor(Class.java:1825) 
at org.jboss.security.auth.message.config.JBossServerAuthConfig.createSAM(JBossServerAuthConfig.java:244) 
at org.jboss.security.auth.message.config.JBossServerAuthConfig.getAuthContext(JBossServerAuthConfig.java:178) 
at org.jboss.security.plugins.auth.JASPIServerAuthenticationManager.secureResponse(JASPIServerAuthenticationManager.java:158) 
at org.wildfly.extension.undertow.security.jaspi.JASPICSecureResponseHandler.handleRequest(JASPICSecureResponseHandler.java:35) 
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) 
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) 
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) 
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) 
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) 
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) 
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) 
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) 
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) 
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) 
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:211) 
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
at java.lang.Thread.run(Thread.java:745) 

Caused by: java.lang.ClassNotFoundException: org.jose4j.json.internal.json_simple.parser.ParseException from [Module "com.obbi.domain.security:main" from [email protected] for finders [BootstrapClasspathModuleFinder, BootstrapModuleFinder(org.wildfly.swarm.bootstrap:main), ClasspathModuleFinder, ContainerModuleFinder(swarm.container:main), ApplicationModuleFinder(swarm.application:main), [email protected]]] 
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) 
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) 
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) 
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) 
... 28 more 

を私はwildfly群れのリソースへの通常wildflyモジュールディレクトリから依存関係のモジュールをコピーしようとしましたが、問題が解消されません。

モジュール内のこれらの依存関係はどのように構成されていますか?

よろしく

+0

あなたはmodule.xmlに2つのアーティファクトを追加する代わりにしている特定の理由があるとは何の関係もなかっただけWAR内の依存関係として? おそらく、モジュールがどのように使用されることが予想されるかに関するもう少しの文脈が役立つでしょう – Ken

答えて

0

私はPOMで私module.xmlで

<artifact name="org.bitbucket.b_c:jose4j:0.5.0"/> 

だけでなく、

<dependency> 
    <groupId>org.bitbucket.b_c</groupId> 
    <artifactId>jose4j</artifactId> 
    <version>0.5.0</version> 
</dependency> 

を含める必要がありました。

問題は、モジュール間の依存関係

関連する問題