How to install JPA persistence provider in spring roo project? - gwt

I am looking SpringSource Tool Suite with Google Integration and I am getting that hint when I define persistence setup.
hint:"Command 'persistence setup --provider DATANUCLEUS --database HYPERSONIC_IN_MEMORY' was found but is not currently available (type 'help' then ENTER to learn about this command)"...
and help is saying that: * persistence setup - Install or updates a JPA persistence provider in your project
how can I install JPA persistance provider to my project?

Have you tried with another provider? i.e for Hibernate it would be something like:
persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
I believe you can choose between ECLIPSELINK, HIBERNATE and OPENJPA.

I had a similar problem and I solved it creating the project using Roo instead of the Eclipse ide.
You can do it typing this in the Roo console in Eclipse:
project --topLevelPackage com.company.projectName

Depending on the version of Roo, the keywords have changed. In Spring-Roo version 1.2 and above:
roo> jpa setup --provider ECLIPSELINK --database H2_IN_MEMORY
Earlier versions of the persistence framework configuration use a persistence setup command, which has changed to the newer jpa setup in light of support for configuring non-SQL databases.

Related

JPA Eclipse link from Open JPA - IBM WAS 8.5.12 server

I would like to migrate to Eclipse link and JPA 2.1 on IBM WAS server and DB2. Could you please advice the sets need to be followed? If anyone used before, please explain to us what are the things to have cared?
I am going through the document - https://developer.ibm.com/wasdev/docs/can-i-use-jpa-2-1-on-websphere-application-server/
If you want JPA 2.1 I'd strongly suggest to migrate to WebSphere Liberty (preferably) , as it fully supports that and you already have license for that if you have WAS 8.5, or migrate to tWAS 9.0. On WAS 8.5.x you will have to disable JPA scanning, use application-managed persistence, create shared liberary.... not really worth.
In addition to server settings changes you will have to migrate your app from OpenJPA to EclipseLink. There is free Eclipse plugin - WebSphere_Application_Server_Migration_Toolkit that you can configure to scan your application sources for OpenJPA -> EclipseLink migration.
But also for WAS 8.5.x -> WebSphere Liberty migration ;-)

Upgrading GlassFish 3.1.2.2 to use JPA 2.1

I am working with GlassFish 3.1.2.2 (I can not upgrade to 4 due to OS restrictions).
I'm interested in upgrading JPA 2.0 to JPA 2.1 GlassFish 3.1.2.2. How can I achieve this?
This is most likely not possible at all. JPA 2.1 is part of EE 7 and therefore not fully integrated with EE 6 GF 3.1.2.2.
Did you try just replacing the EclipseLink and JPA jar files in Glassfish?
It will probably work, but if you use managed persistence units they will not expose any JPA 2.1 API, you would need to unwrap the EntiyManager to access these.
I'm using Hibernate 4.3.8 (requires JPA 2.1) with Glassfish 3.1.2.2.
Note: I'm not using any services provided by glassfish. All the libraries I use are in the WEB-INF/lib.
1 - Override all JPA classes (package javax.persistence) in glassfish/modules/javax.persistence.jar with JPA 2.1 version. You should not replace the entire JAR, only override the classes. This JAR has an OSGI manifest and other classes that must remain there.
2 - Remove all javassist classes (package javasssist) from glassfish/modules/weld-osgi-bundle.jar. This solves a possible incompatibility if you are using Hibernate.

Equinox OSGi + JPA Eclipselink + PAX JDBC driver adapter

After many problems with "CLASS NOT FOUND" problems in OSGi working with JPA persistence & Eclipse link, I found some article introducing PAX JDBC driver adapter.
Does anybody has some experience with this ?
Pax JDBC should be fairly straightforward to use. Just check out the docs.
In combination with Eclipselink, you should probably stay clear of the Eclipselink OSGi adapter which has an unnecessary dependency on Eclipse Gemini DBAccess, at least last time I looked at it.
Pax JPA is an incubating project which provides OSGi Enterprise compliant adapters for Eclipselink and OpenJPA.

flex blazeds spring jpa hibernate under eclipse project

I'm looking for a tutorial where the following technologies: flex blazeds spring jpa hibernate are use into eclipse to create a Java EE web dynamic project.
I wish that the jpa and hibernate will be auto-generated by an orm plugin (such as hibernate tools, or other one).
the dao and dto will be both implemented in this architecture.
and why not using the springsource tools suite under eclipse.
I'm working with the eclipse galileo SR2, mysql as database and tomcat, but for the two last technolgies other ones are welcome.
I agree, this is a very general question. Try this tutorial though, it will help you with Flex and Spring integration.

Eclipse, JPA 2.0 metamodel generator and Spring Roo working together

Is there a way to put Spring Roo and JPA 2.0 metamodel generator to work together?
I have a Spring Roo project and use Eclipse as IDE. I was able to configure the Eclipse project and maven pom.xml to use JPA 2.0 metamodel generator in the build/compile process. The problem is, the generator doesn't generate metamodel classes for Roo entities (that is, domain classes that are annotatted with #Roo* annotations).
I created an entity "by hand" and confirmed that the generator is properly configured. I suspect that the generator fail for Roo entities because it doesn't understand AspectJ IDT classes. Is there a way to make the generator work for Roo entities?
Oh, before I forget, these are my configurations:
STS 2.5.1
Spring Roo 1.1.0
Project configuration:
Annotation processing enabled
Factory path contains hibernate-jpa-2.0-api-1.0.0.Final.jar and hibernate-jpamodelgen-1.1.0.Final.jar
pom.xml
Included http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo as a plugin repository
Added org.hibernate:hibernate-jpamodelgen:1.1.0.Final as dependency
Added and configured org.codehaus.mojo:build-helper-maven-plugin:1.5 to include src/generated/java as a maven source folder
Added and configured org.bsc.maven:maven-processor-plugin to run org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor and place the generated code at src/generated/java
I can give further details if necessary. Thanks in advance.
You should probably take a look at model2roo project.
http://code.google.com/p/model2roo/