Hello,
I am currently studying computer science at university and would like to connect a Java application, which I wrote last semester, to a database and run the application on a application server.
My choice of database fell on MongoDB. The database is hosted via MongoDB Atlas online and is therefore not local. I wanted to use a ORM to get around working with JDBC. Since MongoDB is a NoSQL database, Hibernate OGM seemed to be the better choice. As application server I chose WildFly.
Unfortunately, I have no experience with ORMs or Application Servers and therefore encountered some problems.
At the moment I fail to include the required MongoDB feature pack (Documentation Heading 4.5.1.) and move my properties out of the persistence.xml into a WildFly NoSQL subsystem (Documentation Heading 4.6.1.). I don’t know where to put the subsystem code snippet and when I put it into the standalone.xml, the server is telling me that the subsystem is a unexpected element:
148: <subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
149: <subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
150: <subsystem xmlns="urn:jboss:domain:mongodb:1.0">
^^^^ Unexpected element '{urn:jboss:domain:mongodb:1.0}subsystem'
151: <mongo name="default" id="mongodb" jndi-name="java:jboss/mongodb/client" database="mongodb" module="org.hibernate.ogm.mongodb">
152: <host name="default" outbound-socket-binding-ref="mongodb"/>
153: <properties name="default">
> ParseError at [row,col]:[150,3]
> Message: Unexpected element '{urn:jboss:domain:mongodb:1.0}subsystem'
16:23:39,036 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:143)
at org.jboss.as.server.ServerService.boot(ServerService.java:385)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:374)
at java.lang.Thread.run(Thread.java:748)
16:23:39,038 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
Used components:
- Java 1.8
- Maven
- IntelliJ IDEA (I start the server from here)
- MongoDB 4.0.10 (Hosted via MongoDB Atlas)
- Hibernate OGM 5.4.1.Final
- WildFly 16.0.0.Final
project structure
I didn’t create the jboss-deployment-structure.xml because I added the dependencies in the pom and it is written that that’s enough.
WildFly structure
I added the hibernate-ogm-featurepack-mongodb and hibernate-ogm-featurepack-core zip files manually to the modules in the hope that the server will start.
I think it’s enough to add them to the pom, but I don’t know.
server.log
2019-06-04 15:07:24,396 INFO [org.jboss.modules] (main) JBoss Modules version 1.9.0.Final
2019-06-04 15:07:24,886 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.5.Final
2019-06-04 15:07:24,898 INFO [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final
2019-06-04 15:07:25,063 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) starting
2019-06-04 15:07:25,064 DEBUG [org.jboss.as.config] (MSC service thread 1-2) Configured system properties:
awt.toolkit = sun.awt.windows.WToolkit
ee8.preview.mode = true
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator = \
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = C:\wildfly-16.0.0.Final\jboss-modules.jar
java.class.version = 52.0
java.endorsed.dirs = C:\Program Files\Java\jdk1.8.0_181\jre\lib\endorsed
java.ext.dirs = C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
java.home = C:\Program Files\Java\jdk1.8.0_181\jre
java.io.tmpdir = C:\Users\MARVIN~1\AppData\Local\Temp\
java.library.path = C:\Program Files\Java\jdk1.8.0_181\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\program files\graphicsmagick-1.3.30-q16;C:\Program Files\ImageMagick-7.0.8-Q16;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Users\Marvin Stickel\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\MongoDB\Server\4.0\bin;C:\apache-maven-3.6.1\bin;;C:\Users\Marvin Stickel\AppData\Local\Programs\Microsoft VS Code\bin;.
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.8.0_181-b13
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.8
java.util.logging.manager = org.jboss.logmanager.LogManager
java.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
java.version = 1.8.0_181
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.8
java.vm.vendor = Oracle Corporation
java.vm.version = 25.181-b13
javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder
jboss.home.dir = C:\wildfly-16.0.0.Final
jboss.host.name = ms-surfaceb
jboss.modules.dir = C:\wildfly-16.0.0.Final\modules
jboss.node.name = ms-surfaceb
jboss.qualified.host.name = ms-surfaceb
jboss.server.base.dir = C:\wildfly-16.0.0.Final\standalone
jboss.server.config.dir = C:\wildfly-16.0.0.Final\standalone\configuration
jboss.server.data.dir = C:\wildfly-16.0.0.Final\standalone\data
jboss.server.deploy.dir = C:\wildfly-16.0.0.Final\standalone\data\content
jboss.server.log.dir = C:\wildfly-16.0.0.Final\standalone\log
jboss.server.name = ms-surfaceb
jboss.server.persist.config = true
jboss.server.temp.dir = C:\wildfly-16.0.0.Final\standalone\tmp
line.separator =
logging.configuration = file:C:\wildfly-16.0.0.Final\standalone\configuration/logging.properties
module.path = C:\wildfly-16.0.0.Final\modules
org.jboss.boot.log.file = C:\wildfly-16.0.0.Final\standalone\log\server.log
org.jboss.resolver.warning = true
os.arch = amd64
os.name = Windows 10
os.version = 10.0
path.separator = ;
program.name = standalone.bat
sun.arch.data.model = 64
sun.boot.class.path = C:\Program Files\Java\jdk1.8.0_181\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_181\jre\classes
sun.boot.library.path = C:\Program Files\Java\jdk1.8.0_181\jre\bin
sun.cpu.endian = little
sun.cpu.isalist = amd64
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = C:\wildfly-16.0.0.Final\jboss-modules.jar -mp C:\wildfly-16.0.0.Final\modules org.jboss.as.standalone -Djboss.home.dir=C:\wildfly-16.0.0.Final
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = Cp1252
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.os.patch.level =
user.country = DE
user.dir = C:\wildfly-16.0.0.Final\bin
user.home = C:\Users\Marvin Stickel
user.language = de
user.name = Marvin Stickel
user.script =
user.timezone = Europe/Berlin
user.variant =
[...] The forum post was too long so I had to trim the full log
2019-06-04 15:07:32,093 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "FS-Java-0.1-SNAPSHOT" (runtime-name: "FS-Java-0.1-SNAPSHOT.war")
2019-06-04 15:07:57,037 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0059: Class Path entry xercesImpl.jar in /C:/Studium/WiSe 18-19/FS-Java/target/FS-Java-0.1-SNAPSHOT/WEB-INF/lib/xalan-2.7.0.jar does not point to a valid jar for a Class-Path reference.
2019-06-04 15:07:57,038 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0059: Class Path entry xml-apis.jar in /C:/Studium/WiSe 18-19/FS-Java/target/FS-Java-0.1-SNAPSHOT/WEB-INF/lib/xalan-2.7.0.jar does not point to a valid jar for a Class-Path reference.
2019-06-04 15:07:57,038 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0059: Class Path entry serializer.jar in /C:/Studium/WiSe 18-19/FS-Java/target/FS-Java-0.1-SNAPSHOT/WEB-INF/lib/xalan-2.7.0.jar does not point to a valid jar for a Class-Path reference.
2019-06-04 15:07:57,485 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.module.service."deployment.FS-Java-0.1-SNAPSHOT.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.FS-Java-0.1-SNAPSHOT.war".main: WFLYSRV0179: Failed to load module: deployment.FS-Java-0.1-SNAPSHOT.war
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:116)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
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.modules.ModuleLoadException: Error loading module from C:\wildfly-16.0.0.Final\modules\org\hibernate\ogm\mongodb\5.4\module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:339)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:295)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:256)
at org.jboss.modules.LocalModuleFinder.parseModuleXmlFile(LocalModuleFinder.java:250)
at org.jboss.modules.LocalModuleFinder.lambda$findModule$1(LocalModuleFinder.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:195)
at org.jboss.modules.ModuleLoader.findModule0(ModuleLoader.java:693)
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:686)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:496)
at org.jboss.modules.DelegatingModuleLoader.preloadModule(DelegatingModuleLoader.java:57)
at org.jboss.modules.Module.addPaths(Module.java:1252)
at org.jboss.modules.Module.link(Module.java:1622)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:296)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:280)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:93)
... 8 more
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add artifact '${org.hibernate.ogm:hibernate-ogm-mongodb}' (position: END_TAG seen ... <artifact name="${org.hibernate.ogm:hibernate-ogm-mongodb}" />... @10:71) caused by: java.lang.IllegalArgumentException: ${org.hibernate.ogm:hibernate-ogm-mongodb}
at org.jboss.modules.xml.ModuleXmlParser.parseArtifact(ModuleXmlParser.java:1064)
at org.jboss.modules.xml.ModuleXmlParser.parseResources(ModuleXmlParser.java:950)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:710)
at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:471)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:337)
... 24 more
Caused by: java.lang.IllegalArgumentException: ${org.hibernate.ogm:hibernate-ogm-mongodb}
at org.jboss.modules.maven.ArtifactCoordinates.fromString(ArtifactCoordinates.java:83)
at org.jboss.modules.xml.ModuleXmlParser.parseArtifact(ModuleXmlParser.java:1060)
... 28 more
2019-06-04 15:07:57,492 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "FS-Java-0.1-SNAPSHOT")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.FS-Java-0.1-SNAPSHOT.war\".main" => "WFLYSRV0179: Failed to load module: deployment.FS-Java-0.1-SNAPSHOT.war
Caused by: org.jboss.modules.ModuleLoadException: Error loading module from C:\\wildfly-16.0.0.Final\\modules\\org\\hibernate\\ogm\\mongodb\\5.4\\module.xml
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add artifact '${org.hibernate.ogm:hibernate-ogm-mongodb}' (position: END_TAG seen ... <artifact name=\"${org.hibernate.ogm:hibernate-ogm-mongodb}\" />... @10:71) caused by: java.lang.IllegalArgumentException: ${org.hibernate.ogm:hibernate-ogm-mongodb}
Caused by: java.lang.IllegalArgumentException: ${org.hibernate.ogm:hibernate-ogm-mongodb}"}}
2019-06-04 15:07:57,495 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "FS-Java-0.1-SNAPSHOT.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.FS-Java-0.1-SNAPSHOT.war\".main" => "WFLYSRV0179: Failed to load module: deployment.FS-Java-0.1-SNAPSHOT.war
Caused by: org.jboss.modules.ModuleLoadException: Error loading module from C:\\wildfly-16.0.0.Final\\modules\\org\\hibernate\\ogm\\mongodb\\5.4\\module.xml
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add artifact '${org.hibernate.ogm:hibernate-ogm-mongodb}' (position: END_TAG seen ... <artifact name=\"${org.hibernate.ogm:hibernate-ogm-mongodb}\" />... @10:71) caused by: java.lang.IllegalArgumentException: ${org.hibernate.ogm:hibernate-ogm-mongodb}
Caused by: java.lang.IllegalArgumentException: ${org.hibernate.ogm:hibernate-ogm-mongodb}"}}
2019-06-04 15:07:57,967 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028: Stopped deployment FS-Java-0.1-SNAPSHOT (runtime-name: FS-Java-0.1-SNAPSHOT.war) in 470ms
2019-06-04 15:08:33,743 INFO [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0272: Suspending server
2019-06-04 15:08:33,745 INFO [org.jboss.as.ejb3] (management-handler-thread - 1) WFLYEJB0493: EJB subsystem suspension complete
2019-06-04 15:08:33,751 INFO [org.jboss.as.server] (Management Triggered Shutdown) WFLYSRV0241: Shutting down in response to management operation 'shutdown'
2019-06-04 15:08:33,758 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0010: Unbound data source [java:jboss/datasources/ExampleDS]
2019-06-04 15:08:33,771 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) WFLYMAIL0002: Unbound mail session [java:jboss/mail/Default]
2019-06-04 15:08:33,779 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0019: Host default-host stopping
2019-06-04 15:08:33,789 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0019: Stopped Driver service with driver-name = h2
2019-06-04 15:08:33,844 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 77) WFLYCLINF0003: Stopped client-mappings cache from ejb container
2019-06-04 15:08:33,863 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0008: Undertow HTTP listener default suspending
2019-06-04 15:08:33,864 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0008: Undertow HTTPS listener https suspending
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.friedrichstickel.studentenkalender</groupId>
<artifactId>FS-Java</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>FS-Java</name>
<build>
<plugins>
<!-- Use Java 8 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<archive>
<manifestEntries>
<Dependencies>org.hibernate.ogm:5.4 services</Dependencies>
<Dependencies>org.hibernate.ogm.mongodb:5.4 services</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.build</groupId>
<artifactId>wildfly-server-provisioning-maven-plugin</artifactId>
<version>1.2.11.Final</version>
<executions>
<execution>
<id>server-provisioning</id>
<goals>
<goal>build</goal>
</goals>
<phase>compile</phase>
<configuration>
<config-file>server-provisioning.xml</config-file>
<server-name>wildfly-with-hibernate-ogm</server-name>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- Hibernate OGM -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-bom</artifactId>
<version>5.4.1.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.2</version>
</dependency>
<!-- Unit Testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<!-- Hibernate Search -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>5.11.1.Final</version>
</dependency>
<!-- Hibernate Standard APIs dependencies - provided in a Java EE container -->
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.2.Final</version>
</dependency>
<!-- Hibernate OGM MongoDB Support -->
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-mongodb</artifactId>
<version>5.4.1.Final</version>
</dependency>
<!-- Transaction -->
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
<version>1.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-transaction-spi</artifactId>
<version>7.6.0.Final</version>
</dependency>
<!-- Add the Narayana Transactions Manager
an implementation would be provided in a Java EE container,
but this works nicely in Java SE as well -->
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta</artifactId>
<version>5.9.5.Final</version>
<scope>test</scope>
</dependency>
<!-- Server provisioning compatibility -->
<dependency>
<groupId>org.wildfly.build</groupId>
<artifactId>wildfly-server-provisioning</artifactId>
<version>1.2.11.Final</version>
</dependency>
<!-- WildFly Feature Packs -->
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-featurepack</artifactId>
<version>5.4.1.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-featurepack-core</artifactId>
<version>5.4.1.Final</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-featurepack-mongodb</artifactId>
<version>5.4.1.Final</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.wildfly.nosql</groupId>
<artifactId>wildfly-mongodb-feature-pack</artifactId>
<version>1.0.2.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.wildfly.nosql</groupId>
<artifactId>wildfly-mongodb-driver-feature-pack</artifactId>
<version>1.0.2.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.wildfly.nosql</groupId>
<artifactId>wildfly-mongodbsubsystem</artifactId>
<version>1.0.2.Final</version>
</dependency>
<!-- Dropwizard -->
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>1.3.12</version>
</dependency>
</dependencies>
</project>
server-provisioning.xml
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1">
<feature-packs>
<feature-pack
groupId="org.hibernate.ogm"
artifactId="hibernate-ogm-featurepack-mongodb"
version="5.4.1.Final" />
</feature-packs>
</server-provisioning>
persistence.xml
<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="com.friedrichstickel.studentenkalender" transaction-type="JTA">
<!-- Use Hibernate OGM as JPA provider -->
<provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
<properties>
<!-- The JTA platform to use - JBossAS for the JBoss/WildFly Application Server -->
<property name="hibernate.transaction.jta.platform" value="JBossAS"/>
<!-- Use MongoDB as datastore provider -->
<property name="hibernate.ogm.datastore.provider" value="mongodb"/>
<property name="hibernate.connection.resource" value="java:jboss/mongodb/client"/>
</properties>
</persistence-unit>
</persistence>