Mapeamento de Tabelas com banco já existente
10/12/2012 14:21
0
Bom Dia Galera, sou iniciante em Grails e uma vez ou outra perdemos muito tempo com dúvidas simples, por isso, venho apelar da experiência de vocês, a minha é duvida é a seguinte:

Tenho uma conexão com um banco de dados (Oracle) que está armazenado em um servidor, como faço pra minha aplicação reconhecer e mapear as tabelas desse banco??

Agradeço, e peço desculpas pela a dúvida super noob... !!!
Tags: mapeamento de tabelas


0
Boa tarde, bom no meu caso eu uso Sybase, e tbm sou nova em utilização de grails mais faço assim, nas configurações deve-se configurar o data Source, para o seu banco e depois na classe domínio eu faço assim..


class Ies_ex extends HandlersAudit {

Long id
String codigo
String nm_ies
String login
Date dataHora = new Date()

static mapping = {

table'IES_EX'
id column:'id_ies_ex', generator:'identity'
codigo column:'codigo'
nm_ies column:'nm_ies'
login column:'login'
dataHora column:'dt_hora'
sort'nm_ies'
}

static constraints = {

id()
codigo(blank:false)
nm_ies(blank:false)
login(nullable:true)
dataHora()


}
String toString(){

"${nm_ies}"
}


}

o que liga com a minha tabela é o static mapping. espero ter ajudado.. Boa sorte ai
10/12/2012 15:41


0
:D obg Jessyca, no entanto não existe nenhuma forma mais automatizada ainda, porque já usei um recurso do hibernate que ele consegue fazer todo o mapeamento automaticamente, porque meu banco possui mais de 500 tabelas e se essa for a única forma possível vai dar um trabalhão mapear completamente... :/
10/12/2012 19:18


0
Alysson olha você deve ter usado o plugin do eclipse que mapeia o banco 'legado' estou certo ? eu acho que o Hibernate não tem recurso para mapear um banco já pronto automaticamente, acredito que se você for mapear um banco que já está pronto só assim como a Jessyca passou mesmo.
10/12/2012 20:39


3
Amigo, existe um plugin da própria SpringSource:

http://grails.org/plugin/db-reverse-engineer
http://grails-plugins.github.com/grails-db-reverse-engineer/docs/manual/index.html

Parece ser relativamente simples.


0
Boa José Yoshiriro ... já usei esse plugin e realmente é uma mão na roda...
11/12/2012 19:01


0
Obg galera, vou dar uma conferida no plugin, depois dou um post nos resultados....
11/12/2012 19:36


0
Legal, não conhecia este ;-)
12/12/2012 12:18


0
Ola,

Estou tentando utilizar esse plugin e estou tendo um problema.

Quando eu utilizo o comando grails db-reverse-engineer

Está me retornando o seguinte erro:
|Starting database reverse engineering, connecting to 'jdbc:postgresql://xxxxxx/xxxxx' as 'postgres' ...
Error |
java.lang.NoClassDefFoundError: javax/transaction/Transaction
Error |
at java.lang.Class.getDeclaredMethods0(Native Method)
Error |
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
Error |
at java.lang.Class.privateGetPublicMethods(Class.java:2733)
Error |
at java.lang.Class.getMethods(Class.java:1472)
Error |
at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getSAMMethod(CachedSAMClass.java:160)
Error |
at org.codehaus.groovy.reflection.ClassInfo.isSAM(ClassInfo.java:323)
Error |
at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:313)
Error |
at org.codehaus.groovy.reflection.ClassInfo.access$400(ClassInfo.java:37)
Error |
at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:484)
Error |
at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:475)
Error |
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
Error |
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
Error |
at org.codehaus.groovy.reflection.ClassInfo.getCachedClass(ClassInfo.java:94)
Error |
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:107)
Error |
at org.codehaus.groovy.reflection.ParameterTypes.getParametersTypes0(ParameterTypes.java:78)
Error |
at org.codehaus.groovy.reflection.ParameterTypes.getParameterTypes(ParameterTypes.java:64)
Error |
at groovy.lang.MetaClassImpl.findPropertyMethod(MetaClassImpl.java:2116)
Error |
at groovy.lang.MetaClassImpl.applyStrayPropertyMethods(MetaClassImpl.java:2394)
Error |
at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2252)
Error |
at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3255)
Error |
at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3226)
Error |
at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:483)
Error |
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:210)
Error |
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:241)
Error |
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:251)
Error |
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:259)
Error |
at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:855)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:122)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:163)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
Error |
at grails.plugin.reveng.GrailsJdbcBinder.readDatabaseSchema(GrailsJdbcBinder.groovy:51)
Error |
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:93)
Error |
at org.hibernate.cfg.JDBCBinder$readFromDatabase.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
Error |
at grails.plugin.reveng.GrailsJdbcMetaDataConfiguration.readFromJDBC(GrailsJdbcMetaDataConfiguration.groovy:32)
Error |
at grails.plugin.reveng.GrailsJdbcMetaDataConfiguration$readFromJDBC.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
Error |
at grails.plugin.reveng.Reenigne.buildConfiguration(Reenigne.groovy:114)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
Error |
at grails.plugin.reveng.Reenigne.execute(Reenigne.groovy:60)
Error |
at grails.plugin.reveng.Reenigne$execute.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
Error |
at grails.plugin.reveng.RevengRunner.run(RevengRunner.groovy:81)
Error |
at grails.plugin.reveng.RevengRunner$run.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
Error |
at DbReverseEngineer$_run_closure1.doCall(DbReverseEngineer:36)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
Error |
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
Error |
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
Error |
at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
Error |
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
Error |
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
Error |
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
Error |
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
Error |
at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
Error |
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
Error |
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1152)
Error |
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:807)
Error |
at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
Error |
at groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1272)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1166)
Error |
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
Error |
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
Error |
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
Error |
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
Error |
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
Error |
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
Error |
at gant.Gant.withBuildListeners(Gant.groovy:427)
Error |
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
Error |
at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
Error |
at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source)
Error |
at gant.Gant.dispatch(Gant.groovy:415)
Error |
at gant.Gant.this$2$dispatch(Gant.groovy)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
Error |
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
Error |
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
Error |
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:809)
Error |
at gant.Gant.invokeMethod(Gant.groovy)
Error |
at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
Error |
at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
Error |
at gant.Gant.executeTargets(Gant.groovy:591)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
Error |
at gant.Gant.executeTargets(Gant.groovy:590)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeWithGantInstance(GrailsScriptRunner.java:781)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptFile(GrailsScriptRunner.java:573)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:472)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:423)
Error |
at org.grails.ide.api.impl.GrailsConnectorImpl.executeCommand(GrailsConnectorImpl.java:160)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.run(GrailsProcess.java:130)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.main(GrailsProcess.java:93)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:236)
Error |
at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)
Error |
Caused by: java.lang.ClassNotFoundException: javax.transaction.Transaction
Error |
at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
Error |
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
Error |
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
Error |
at org.codehaus.groovy.grails.cli.support.GrailsRootLoader.loadClass(GrailsRootLoader.java:51)
Error |
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Error |
... 202 more
18/03/2015 17:14


0
Isso eu resolvi, o problema está que esse plugin não roda com hibernate 4 e sim com o 3.
Agora o problema é outro...rsrs
19/03/2015 15:54


0
Agora estou com um problema dizendo que

|Starting database reverse engineering, connecting to 'jdbc:postgresql://10.40.8.23:5432/cbmerjdgst' as 'postgres' ...
Error |
org.hibernate.cfg.JDBCBinderException: Foreign key name (fk_xxx) mapped to different tables! previous: org.hibernate.mapping.Table(esquema.tabela) current:org.hibernate.mapping.Table(esquema.tabela)
Error |
at grails.plugin.reveng.GrailsJdbcBinder.readDatabaseSchema(GrailsJdbcBinder.groovy:60)
Error |
at grails.plugin.reveng.GrailsJdbcMetaDataConfiguration.readFromJDBC(GrailsJdbcMetaDataConfiguration.groovy:32)
Error |
at grails.plugin.reveng.Reenigne.buildConfiguration(Reenigne.groovy:114)
Error |
at grails.plugin.reveng.Reenigne.execute(Reenigne.groovy:60)
Error |
at grails.plugin.reveng.RevengRunner.run(RevengRunner.groovy:81)
Error |
at DbReverseEngineer$_run_closure1.doCall(DbReverseEngineer:36)
Error |
at org.grails.ide.api.impl.GrailsConnectorImpl.executeCommand(GrailsConnectorImpl.java:160)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.run(GrailsProcess.java:130)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.main(GrailsProcess.java:93)


Alguém sabe o que pode ser?
19/03/2015 15:56



Ainda não faz parte da comunidade???

Para se registrar, clique aqui.


Aprenda Groovy e Grails com a Formação itexto!

Newsletter Semana Groovy

Assinar

Envie seu link!


Livro de Grails


/dev/All

Os melhores blogs de TI (e em português) em um único lugar!

 
Creative Commons
RSS Grails Brasil é mantido por itexto Consultoria.
Em caso de problemas contacte Henrique Lobo Weissmann (Kico) por e-mail: kico@itexto.com.br
Todo o conteúdo presente neste site adota o Creative Commons como licença padrão.
Ver: 4.14.0
itexto