Hibernate OGM for MongoDB
Tech-Today

Hibernate OGM for MongoDB



So lately I've been playing with Hibernate OGM MongoDB's latest version 5.4.0.Beta2 but I'm not able to run a demo project created from wildfly-javaee7-war archetype following the documentation.

Here are the changes I've made to make it run the Arquillian test:


public static Archive<?> createTestArchive() {
String manifest = Descriptors.create(ManifestDescriptor.class).attribute("Dependencies", "org.hibernate.ogm:5.4 services, org.hibernate.ogm.mongodb:5.4 services")
.exportAsString();

return ShrinkWrap.create(WebArchive.class, "test.war") //
.addClasses(Member.class, MemberRegistration.class, Resources.class) //
.addAsResource(new StringAsset(manifest), "META-INF/MANIFEST.MF") //
.addAsResource("META-INF/test-persistence.xml", "META-INF/persistence.xml") //
// doesn't work on this version
// .addAsResource("jboss-deployment-structure.xml", "WEB-INF/jboss-deployment-structure.xml") //
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") //
// Deploy our test datasource
.addAsWebInfResource("test-ds.xml");
}

Notice that instead of using jboss-deployment-structure file, we use a manifest. Maybe it's a bug in the release.

You can download the complete source code from:





- Wildfly Server Provisioning Elastic Search Integration
I'm interested and would like to evaluate the integration of Elasticsearch to hibernate-search. I'm using the Wildfly container, however, Wildfly's hibernate-search library is a bit outdated: 5.5.8. so I need to find a way to outdate the jars...

- How To Integrate Querydsl In Your Javaee7 Project
This guide requires knowledge on: mavengiteclipsequerydslwild flyWe will show you how to modify the javaee7-archetype project to integrate querydsl. For those who do not know, it is a library to unify queries in java. What I like more about it is that...

- Rest Testing With Arquillian In Jboss
This article will explain how we can automate REST web service testing using Arquillian and JBoss web server. First, you must create a javaee6 war (non-blank) project from jboss-javaee6 archetype. This should create a project with Member model, service,...

- How To Use Primefaces With Jboss 7.1.3
This tutorial will teach us how to use primefaces with jboss 7.1.3. Requirements:  1.) primefaces 3.5  2.) jboss 7.1.3  3.) maven javaee6 generated project (ear, war, ejb) Steps: 1.) Add primefaces module in jboss.   a.) In JBOSS_HOME/modules...

- Java.lang.nosuchmethodexception: Org.hibernate.validator.classvalidator
Note I'm using jboss-5.1.0.GA If you ever encounter the following error: Caused by: org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.(java .lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator,...



Tech-Today








.