Message: Unexpected element 'context-root' encountered , Unable to deploy on jboss 7.3.10 | Default context root configuration on jboss-web.xml - maven

Without context root tag, able to deploy on jboss server 7.3.10 and able to access application with default context root
War File Application
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>MyApp</context-root>
</jboss-web>
With context root tag , getting below exception
10:54:28,163 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."UtxQVAClient-1.0.0.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."UtxQVAClient-1.0.0.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "UtxClient-1.0.0.war"
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: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYUT0027: Failed to parse XML descriptor "/C:/Users/Applications/jboss-eap-7.3.10/jboss-eap-7.3/standalone/deployments/UtxClient-1.0.0.war/WEB-INF/web.xml" at [3,5]
at org.wildfly.extension.undertow.deployment.WebParsingDeploymentProcessor.deploy(WebParsingDeploymentProcessor.java:134)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
... 8 more
**Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,5]
Message: Unexpected element 'context-root' encountered**
at org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:115)
at org.jboss.metadata.parser.servlet.WebMetaDataParser.parse(WebMetaDataParser.java:196)
at org.jboss.metadata.parser.servlet.WebMetaDataParser.parse(WebMetaDataParser.java:51)
at org.wildfly.extension.undertow.deployment.WebParsingDeploymentProcessor.deploy(WebParsingDeploymentProcessor.java:96)
... 9 more

This declaration shouldn't be in a "web.xml" file but in a jboss-web.xml file as it is jboss specific.

Related

WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment

I am deploying my Spring application on wildfly-16.0.0.FINAL using Java 11. Locally, I am able to deploy successfully but when deploying in Linux VM, getting below error:
10:24:03,215 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."application.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."application.war".DEPENDENCIES: WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment “application.war"
at org.jboss.as.server#8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.util.zip.ZipException: zip END header not found
at org.jboss.as.jaxrs#16.0.0.Final//org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:202)
at org.jboss.as.server#8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
... 8 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.util.zip.ZipException: zip END header not found
at org.jboss.as.jaxrs#16.0.0.Final//org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:132)
at org.jboss.as.jaxrs#16.0.0.Final//org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.deploy(JaxrsSpringProcessor.java:198)
... 9 more
Caused by: java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1529)
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1430)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1437)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1268)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1231)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:726)
at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:843)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:246)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:176)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:317)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:283)
at org.jboss.vfs#3.2.14.Final//org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:90)
at org.jboss.vfs#3.2.14.Final//org.jboss.vfs.VFS.mountZip(VFS.java:360)
at org.jboss.as.jaxrs#16.0.0.Final//org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor.getResteasySpringVirtualFile(JaxrsSpringProcessor.java:112)
... 10 more
I googled but did not find any appropriate solution for this.

Spring boot application fails to start on jboss eap 6.3

I have updated my project gradle dependency to spring boot 1.5.9 version.
After creating war application fails to start.
In startup I can see it is trying to start with spring boot 2.1 autoconfigurer.
There are many errors starts with Could not index class.
Also I have included hibernate 4.3 jar in gradle dependency but its importing hibernate core entity manager & validator 5.X jar in packaged war.
Any pointers on below issue would be of great help.
Final error is as highlighted below not sure what is the use of this jar.
JBAS018104: Deployment error processing SCI for jar: tomcat-embed-websocket-9.0.12.jar
17:34:47,921 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015852: Could not index class org/springframework/boot/autoconfigure/jms/artemis/ArtemisEmbeddedServerConfiguration.class at xxx/WEB-INF/lib/spring-boot-autoconfigure-2.1.0.RELEASE.jar: java.lang.IllegalStateException: Unknown tag! pos=20 poolCount = 270
at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:606) [jandex-1.0.3.Final-redhat-2.jar:1.0.3.Final-redhat-2]
at org.jboss.jandex.Indexer.index(Indexer.java:640) [jandex-1.0.3.Final-redhat-2.jar:1.0.3.Final-redhat-2]
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_181]
18:26:08,119 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC000001: Failed to start service jboss.deployment.unit."Test-1.0.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Test-1.0.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "Test-1.0.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_181]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018104: Deployment error processing SCI for jar: tomcat-embed-websocket-9.0.12.jar
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:210)
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:131)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
... 5 more
**Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018104: Deployment error processing SCI for jar: tomcat-embed-websocket-9.0.12.jar**
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:202)
... 7 more

Cannot find properties file in class path - Error while deploying EAR

Getting the following ERROR while trying to deploy a EAR project in JBoss AS 7.
(MSC service thread 1-5) Context initialization failed. java.io.FileNotFoundException: class path resource [.properties] cannot be opened because it does not exist
A more detailed snapshot of the errors is given below.
16:20:08,548 ERROR [org.springframework.web.servlet.DispatcherServlet]
(MSC service thread 1-5) Context initialization failed:
org.springframework.beans.factory.BeanDefinitionStoreException:
Failed to parse configuration class [xx.xx.Config]; nested exception
is java.io.FileNotFoundException: class path resource
[wwwr.properties] cannot be opened because it does not exist at
org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181)
[spring-context-4.2.1.RELEASE.jar:4.2.1.RELEASE] Caused by:
java.io.FileNotFoundException: class path resource [wwwr.properties]
cannot be opened because it does not exist
16:20:08,588 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/MyWeb]]
(MSC service thread 1-5) StandardWrapper.Throwable:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed
to parse configuration class [com.xx.Config]; nested exception is
java.io.FileNotFoundException: class path resource [wwwr.properties]
cannot be opened because it does not exist
I am using JBoss AS7 server and MyEclipse as IDE.
Well I found the solution to be involving the following steps
1) Make sure that the property file is in the Class Path of the projects involved or at least in the modules deployed in Jboss.
1- a) Verify that the modules.xml file has the right entries
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.xx.yy">
<resources>
<resource-root path="./properties/"/>
2) Verify that the Manifest.mf file in the EAR has the required dependencies.
Dependencies: com.xx.yy
3) Clean build and Deploy to server.

JBoss WildFly 11, Hibernate ORM 5.2, OGM 5.3 and MongoDB - OgmIntegrator not found

Progressing slowly through trying to get Hibernate ORM 5.2 working with OGM 5.3 so I can use JPA with MongoDB.
To remove the JNDI look-up error, referenced in the OGM FAQs:
When using Hibernate OGM on top of WildFly, I’m getting a
JndiException. What’s wrong? In case you’re are seeing a JndiException
saying "Unable to lookup JNDI name [---PlaceHolderDSForOGM---]", your
application likely cannot access the application server module(s) of
Hibernate OGM.
To change this, add the following line to the META-INF/MANIFEST.MF
file of your archive (adapt it to match your chosen datastore):
Dependencies: org.hibernate:ogm services, org.hibernate.ogm.mongodb
services Alternatively, you can configure this via the descriptor
jboss-deployment-structure.xml. See the reference guide to learn more.
I created: jboss-deployment-structure.xml
containing:
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.hibernate.ogm" slot="5.3" services="export" />
<module name="org.hibernate.ogm.mongodb" slot="5.3" services="export" />
</dependencies>
</deployment>
</jboss-deployment-structure>
Now when I try to deploy my EAR through the WildFly 11 console I get:
17:58:42,921 ERROR [org.jboss.msc.service.fail] (ServerService Thread
Pool -- 65) MSC000001: Failed to start service
jboss.persistenceunit."NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit".FIRST_PHASE:
org.jboss.msc.service.StartException in service
jboss.persistenceunit."NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit".FIRST_PHASE:
java.util.ServiceConfigurationError:
org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:128)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:104)
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)
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.util.ServiceConfigurationError:
org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found at
java.util.ServiceLoader.fail(ServiceLoader.java:239) at
java.util.ServiceLoader.access$300(ServiceLoader.java:185) at
java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at
org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:459)
at
org.hibernate.integrator.internal.IntegratorServiceImpl.(IntegratorServiceImpl.java:40)
at
org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:224)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildBootstrapServiceRegistry(EntityManagerFactoryBuilderImpl.java:406)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.(EntityManagerFactoryBuilderImpl.java:196)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.(EntityManagerFactoryBuilderImpl.java:164)
at
org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:32)
at
org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:89)
at
org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.(TwoPhaseBootstrapImpl.java:39)
at
org.jboss.as.jpa.hibernate5.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:199)
at
org.wildfly.jpa.hibernateogm5.HibernateOGMPersistenceProviderAdaptor.getBootstrap(HibernateOGMPersistenceProviderAdaptor.java:87)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:254)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.access$900(PhaseOnePersistenceUnitServiceImpl.java:59)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:125)
... 7 more
17:58:42,926 ERROR [org.jboss.as.controller.management-operation]
(External Management Request Threads -- 1) WFLYCTL0013: Operation
("add") failed - address: ([("deployment" => "NOTiFYwell.ear")]) -
failure description: {"WFLYCTL0080: Failed services" =>
{"jboss.persistenceunit.\"NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit\".FIRST_PHASE"
=> "java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found"}} 17:58:42,927
ERROR [org.jboss.as.server] (External Management Request Threads -- 1)
WFLYSRV0021: Deploy of deployment "NOTiFYwell.ear" was rolled back
with the following failure message: {"WFLYCTL0080: Failed services"
=> {"jboss.persistenceunit.\"NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit\".FIRST_PHASE"
=> "java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found"}} 17:58:42,939
INFO [org.jboss.as.server.deployment] (MSC service thread 1-7)
WFLYSRV0208: Stopped subdeployment (runtime-name: NOTiFYwellJAR.jar)
in 10ms 17:58:42,942 INFO [org.jboss.as.server.deployment] (MSC
service thread 1-8) WFLYSRV0208: Stopped subdeployment (runtime-name:
NOTiFYwellWAR.war) in 13ms 17:58:42,952 INFO
[org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028:
Stopped deployment NOTiFYwell.ear (runtime-name: NOTiFYwell.ear) in
25ms
The error:
Provider org.hibernate.ogm.service.impl.OgmIntegrator not found
Refers to class OgmIntegrator found in:
org/hibernate/ogm/service/impl/OgmIntegrator.class under /usr/local/Cellar/wildfly-as/11.0.0.Final/libexec/modules/system/layers/base/org/hibernate/ogm/5.3/hibernate-ogm-core-5.3.0.Final.jar
Any ideas why this isn't being loaded? TIA
I think I figure out the problem, you need to use this:
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.hibernate.ogm" slot="5.3" services="export" />
<module name="org.hibernate.ogm.mongodb" slot="5.3" services="export" />
</dependencies>
</deployment>
</jboss-deployment-structure>
This exception
org.jboss.modules.ModuleNotFoundException: org.hibernate:5.3
means that you are using org.hibernate:5.3 instead of org.hibernate.ogm:5.3
The error might be in the jboss-deployment descriptor or in the MANIFEST.MF. Just make sure you are only using one or the other.
UPDATE: There was an error in the Hibernate website FAQ session, I updated it. Thanks for the feedback.
Finally got the EAR deployed.
It only deploys the EAR if I include a MANIFEST.MF in EAR's META-INF:
Manifest-Version: 1.0
Dependencies: org.hibernate.ogm:5.3 services, org.hibernate.ogm.mongodb:5.3 services
and remove 'jboss-deployment-structure.xml'.
If I try and use a 'jboss-deployment-structure.xml' (empty MANIFEST):
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.hibernate.ogm" slot="5.3" services="export" />
<module name="org.hibernate.ogm.mongodb" slot="5.3" services="export" />
</dependencies>
</deployment>
</jboss-deployment-structure>
It fails to deploy with the error I've had before:
17:31:53,892 ERROR [org.jboss.msc.service.fail] (ServerService Thread
Pool -- 30) MSC000001: Failed to start service
jboss.persistenceunit."NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit".FIRST_PHASE:
org.jboss.msc.service.StartException in service
jboss.persistenceunit."NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit".FIRST_PHASE:
java.util.ServiceConfigurationError:
org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:128)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:104)
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)
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.util.ServiceConfigurationError:
org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found at
java.util.ServiceLoader.fail(ServiceLoader.java:239) at
java.util.ServiceLoader.access$300(ServiceLoader.java:185) at
java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at
org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:459)
at
org.hibernate.integrator.internal.IntegratorServiceImpl.(IntegratorServiceImpl.java:40)
at
org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:224)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildBootstrapServiceRegistry(EntityManagerFactoryBuilderImpl.java:406)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.(EntityManagerFactoryBuilderImpl.java:196)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.(EntityManagerFactoryBuilderImpl.java:164)
at
org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:32)
at
org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:89)
at
org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.(TwoPhaseBootstrapImpl.java:39)
at
org.jboss.as.jpa.hibernate5.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:199)
at
org.wildfly.jpa.hibernateogm5.HibernateOGMPersistenceProviderAdaptor.getBootstrap(HibernateOGMPersistenceProviderAdaptor.java:87)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:254)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.access$900(PhaseOnePersistenceUnitServiceImpl.java:59)
at
org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:125)
... 7 more
17:31:53,908 ERROR [org.jboss.as.controller.management-operation]
(External Management Request Threads -- 3) WFLYCTL0013: Operation
("add") failed - address: ([("deployment" => "NOTiFYwell.ear")]) -
failure description: {"WFLYCTL0080: Failed services" =>
{"jboss.persistenceunit.\"NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit\".FIRST_PHASE"
=> "java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found"}} 17:31:53,909
ERROR [org.jboss.as.server] (External Management Request Threads -- 3)
WFLYSRV0021: Deploy of deployment "NOTiFYwell.ear" was rolled back
with the following failure message: {"WFLYCTL0080: Failed services"
=> {"jboss.persistenceunit.\"NOTiFYwell.ear/NOTiFYwellJAR.jar#NOTiFYwellMongoDBPersistenceUnit\".FIRST_PHASE"
=> "java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
org.hibernate.ogm.service.impl.OgmIntegrator not found"}}
Mapped an enity to my MongoDB table and was able to return a 'List' of Entities.
Had to ensure Collection's id type was mapped as:
#Id
#Type(type = "objectid")
private String id;

Problems once migrate jsf 1.2 to jsf 2.2.12

I am migrating project from jsf 1.2 to jsf 2.2.12. After built successful, I deployed to the jboss 7 server and got error message like that:
14:14:10,255 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."myproject-war.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myproject-war.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myproject-war.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(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.richfaces.taglib.ColumnsTag with ClassLoader ModuleClassLoader for Module "deployment.myproject-war.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.LinkageError: loader constraint violation in interface itable initialization: when resolving method "javax.faces.webapp.UIComponentClassicTagBase.getParent()Ljavax/servlet/jsp/tagext/Tag;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/richfaces/taglib/ColumnsTag, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/servlet/jsp/tagext/Tag have different Class objects for the type ervlet/jsp/tagext/Tag; used in the signature
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_80]
at java.lang.Class.privateGetDeclaredFields(Class.java:2509) [rt.jar:1.7.0_80]
at java.lang.Class.getDeclaredFields(Class.java:1819) [rt.jar:1.7.0_80]
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
14:14:10,286 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "myproject-war.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myproject-war.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myproject-war.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myproject-war.war\""}}
14:14:10,484 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment myproject-war.war in 198ms
14:14:10,486 INFO [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."myproject-war.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myproject-war.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myproject-war.war"
[2015-09-30 02:14:10,579] Artifact myproject-war:war exploded: Error during artifact deployment. See server log for details.
[2015-09-30 02:14:10,579] Artifact myproject-war:war exploded: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myproject-war.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myproject-war.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myproject-war.war\""}}
Could you have any idea for this one?
Here are my system detail:
Server: jboss7
Current libs: jsf 1.2, richfaces 3.3.3
Migration libs: jsf 2.2.17
Build: maven
Best regards,
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "javax.faces.webapp.UIComponentClassicTagBase.getParent()Ljavax/servlet/jsp/tagext/Tag;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/richfaces/taglib/ColumnsTag, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/servlet/jsp/tagext/Tag have different Class objects for the type ervlet/jsp/tagext/Tag; used in the signature
java.lang.LinkageError is sign of classpath pollution with multiple different versioned libraries. You'd best let Maven produce a WAR file and then inspect its /WEB-INF/lib for any libraries which doesn't belong there (i.e. libraries which are supposed to be already provided by the target server, such as Java EE, JSP, Servlet, JSF, etc.. in your case with JBoss AS). Then fix the Maven pom.xml accordingly to mark exactly those as provided.
The particular one you got suggests a duplicated javax.servlet.jsp.* API. You'll in /WEB-INF/lib most likely have a jsp-api.jar or another JAR which covers this (e.g. javaee.jar). In that case, you need to mark exactly that dependency in pom.xml as provided. Or, if it's actually jsp-api, then just remove it altogether and use a single javaee-api or javaee-web-api dependency with version 6.0 and scope provided which covers the entire Java EE 6 (Web profile) already, exactly as done by JBoss AS 7.

Resources