-
Website
http://www.javarants.com -
Original page
http://www.javarants.com/2007/10/14/generate-jpa-or-gorm-classes-from-your-database-for-java-and-grails/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
lhl
1 comment · 6 points
-
Jay @ work at home
1 comment · 1 points
-
spullara
17 comments · 4 points
-
Quad Core Imac
2 comments · 1 points
-
Tane Piper
1 comment · 1 points
-
-
Popular Threads
I've read your article and currently I play with Grails and JPA. When I use both together the application hangs.
http://stephan.reposita.org/archives/2007/10/15...
Do you have any ideas? Did you successfully use JPA with Grails?
Thanks
-stephan
The Grails support is tested with the Grail-1.0-RC1 nightly build, not the currently stable release, because there are a number of new features that I needed to leverage. I also just use the built-in Hibernate support rather than trying to call out to the EntityManager myself -- I'm still using GORM, just with my JPA based annotation classes rather than Groovy based GORM classes. The one thing I forgot to note here though is that you have to tell GORM about the annotations:
import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration
dataSource {
configClass = GrailsAnnotationConfiguration.class
Otherwise GORM won't see the domain classes. As for using real JPA APIs I haven't tested it. I will try it later and see what I find.
Sam
java -classpath .;ojdbc5.jar;dbmap-r12.jar com.moonspider.dbmap.Generator -url jdbc:oracle:thin:@192.168.1.220:1521:mydb -user myuser -password mypass -driver oracle.jdbc.driver.OracleDriver -d mydb
Error: java.sql.SQLException: ORA-00942: Tabelle oder View nicht vorhanden
Usage: com.moonspider.dbmap.GenerateConfig
...
Hi Parker,
I've added an issue to the tracker on the site: http://code.google.com/p/dbmapper/issues/detail... . Can you rerun the command line with -Ddebug=true and post the stacktrace to the issue that I've opened?
Thanks,
Sam
thanks for the feedback, I'll try RC1 and see if it works. When you try JPA directly later, it would be nice to drop me a note with
the result, perhaps on my blog / using mail.
Thanks
-stephan