Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
0.5.2 has a dependency on eclipselink #2
I get the below error message when using tapestry-model 0.5.2 (don't get it with 0.5.1)
20150213 21:33:24.331 [localhost-startStop-1] ERROR org.apache.tapestry5.ioc.Registry - org/eclipse/persistence/descriptors/DescriptorEventListener
Looking at the code level it looks like 0.5.2 introduced a dependency on eclipselink, but it is not reflected on the pom.xml level.
ElasticSearchIndexMaintainer was there already in 0.5.1 but I have to check the diffs to see what's changed. So you are using JPA but Hibernate as your persistence provider? The complication is that the spec doesn't provide a generic way to listen to persistence events (outside of CDI but that in turn doesn't allow dependency injection of non-CDI entities which we would require). Not sure at the moment what the best remedy is.
Actually I do get the same problem with 0.5.1 as well.
I also tried tapestry-model-hibernate, but getting this error:
20150213 22:55:01.087 [localhost-startStop-1] ERROR org.apache.tapestry5.ioc.Registry - java.lang.NoClassDefFoundError: org/hibernate/service/jndi/JndiNameException
Outside tapestry-model I don't have any issues with jpa/hibernate.
I just explained in my previous comment why there's provider specific code. The thinking was that you'd use ElasticSearch with EclipseLink/JPA and HibernateSearch with Hibernate. Personally, if I wanted to use Hibernate, I'd just use plain tapestry-model-hibernate. Use the Hibernate version provided as a dependency in that case. The best way to use tapestry-jpa with Hibernate is perhaps to use 0.5.0 that doesn't include search at all. I'll have to look if JPA 2.2 has added any listening APIs for the events.
pushed a commit
Feb 22, 2015
I'm using EclipseLink but I wanted to be able to exclude ElasticSearch for a different reason: I'm running on Heroku with a huge DB and not only it takes forever to start but later you can't use the index due Heroku's ephemeral filesystem.
I've separated all the services related to ElasticSearch to a new module called ElasticSearchModule.
This allows you to exclude elasticsearch and eclipselink transitive dependencies from the final war.