Module problem again.
tisaksen Jan 30, 2018 5:19 AMI can't seem to wrap my head around modules.
Working on an HttpHandler which has a module.xml. In addition I have created several modules which are working fine but now I have defined two more which are "org.springframwork" and "org.apache.ignite" (see attached module defs.)
The main module is defined under D:\wildfly-10.1.0.Final\modules
\no\toyota\gatekeeper\main
The two other modules are defined under
D:\wildfly-10.1.0.Final\modules\system\layers\base
\org\apache\ignite\main\
\org\springframework\main\
The problem now is that I get a ClassNotFoundException from the module "org.wildfly.extension.io:main" on a class in my org.apache.ignite module. But I can't understand why it's not found, my modules are defined correctly under the path given in the exception:
I have double checked that I have all the required jar files and I am 100% sure not a single file is missing.
11:01:41,816 ERROR [io.undertow.request] (default I/O-13) UT005071: Undertow request failed HttpServerExchange{ POST /gatekeeper/credentials/1.0/authenticate request {Postman-Token=[2346d713-9d8b-4f2e-a8dc-5910c852fa8d], Accept=[*/*], cache-control=[no-cache], accept-encoding=[gzip, deflate], User-Agent=[PostmanRuntime/7.1.1], Connection=[keep-alive], Content-Type=[application/json], content-length=[49], Host=[dev.toyota.no:8080]} response {}}: java.lang.RuntimeException: WFLYUT0064: Failed to configure handler class no.toyota.gatekeeper.handler.TokenBouncerHandler
at org.wildfly.extension.undertow.deployment.ConfiguredHandlerWrapper.wrap(ConfiguredHandlerWrapper.java:78)
at org.wildfly.extension.undertow.filters.CustomFilterDefinition.createHttpHandler(CustomFilterDefinition.java:100)
at org.wildfly.extension.undertow.filters.FilterService.createHttpHandler(FilterService.java:57)
at org.wildfly.extension.undertow.filters.FilterRef.createHttpHandler(FilterRef.java:69)
at org.wildfly.extension.undertow.LocationService.configureHandlerChain(LocationService.java:104)
at org.wildfly.extension.undertow.Host.configureRootHandler(Host.java:119)
at org.wildfly.extension.undertow.Host.getOrCreateRootHandler(Host.java:173)
at org.wildfly.extension.undertow.Host$HostRootHandler.handleRequest(Host.java:303)
at io.undertow.server.handlers.NameVirtualHostHandler.handleRequest(NameVirtualHostHandler.java:64)
at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:158)
at io.undertow.server.protocol.http2.Http2UpgradeHandler.handleRequest(Http2UpgradeHandler.java:95)
at io.undertow.server.handlers.DisallowedMethodsHandler.handleRequest(DisallowedMethodsHandler.java:61)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:243)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:134)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:58)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:567)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.wildfly.extension.undertow.deployment.ConfiguredHandlerWrapper.wrap(ConfiguredHandlerWrapper.java:56)
... 21 more
Caused by: class org.apache.ignite.IgniteException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/D:/apache-ignite-fabric-2.3.0-bin/config/gatekeeper-token-config.xml]
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:966)
at org.apache.ignite.Ignition.start(Ignition.java:350)
at no.toyota.gatekeeper.ignite.IgniteUtil.getCache(IgniteUtil.java:34)
at no.toyota.gatekeeper.doorman.ExpressionEngine.<init>(ExpressionEngine.java:33)
at no.toyota.gatekeeper.handler.TokenBouncerHandler.<init>(TokenBouncerHandler.java:43)
... 26 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/D:/apache-ignite-fabric-2.3.0-bin/config/gatekeeper-token-config.xml]
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:387)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:673)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:874)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:783)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:653)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:622)
at org.apache.ignite.Ignition.start(Ignition.java:347)
... 29 more
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.ignite.configuration.IgniteConfiguration] for bean with name 'ignite.cfg' defined in URL [file:/D:/apache-ignite-fabric-2.3.0-bin/config/gatekeeper-token-config.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.ignite.configuration.IgniteConfiguration from [Module "org.wildfly.extension.io:main" from local module loader @1c2c22f3 (finder: local module finder @18e8568 (roots: D:\wildfly-10.1.0.Final\modules,D:\wildfly-10.1.0.Final\modules\system\layers\base))]
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1385)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:641)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:609)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1484)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1007)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:741)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:381)
... 37 more
Caused by: java.lang.ClassNotFoundException: org.apache.ignite.configuration.IgniteConfiguration from [Module "org.wildfly.extension.io:main" from local module loader @1c2c22f3 (finder: local module finder @18e8568 (roots: D:\wildfly-10.1.0.Final\modules,D:\wildfly-10.1.0.Final\modules\system\layers\base))]
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)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:401)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1432)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1377)
... 45 more
-
module.xml.zip 499 bytes
-
spring_module.xml.zip 458 bytes
-
ignite_module.xml.zip 469 bytes