[hibernate-dev] OGM (mongodb) on AS 7.1 with Arquillian
Hello, I want to deploy an OGM (mongodb of course) app on AS 7.1 with Arquillian for a demo (at ElsassJUG). I have installed OGM and OGM-monogdb as a module based on the ehcache module (btw, I'll have to create the mongodb part). But when I deploy the app, I have the following error: Caused by: javax.naming.NameNotFoundException: ---PlaceHolderDSForOGM--- -- service jboss.naming.context.java.---PlaceHolderDSForOGM--- Based on the sources, I found this: //we use a placeholder DS to make sure, Hibernate EntityManager (Ejb3Configuration) does not enforce a different connection provider map.put( Environment.DATASOURCE, "---PlaceHolderDSForOGM---" ); The point is I don't know how to avoid this exception. The current version of the project is here: https://github.com/gscheibel/OgmAtElsassJUG The ogm-mongodb module file is here: https://gist.github.com/4588287 The main ogm module file is here: https://gist.github.com/4588301 Any thoughts ? Thanks Guillaume ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] OGM (mongodb) on AS 7.1 with Arquillian
Hi Guillaume, the archive you're deploying needs to define that it depends on the OGM module you installed; in the arquillian tests in OGM we do that by adding an attribute to the Manifest: https://github.com/hibernate/hibernate-ogm/blob/master/hibernate-ogm-integrationtest/src/test/java/org/hibernate/ogm/test/integration/jbossas7/InfinispanModuleMemberRegistrationIT.java#L48 Also I didn't see in your project where you download and install the custom OGM module, I assume you're doing that manually? You can automate that, have a look at the pom of the integration tests. Cheers, Sanne On 22 January 2013 00:20, Guillaume SCHEIBEL wrote: > Hello, > > I want to deploy an OGM (mongodb of course) app on AS 7.1 with Arquillian > for a demo (at ElsassJUG). > I have installed OGM and OGM-monogdb as a module based on the ehcache > module (btw, I'll have to create the mongodb part). > > But when I deploy the app, I have the following error: > Caused by: javax.naming.NameNotFoundException: ---PlaceHolderDSForOGM--- -- > service jboss.naming.context.java.---PlaceHolderDSForOGM--- > > Based on the sources, I found this: > > //we use a placeholder DS to make sure, Hibernate EntityManager > (Ejb3Configuration) does not enforce a different connection provider > map.put( Environment.DATASOURCE, "---PlaceHolderDSForOGM---" ); > > The point is I don't know how to avoid this exception. > > The current version of the project is here: > https://github.com/gscheibel/OgmAtElsassJUG > > The ogm-mongodb module file is here: > https://gist.github.com/4588287 > > The main ogm module file is here: > https://gist.github.com/4588301 > > Any thoughts ? > Thanks > Guillaume > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] OGM (mongodb) on AS 7.1 with Arquillian
Sorry, forgot to copy the list on the original reply...my apologies if you get this twice. This error usually indicates a version mismatch. You likely need to update the hibernate orm module's jar files. An (older) discussion of this can be found here: https://community.jboss.org/thread/195105 On Mon, Jan 21, 2013 at 1:50 PM, Guillaume SCHEIBEL < guillaume.schei...@gmail.com> wrote: > Hello, > > I want to deploy an OGM (mongodb of course) app on AS 7.1 with Arquillian > for a demo (at ElsassJUG). > I have installed OGM and OGM-monogdb as a module based on the ehcache > module (btw, I'll have to create the mongodb part). > > But when I deploy the app, I have the following error: > Caused by: javax.naming.NameNotFoundException: ---PlaceHolderDSForOGM--- -- > service jboss.naming.context.java.---PlaceHolderDSForOGM--- > > Based on the sources, I found this: > > //we use a placeholder DS to make sure, Hibernate EntityManager > (Ejb3Configuration) does not enforce a different connection provider > map.put( Environment.DATASOURCE, "---PlaceHolderDSForOGM---" ); > > The point is I don't know how to avoid this exception. > > The current version of the project is here: > https://github.com/gscheibel/OgmAtElsassJUG > > The ogm-mongodb module file is here: > https://gist.github.com/4588287 > > The main ogm module file is here: > https://gist.github.com/4588301 > > Any thoughts ? > Thanks > Guillaume > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] Should CollectionEntry::snapshot Include The Results Of Queued Operations?
In hibernate 3.6.10, CollectionEntry::snapshot is sometimes initialized after queued operations (SimpleAdd, Clear,etc) are processed. As a result, the snapshot can contain transient entities, and does not accurately reflect the state of the collection in the database. Is this intentional, or should the CollectionEntry::snapshot be taken *after* all queued operations have been performed? For an example of what I'm talking about, see org.hibernate.engine.loading.CollectionLoadContext::endLoadingCollection(Loa dingCollectionEntry, CollectionPersister). This method calls endRead(), which for some collections (like PersistentBag) applies queued operations.Then it calls CollectionEntry::postInitialize(), which takes the initial snapshot of the collection. Sorry to keep bugging you guys about this. (I posted a similar question about the same problem.) I've been having trouble finding good sources of information about Hibernate archecture/how things are "supposed" to work. Thanks! -John ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] OGM (mongodb) on AS 7.1 with Arquillian
Thanks guys, it helped. A running version has been pushed on github 2013/1/21 jonathan wood > Sorry, forgot to copy the list on the original reply...my apologies if you > get this twice. > > This error usually indicates a version mismatch. You likely need to > update the hibernate orm module's jar files. An (older) discussion of this > can be found here: > > https://community.jboss.org/thread/195105 > > > On Mon, Jan 21, 2013 at 1:50 PM, Guillaume SCHEIBEL < > guillaume.schei...@gmail.com> wrote: > >> Hello, >> >> I want to deploy an OGM (mongodb of course) app on AS 7.1 with Arquillian >> for a demo (at ElsassJUG). >> I have installed OGM and OGM-monogdb as a module based on the ehcache >> module (btw, I'll have to create the mongodb part). >> >> But when I deploy the app, I have the following error: >> Caused by: javax.naming.NameNotFoundException: ---PlaceHolderDSForOGM--- >> -- >> service jboss.naming.context.java.---PlaceHolderDSForOGM--- >> >> Based on the sources, I found this: >> >> //we use a placeholder DS to make sure, Hibernate EntityManager >> (Ejb3Configuration) does not enforce a different connection provider >> map.put( Environment.DATASOURCE, "---PlaceHolderDSForOGM---" ); >> >> The point is I don't know how to avoid this exception. >> >> The current version of the project is here: >> https://github.com/gscheibel/OgmAtElsassJUG >> >> The ogm-mongodb module file is here: >> https://gist.github.com/4588287 >> >> The main ogm module file is here: >> https://gist.github.com/4588301 >> >> Any thoughts ? >> Thanks >> Guillaume >> ___ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev >> > > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev