Did somebody manage to get a working application which included these 2 frameworks?
The problem I'm facing is that the dependencies are like this:
magnolia 4.4.5 -> apache jackrabbit 1.6.4 -> apache lucene 2.4.1
hibernate search 3.4.1.Final -> apache lucene 3.1.0
So there's an inconsistency for the lucene version.
And I need a version of hibernate search that's with annotations.
I've really tried to integrate these 2 but with no luck. I hope somebody else managed to.
Thanks :)
We have succesfully used this a long time. It really sucks that Jackrabbit is so slow to update Lucene. That makes it hard. I think you should consider using Solr in a separate JVM just to get rid of this dependency.
Having said that, this is how you can solve it. What defines what is possible is Jackrabbit.
Jackrabbit 1.6.x and you MUST use Lucene 2.4.x. We did that successfully a long time but was then forced to use an old hibernate search. If you want to I can give you that config as well.
But recently when jackrabbit released 2.3.0 it depends on Lucene 3.0.3. It breaks on 3.1.0, so you must use Lucene 3.0.3.
This is our config simplified:
org.apache.jackrabbit:jackrabbit-core 2.3.0
- exclude org.apache.lucene:lucene-core
org.hibernate:hibernate-core:3.6.7.Final
org.hibernate:hibernate-commons-annotations:3.2.0.Final
- exclude org.hibernate:hibernate
org.hibernate:hibernate-search:3.3.0.Final or 3.4.0.CR1
- exclude org.hibernate:ejb3-persistence
- exclude org.apache.lucene:lucene-core
(3.4.0.CR1 is the last hibernate search that depends on Lucene 3.0.3, but if you don't want beta-versions use 3.3.0 or 3.3.1)
org.apache.lucene:lucene-core:3.0.3
Magnolia 4.4.5
The normal Hibernate Annotations project is now included in org.hibernate:hibernate-core:3.6.7.Final so no need to depend on that.
Related
At my company, we're currently rebuilding our core application, and we're considering going with Spring Boot as opposed to just Java-Web, JAX-RS, and Weblogic.
We also built a database lib using hibernate which we use on a lot of our services, but we want to rebuild that too using Spring boot.
Now, what I desperately need is some sort of reverse engineering tool to help with this spring boot + hibernate migration. I know a question like this has been asked: questions on spring boot + hibernate and the answer given was, use a generic DAO.
But I'm working with more than a hundred tables!
Perhaps I'm looking at this the wrong way. Maybe I don't need reverse engineering to handle this massive work. In which case, I need some advice.
Thanks guys!
I already had the same experience. you can managed to generated a reverse engineered annotation based version of your database using hibernate-tools.
to use hibernate-tools you need to find the stable version of the hibernate plugin at http://www.jboss.org/tools/download. find more instruction at:
How to install Hibernate Tools in Eclipse?
Hibernate Tools in Spring Tool Suite 3.6.1
for further information and instruction on how to get to your aim, I propose you to have look at the following links:
http://www.mkyong.com/hibernate/how-to-generate-code-with-hibernate-tools/
How to generate domain objects with annotations using hibernate tools
https://www.youtube.com/watch?v=IU7cwWMDdjU
Notice that once you manage to do a reverse engineering against your DB, hibernate-tools does not offer a configuration with spring boot and you need to provide it in you project.
I know the difference between JPA and specific implementation for example Hibernate or EclipseLink, but what I am interested in, when I download for example Eclipse JAVA EE version, and then in my project use javax.persistence package, which implementation does it use? My guess would be EclipseLink or OpenJPA but how do I know?
I am interested in this because I compared performance of Hibernate and javax.persistence package (just few thousand of rows from db) and the performance gap from my point of view was quite big (about a second)
You can choose it in the JPA Facet pane by using the Platform dropdown. See Eclipse documentation.
If you want to use Hibernate, you have to add it manually in the Eclipse Marketplace. See: JPA Creation - Hibernate not showing in platform
Eclipse EE will bundle EclipseLink via the JPA facet you can add to a project, but other than that it doesn't really provide any specific implementation (you can configure it to provide other implementations if you configure with facet with other user libraries). Your implementation is provided either by libraries, or your app server that you are deploying to. For longer term, a more strategic approach would be to explicitly include an implementation either through dependencies (maven) or referring to/using libraries provided by your app server.
Can Spring-data be used with CouchDB? I know there is a community project Spring-Data-Couchbase but is that compatible with CouchDB or does it only work with Couchbase?
If not, is there a CouchDB version of Spring-data? Or am I unable to use spring-data with CouchDB?
Have a look at https://github.com/rwitzel/CouchRepository
This project provides a Spring Data API for CouchDB databases.
Disclaimer: I have set up the project.
I found this old topic but I want to point out a new project called couch-slacker. The project contains spring data implementation in standard spring data way.
Check it out here
Releases of the project are in maven central so it is very easy to use it.
Disclaimer: I am the founder and tech lead of the project
I have searched everywhere for a list of jars necessary and they don't seem to be available all in one bundle as they are in 4.x. This is my first go at setting it up.
Also, does it matter which version of hibernate validator I use if I'm using Hibernate 3.5?
I would like to use 4.x, but I cannot solve this problem:
Unexpected UnsupportedOperationException on Hibernate validation failure
If you are not using maven for building, you should download the Hibernate bundle from SourceForge. It contains all the dependencies you need.
Also, I have been using Hibernate Validator 4.3.0.Final with Hibernate 3.5.6 final so I think there should be no problem.
You can download the Hibernate Validator bundle at SourceForge too.
In eclipse, the "default implementation library" what jars files do I need to include if I do not want to use server runtime?
I'm refering to this tutorial http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.jpt.doc.user/task_create_new_project.htm
Follow Using TopLink JPA with Dali to get started with the Toplink Essentials (JPA reference implementation). To get the mentioned jars (toplink-essentials.jar and toplink-essentials-agent.jar), download them from there or, if you use Maven, from the Java.Net Maven Repository.
PS: Please note that after 2.0-b36, the toplink-essentials-agent.jar file is no longer needed as the agent facility is now integrated into toplink-essentials.jar. So you can do like below.
$ java -javaagent:toplink-essentials.jar client.Client
Depends on what implementation you want to use. There are currently three most popular implementations: Hibernate, TopLink and EclipseLink.
I know about hibernate that it's README file explains what jars are mandatory for what functions. If you use JPA you must have some sort of EntityManager (hibernate can be used without EntityManager too), so you need all the dependencies of it.
To download hibernate JPA implementation use this link (look for hibernate-entitymanager). You need hibernate core, annotations and entity manager for JPA. If you use all the jars in those three packages you should be ok. But I strongly suggest you to read the README files.