Dependency jar issue in Red hat sso

Posted on

Hi All,

I am doing POC on Redhat sso so that we can buy the product.

I am facing simple issue with dependencies

I have two jar files 1)xxclient.jar 2)xxMain.jar

Main.jar is dependent on client.jar but when I execute service in Main.jar it is unable to find classes in xxClient.jar. Throws NoClassDefFoundError

I have added as module:
Step1: jboss-cli.bat --command="module add --name=asgard-service --resources=../providers/xxClient.jar"

Step2: boss-cli.bat --command="module add --name= --Mymodule2 resources=../providers/xxMain.jar --dependencies= asgard-service"

Step3: Also added module name in standalone.xml

Any help will be much appreciated

2017-03-15 13:20:59,776 INFO [com.KeyCloakProvider.service.AsgardModel] (default task-1) >>>>>>>>>>>Login started for user:keycloak_poc
2017-03-15 13:20:59,776 WARN [org.jboss.modules] (default task-1) Failed to define class org.tempuri.TattsPortal in Module "asgard-service:main" from local module loader @2f8f5f62 (finder: local module finder @1068e947 (roots: C:\software\RedhatSSO\rh-sso-7.1\modules,C:\software\RedhatSSO\rh-sso-7.1\modules\system\layers\keycloak,C:\software\RedhatSSO\rh-sso-7.1\modules\system\layers\base)): java.lang.NoClassDefFoundError: Failed to link org/tempuri/TattsPortal (Module "asgard-service:main" from local module loader @2f8f5f62 (finder: local module finder @1068e947 (roots: C:\software\RedhatSSO\rh-sso-7.1\modules,C:\software\RedhatSSO\rh-sso-7.1\modules\system\layers\keycloak,C:\software\RedhatSSO\rh-sso-7.1\modules\system\layers\base))): javax/xml/ws/Service
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)