[forge-users] Reverse Engineer Entities using customer Hibernate Dialect

forge-users at lists.jboss.org forge-users at lists.jboss.org
Tue Feb 4 17:15:10 EST 2014


Hi all.

I am attempting to reverse engineer a virtual database from Teiid and generate entities using Forge.  However, when I enter the ‘generate-entities’ command, I get a NoClassFound error for the Teiid Dialect.  Now, I am trying to figure out how to get the Teiid Hibernate Dialect jar file on the class path.  I have tried a couple of different things:  dropping the jar in the <forge home>/lib directory as well as adding it as a module.  However, I am still getting the same error.

Any pointers would be greatly appreciated.  
Thanks!
Blaine Mincey

Specifically, this is what I am doing:

$ new-project --named FinancialsWeb --topLevelPackage com.jboss.teiid


$ persistence setup --provider HIBERNATE --container JBOSS_EAP6



$ generate-entities --dialect org.teiid.dialect.TeiidDialect --driver org.teiid.jdbc.TeiidDriver --url jdbc:teiid:Financials --pathToDriver /Users/bmincey/RedHat/jdv/jdv6/jboss-eap-6.1/dataVirtualization/jdbc/teiid-8.4.1-redhat-7-jdbc.jar --user user --password user


This final command throws the following exception which makes sense to me.  I just cannot figure out how to make Forge find the dialect.

org.hibernate.HibernateException: Dialect class not found: org.teiid.dialect.TeiidDialect
[FinancialsWeb] FinancialsWeb $ at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:160)
at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:109)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:138)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2155)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:41)
at org.hibernate.forge.generate.GenerateEntitiesPlugin$1.run(GenerateEntitiesPlugin.java:179)
at org.hibernate.forge.common.UrlClassLoaderExecutor.execute(UrlClassLoaderExecutor.java:13)
at org.hibernate.forge.generate.GenerateEntitiesPlugin.doReverseEngineering(GenerateEntitiesPlugin.java:171)
at org.hibernate.forge.generate.GenerateEntitiesPlugin.generateEntities(GenerateEntitiesPlugin.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)
at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:796)
at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:819)
at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:609)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:186)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: org.teiid.dialect.TeiidDialect from [Module "org.jboss.hibernate.forge.hibernate-tools-plugin:1.2.0-SNAPSHOT-aa91c2fc-bbc0-4865-b3a7-17aee99fd144" from local module loader @6744719c (roots: /Users/bmincey/Java/forge-distribution-1.4.4.Final/modules,/Users/bmincey/.forge/plugins,/Users/bmincey/RedHat/jbds/jbds7.1/studio/plugins/org.jboss.tools.forge.runtime.ext_1.2.1.Final-v20131205-0921-B140/modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:157)

... 45 more



Posted by forums
Original post: https://community.jboss.org/message/856250#856250



More information about the forge-users mailing list