I'm trying to deploy an EJB project which uses Spark libraries to load to a trained ML model and then make a prediction from there.
When I try to deploy the project on my Wildfly server, it throws the error below.
I cannot figure out why it's throwing that ClassNotFoundException, there is a referenced jar in the project with that package inside:
Any thoughts on why this error is happening/how to fix it?
Error Message:
20:34:13,864 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."kmeans-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."kmeans-ejb.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "kmeans-ejb.jar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class ec.spark.KMeansStateless with ClassLoader ModuleClassLoader for Module "deployment.kmeans-ejb.jar" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/apache/spark/api/java/function/Function
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Caused by: java.lang.ClassNotFoundException: org.apache.spark.api.java.function.Function from [Module "deployment.kmeans-ejb.jar" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 18 more
20:34:13,866 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "kmeans-ejb.jar")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"kmeans-ejb.jar\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"kmeans-ejb.jar\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class ec.spark.KMeansStateless with ClassLoader ModuleClassLoader for Module \"deployment.kmeans-ejb.jar\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: org/apache/spark/api/java/function/Function
Caused by: java.lang.ClassNotFoundException: org.apache.spark.api.java.function.Function from [Module \"deployment.kmeans-ejb.jar\" from Service Module Loader]"}}
May be you are NOT bundled required jar in your war files. Extract your war files and see
Related
I converted my Dynamic Web Project to a Maven Project since I want to run it on a Wildfly on a Raspberry Pi 2.
The problem is that after I converted and tried to Run as Maven build it started to pop up errors and errors..
I spent some time working on them and it seems like stoped, Maven could initiate. The problem now is that when I try to run Wildfly on it it is outputting the following error:
14:02:35,247 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
14:02:35,415 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
14:02:35,475 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
14:02:35,999 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:357)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.weld
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:155)
at org.jboss.as.server.parsing.StandaloneXml$DefaultExtensionHandler.parseExtensions(StandaloneXml.java:126)
at org.jboss.as.server.parsing.StandaloneXml_4.readServerElement(StandaloneXml_4.java:218)
at org.jboss.as.server.parsing.StandaloneXml_4.readElement(StandaloneXml_4.java:141)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:147)
... 11 more
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:196)
at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:69)
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:127)
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:124)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.jboss.modules.ModuleLoadException: Error loading module from C:\Users\jose\Documents\Wildfly\ó\wildfly-10.1.0.Final\wildfly-10.1.0.Final\modules\system\layers\base\com\sun\xml\messaging\saaj\main\module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:204)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:170)
at org.jboss.modules.LocalModuleFinder.lambda$findModule$0(LocalModuleFinder.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:144)
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
at org.jboss.modules.Module.addExportedPaths(Module.java:1230)
at org.jboss.modules.Module.addPaths(Module.java:1122)
at org.jboss.modules.Module.link(Module.java:1449)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1477)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:178)
... 8 more
Caused by: org.jboss.modules.xml.XmlPullParserException: Unexpected content of type 'element start' named 'path', text is: '<path name="com/sun/xml/messaging/saaj"/>' (position: START_TAG seen ...</properties>\n\t<path name="com/sun/xml/messaging/saaj"/>... #29:43)
at org.jboss.modules.xml.ModuleXmlParser.unexpectedContent(ModuleXmlParser.java:257)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:538)
at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
... 22 more
14:02:36,001 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
14:02:36,018 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) stopped in 9ms
Any help would be really apreciated. I've tried everything I found on google and nothing seemed to work.
Thank you very much!
One of your configuration xml files in your application could have an typo
look at the exception trace
org.jboss.modules.xml.XmlPullParserException: Unexpected content of type 'element start' named 'path', text is: '' (position: START_TAG seen ...\n\t... #29:43) at
I am getting the below exception:
18:45:51,355 WARN [org.jboss.modules] (MSC service thread 1-3) Failed to define class org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider in Module "deployment.Sample.war:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider (Module "deployment.Sample.war:main" from Service Module Loader): javax/xml/ws/Provider
Logs :
18:45:51,365 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."Sample.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Sample.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "Sample.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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.NoClassDefFoundError: Failed to link org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider (Module "deployment.Sample.war:main" from Service Module Loader): javax/xml/ws/Provider
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.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:606)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
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.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadClassInfoSet(ServletContainerInitializerDeploymentProcessor.java:259)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:169)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
I found this resource helpful, when solving similar problem to the reported. https://developer.jboss.org/thread/268163
When I applied suggestion made by Reto Hodel (2017-03-07 09:56), that is, "Adding two module dependencies in the jboss-deployment-structure.xml: java.xml.ws.api (which actually contains the Provider interface) and javax.jws.api", the problem has fixed iself.
I starting standalone Keycloak on Wildfly.
Next i install keycloak-wildfly-adapter in my standalone keycloak folder (inside is include wildfly) with this command:
cd bin
./jboss-cli.sh --file=adapter-install-offline.cli
Then i want to deploy my app on server with this command:
mvn wildfly:deploy
and i get ERROR:
ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 50) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./ldap-portal: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ldap-portal: java.lang.NoSuchMethodError: org.keycloak.representations.adapters.config.AdapterConfig.getMinTimeBetweenJwksRequests()I
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.NoSuchMethodError: org.keycloak.representations.adapters.config.AdapterConfig.getMinTimeBetweenJwksRequests()I
at org.keycloak.adapters.KeycloakDeploymentBuilder.internalBuild(KeycloakDeploymentBuilder.java:107)
at org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:135)
at org.keycloak.adapters.undertow.KeycloakServletExtension.handleDeployment(KeycloakServletExtension.java:135)
at io.undertow.servlet.core.DeploymentManagerImpl.handleExtensions(DeploymentManagerImpl.java:252)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:152)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
16:11:31,347 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "ldap-portal.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./ldap-portal" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ldap-portal: java.lang.NoSuchMethodError: org.keycloak.representations.adapters.config.AdapterConfig.getMinTimeBetweenJwksRequests()I
Caused by: java.lang.NoSuchMethodError: org.keycloak.representations.adapters.config.AdapterConfig.getMinTimeBetweenJwksRequests()I"}}
16:11:31,349 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "ldap-portal.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./ldap-portal" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ldap-portal: java.lang.NoSuchMethodError: org.keycloak.representations.adapters.config.AdapterConfig.getMinTimeBetweenJwksRequests()I
Caused by: java.lang.NoSuchMethodError: org.keycloak.representations.adapters.config.AdapterConfig.getMinTimeBetweenJwksRequests()I"}}
Can someone explain me why this happen and how to fix it?
The error:
2016-04-12 12:32:04,399 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 62) HHH000230: Schema export complete
2016-04-12 12:32:04,753 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:870)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:242)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_66]
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.addListener(UndertowDeploymentInfoService.java:1145)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:734)
... 6 more
2016-04-12 12:32:05,109 INFO [org.jboss.weld.Bootstrap] (weld-worker-4) WELD-000119: Not generating any bean definitions from org.apache.struts2.tiles.StrutsTilesListener because of underlying class loading error: Type org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader] not found. If this is unexpected, enable DEBUG logging to see the full error.
2016-04-12 12:32:07,323 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "BanqueEE.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]"}}
2016-04-12 12:32:07,408 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "BanqueEE.ear" (runtime-name : "BanqueEE.ear")
2016-04-12 12:32:07,410 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
How to debug this error in Struts 2?
You have missed a library struts2-tiles-plugin-x.x.x.x.jar and probably their dependencies.
What you need is to add these libraries to the Deployment Assembly. It will help you to archive ear project and include dependencies that have equivalent manifest settings in their classpath.
If you want to know what is a Deployment Assembly you can read this article Eclipse : Java EE Module Dependencies is replaced by Web Deployment Assembly.
“Web Deployment Assembly“, which provide more powerful and flexible ways to configure the project packaging structure.
There's also a page that describes the process of linking external resources with the ear application: Web Application Development: Configuring Projects with External Resources.
Do you have some javaee api jar in your war ? Maybe a servlet.jar ? Please remove it, and check after that.
I'm trying to deploy my jar using appclient but i get this error.
This is my deploy command
C:\wildfly-8.2.0.Final\bin>appclient socket-gateway.jar
16:56:03,155 ERROR [org.jboss.msc.service.fail] (MSC service thread
1-16) MSC000001: Failed to start service
jboss.deployment.unit."socket-gateway.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."socket-gateway.jar".POST_MODULE: JBAS018733:
Failed to process phase POST_MODULE ofdeployment "socket-gateway.jar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
[wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_71]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71] Caused by: java.lang.RuntimeException: JBAS014187: Could not load view
com.switching.serverapi.ServiceManagerBeanRemote
at org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:99)
at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:95)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
[wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more Caused by: java.lang.ClassNotFoundException: com.serverapi.ServiceManagerBeanRemote from [Module
"deployment.socket-gateway.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
[jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
[jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
[jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
[jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
[jboss-modules.jar:1.3.3.Final]
at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_71]
at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_71]
at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
[wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:97)
... 7 more
16:56:03,167 ERROR [org.jboss.as.controller.management-operation]
(Thread-43) JBAS014613: Operation ("deploy") failed - address:
([("deployment" => "socket-gate way.jar")]) - failure description:
{"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"socket-gateway.jar\".POST_MODULE" =>
"org.jboss.msc.service.Start Exception in service
jboss.deployment.unit.\"socket-gateway.jar\".POST_MODULE: JBAS018733:
Failed to process phase POST_MODULE of deployment
\"socket-gateway.jar\" Caused by: java.lang.RuntimeException:
JBAS014187: Could not load view
com.switching.serverapi.ServiceManagerBeanRemote Caused by:
java.lang.ClassNotFoundException:
com.switching.serverapi.ServiceManagerBeanRemote from [Module
\"deployment.socket-gateway.jar:main\" from Service Module Loader]"}}
16:56:03,170 ERROR [org.jboss.as.server] (Thread-43) JBAS015870:
Deploy of deployment "socket-gateway.jar" was rolled back with the
following failure message: {"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"socket-gateway.jar\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service jboss.deployme
nt.unit.\"socket-gateway.jar\".POST_MODULE: JBAS018733: Failed to
process phase POST_MODULE of deployment \"socket-gateway.jar\" Caused
by: java.lang.RuntimeException: JBAS014187: Could not load view
com.switching.serverapi.ServiceManagerBeanRemote Caused by:
java.lang.ClassNotFoundException:
com.switching.serverapi.ServiceManagerBeanRemote from [Module
\"deployment.socket-gateway.jar:main\" from Service Module Loader]"}}
16:56:03,197 INFO [org.jboss.as.server.deployment] (MSC service thread
1-9) JBAS015877: Stopped deployment socket-gateway.jar (runtime-name:
socket-gateway.jar ) in 26ms 16:56:03,198 INFO
[org.jboss.as.controller] (Thread-43) JBAS014774: Service status
report JBAS014777: Services which failed to start: service
jboss.deployment.unit ."socket-gateway.jar".POST_MODULE
From that error it clearly said " java.lang.ClassNotFoundException: com.serverapi.ServiceManagerBeanRemote from [Module "deployment.socket-gateway.jar:main" from Service Module Loader]".
And i already read the redhat documentation
using that references , i make folder in "C:\wildfly-8.2.0.Final\modules\com\switching\serverapi" and put the serverapi.jar (this jar where the code for com.serverapi.ServiceManagerBeanRemote )
but i still have same problems. Anyone can help me?
Thank you
i think the folder you have made is not in the right directory. It should be under:
[WidlFly-HOME]\modules\system\layers\base .. \com\switching\serverapi\serverapi.jar