Jboss Wildfly migration Resteasy error - jboss

I'm currently migrating from Jboss 6 to Jboss 10.1 and keep running into the same error when trying to deploy:
14:39:10,147 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./mucrdtxnws.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./mucrdtxnws.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher from [Module "deployment.fis-txnreceiver-war-1.0-SNAPSHOT-DEV.war:main" from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:1079)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:284)
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.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher from [Module "deployment.fis-txnreceiver-war-1.0-SNAPSHOT-DEV.war:main" from Service Module Loader]
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.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:723)
... 6 more
I have tried removing resteasy from my pom and excluding it from the jboss-deployment structure but I still receive the same error. Please tell me someone has run into this problem before and fixed it.

Related

Jboss 8 WildFly: EAR Deployment ClassNotFoundException

I have an EAR
EAR
|-web (many wars)
|-ejbs (many ejbs.jar)
|-libs (one million lib jars)
\-thirthapp
|-web
| |-thirth.war
|-ejb (some ejb.jar)
\-libs (some specifics libs)
This work in JBoss 4.05 but not in WildFly 8 release. In WildFly all of Servlets in "thirth.war" throw an error:
09:45:53,426 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./indexos.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./indexos.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet from [Module "deployment.wosoceanw_3.11.0b167.ear.IndexOS.web.tim-indexos.war:main" from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:933)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:256)
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:1142) [rt.jar:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
Caused by: java.lang.ClassNotFoundException: com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet from [Module "deployment.wosoceanw_3.11.0b167.ear.IndexOS.web.tim-indexos.war: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 org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:651)
... 6 more
Defining your package as a module on WildFly solves your problem. Package must contain com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet class. If you do not have any idea about adding module into WildFly, you could examine JBoss Modules documentation.

Error deploying EJBs in Wildfly 8 (JBOSS 8)

I am getting error when I am trying to deploy EJB in Wildfly 8. I am trying to place my ejb.ear file which contains (beans.jar file with all bean and remote classes and meta-inf folder with ejb-jar.xml and jboss.xml) in wildfly8/standalone/deployments folder.
It shows me all the module names and jndi names for all the bean files I have placed. But after showing following is the error I get.
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."ejbs.ear"."beans.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ejbs.ear"."beans.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "beans.jar" of deployment "ejbs.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
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(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011058: Failed to install component ReportBean
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:109)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
... 5 more
Caused by: java.lang.NullPointerException
at org.jboss.as.ejb3.component.session.SessionBeanObjectViewConfigurator$2.configureDependency(SessionBeanObjectViewConfigurator.java:94)
at org.jboss.as.ejb3.component.session.SessionBeanObjectViewConfigurator$2.configureDependency(SessionBeanObjectViewConfigurator.java:91)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:151)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:101)
... 6 more
Can someone please help.
Thanks,
Jack.

resteasy-spring module in jboss wildfly 8

I am having this problem with Wildfly 8 and resteasy-spring.jar (module). i am trying to deploy 2 wars on the same server, if i deploy 1 war it deploys fine, but whenever i add the second war it starts failing (and vice versa) with the following error:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."TaskandTeamManager.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."TaskandTeamManager.war".DEPENDENCIES: JBAS018733: Failed to process phase DEPENDENCIES of deployment "TaskandTeamManager.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final-SNAPSHOT.jar:8.0.0.Final-SNAPSHOT]
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(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.io.IOException: VFS000017: Filesystem already mounted at mount point ""/C:/servers/jboss/wildfly-8.0.0.Final/modules/system/layers/base/org/jboss/resteasy/resteasy-spring/main/bundled/resteasy-spring.jar""
at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:126)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final-SNAPSHOT.jar:8.0.0.Final-SNAPSHOT]
... 5 more
Caused by: java.io.IOException: VFS000017: Filesystem already mounted at mount point ""/C:/servers/jboss/wildfly-8.0.0.Final/modules/system/layers/base/org/jboss/resteasy/resteasy-spring/main/bundled/resteasy-spring.jar""
at org.jboss.vfs.VFS.mount(VFS.java:127)
at org.jboss.vfs.VFS.doMount(VFS.java:336)
at org.jboss.vfs.VFS.mountZip(VFS.java:360)
at org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:119)
... 6 more
I already tried adding a dependencies in jboss-deployment-structure (META-INF), but i get the same error, both projects are using rest-easy and jackson dependencies.
Any help would be greatly appreciated
This is a bug. For now if you add the context param org.jboss.as.jaxrs.disableSpringIntegration=true to your application it should work around it.

Migration from Tomcat 7 to JBoss7.1

Previously I was working on an application which is running on Tomcat 7 server but now I wan to run it on JBoss7.1 Server . But when I am trying to run it. It is showing me this kind of error. I am not getting what is it and how to resolve it. I searched on internet but could not find valuable response.
My log on JBoss is:
09:52:08,117 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "WEB-ERP.war"
09:52:12,994 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."WEB-ERP.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."WEB-ERP.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "WEB-ERP.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_12-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_12-ea]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_12-ea]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.apache.struts.taglib.logic.ConditionalTagBase with ClassLoader ModuleClassLoader for Module "deployment.WEB-ERP.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/struts/util/MessageResources;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_12-ea]
at java.lang.Class.privateGetDeclaredFields(Unknown Source) [rt.jar:1.7.0_12-ea]
at java.lang.Class.getDeclaredFields(Unknown Source) [rt.jar:1.7.0_12-ea]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts.util.MessageResources from [Module "deployment.WEB-ERP.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more
09:52:13,053 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990
09:52:13,055 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "WEB-ERP.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"WEB-ERP.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"WEB-ERP.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"WEB-ERP.war\""}}
09:52:13,056 ERROR [org.jboss.as] (MSC service thread 1-2) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 10052ms - Started 140 of 218 services (1 services failed or missing dependencies, 76 services are passive or on-demand)
09:52:13,107 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment WEB-ERP.war in 51ms
09:52:13,110 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."WEB-ERP.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."WEB-ERP.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "WEB-ERP.war"
09:52:13,116 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"WEB-ERP.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"WEB-ERP.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"WEB-ERP.war\""}}}}
And the error message I am getting is The requested resource (/StrutsHelloWorld/) is not available. And I am working on Struts 2 & Hibernate 4 Integration application which is working fine on Tomcat.
You are missing the Struts classes: they were probably in the Tomcat class path. You should make sure the Struts libraries are added to your WAR file.
The project has classpath dependency to the Struts1 libraries. You should either include Struts1 libraries or exclude dependencies that reference to org.apache.struts.util.MessageResources. This class is found in the following jar:
struts-core-1.3.10.jar

How to solve hook deployment error on JBOSS AS7: Failed to process phase INSTALL of deployment

I am getting the following error (full stack-trace) when I try to deploy my TagsNavigation-hook.war:
14:04:37,562 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "TagsNavigation-hook.war"
14:04:37,589 INFO [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api dependency to TagsNavigation-hook.war
14:04:37,596 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."TagsNavigation-hook.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."TagsNavigation-hook.war".INSTALL: Failed to process phase INSTALL of deployment "TagsNavigation-hook.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [:1.7.0_04]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.7.0_04]
at java.lang.Thread.run(Unknown Source) [:1.7.0_04]
Caused by: java.lang.RuntimeException: Failed to load class com.liferay.taglib.portlet.NamespaceTag
at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:141)
at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:122)
at org.jboss.as.ee.component.LazyValue.get(LazyValue.java:40)
at org.jboss.as.ee.component.EEApplicationDescription.getClassConfiguration(EEApplicationDescription.java:183)
at org.jboss.as.ee.component.ComponentDescription.createConfiguration(ComponentDescription.java:153)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:70)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: com.liferay.taglib.portlet.NamespaceTag from [Module "deployment.TagsNavigation-hook.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
at java.lang.Class.forName0(Native Method) [:1.7.0_04]
at java.lang.Class.forName(Unknown Source) [:1.7.0_04]
at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:139)
... 11 more
This was working before, but is not working after I undeployed by directly deleting the TagsNavigation-hook.war from the location \liferay-portal-6.1.10-ee-ga1\jboss-7.0.2\standalone\deployments, on another Jboss server I undeployed through liferay's Control Panel --> Update Manager
I tried the following:
Renaming the file TagsNavigation-hook.war.failed to TagsNavigation-hook.war.dodeploy but still the same error.
Stopping the server, then change it to TagsNavigation-hook.war.dodeploy and then restart the server but still the same thing.
Completely deleting the TagsNavigation-hook.war and TagsNavigation-hook.war.failed files and then deploying it. I tried this as a hot deployment as well as by stopping the server --> deploying --> starting the server.
Other plugin deployments (themes, hooks and portlets) are working fine. And this hook is also working fine on Tomcat-7!
Environment: Liferay 6.1.10 EE bundled with JBOSS 7.0.2 on Linux
Now it is working.
I just added this property: portal-dependency-jars=util-taglib.jar inside liferay-plugin-package.properties and then deployed.
This feels quite strange because the hook works perfectly fine on tomcat without defining the property and only on Jboss it gave this error and that too only after I undeployed it.