Shashank Bezgoan created FORGEPLUGINS-112:
---------------------------------------------
Summary: generate-entities scans SYS schema, when not specified
Key: FORGEPLUGINS-112
URL:
https://issues.jboss.org/browse/FORGEPLUGINS-112
Project: Forge Plugins
Issue Type: Bug
Environment: Eclipse Juno, JBoss Forge, version [ 1.1.2.Final ] + Hibernate tools
Reporter: Shashank Bezgoan
Priority: Critical
While trying to reverse engineer any DB, get the below error.
$ generate-entities --url "jdbc:oracle:thin:@localhost:1521:XE" --user EAS
--password EAS --dialect "org.hibernate.dialect.OracleDialect" --driver
"oracle.jdbc.OracleDriver" --pathToDriver
"C:\work\EWMP\FOS_WS\lib\ojdbc14.jar" --table "TASKDATA"
? In which package you'd like to generate the entities, or enter for default:
[com.bt.wa.model]
org.hibernate.cfg.JDBCBinderException: Duplicate class name
'com.bt.wa.model.AllFileGroups' generated for
'org.hibernate.mapping.Table(SYS._ALL_FILE_GROUPS)'. Same name where generated for
'org.hibernate.mapping.Table(SYS._ALL_FILE_GROUPS)'
***ERROR*** An unexpected error happened during reverse engineering.
at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:173)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:94)
at
org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:43)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)
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:818)
at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:841)
at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:631)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:172)
at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira