It looks like either
1) you are not in the context of a project -> you should first create a project that will contain the generated entities
2) persistence is not set up for the project -> you need to issue 'persistence setup...' before generating the entities
The error message is not very helpful indeed... I'll do something about that.
Also, you can predefine datasources using the 'datasource' plugin. This one can be used outside the context of a project. It will be helpful to later on generate your entities as you can just specify the predefined datasource so the generate-entities command does not ask you the details of the connection over and over again.
I'll write up some more documentation for these plugins in the very near future.
Hope this helps!
Thanks for your reply Koean,
well I've sorted out the issue which was due to an error in my proxy configuration (which prevented the hibernate plugin to get installed correctly)
Moving on, I've tried to reverse engineer my Oracle tables, but I've found the following error:
[as7forge] as7forge $ generate-entities --table Customer --driver oracle.jdbc.driver.OracleDriver --dialect org.hibernate.dialect.Oracle9Dialect
? Specify the URL for the JDBC connection. [jdbc:h2:tcp://localhost/sakila] jdbc:oracle:thin:@localhost:1521:ORACLE
? Enter the user name for JDBC connection. [null] scott
? Enter the password for JDBC connection. ******
? Enter the path in the local file system to the jar file containing the JDBC driver. [null] C:\forge-distribution-1.0.5.Final\lib\ojdbc14.jar
? In which package you'd like to generate the entities, or enter for default: [com.sample.model]
***ERROR*** An unexpected error happened during reverse engineering.
org.hibernate.cfg.JDBCBinderException: Duplicate class name 'com.sample.model.Syscatalog' generated for 'org.hibernate.mapping.Table(SYS.SYSCATALOG_)'. Same name where generated for 'org.hibernate.mapping.Table(SYS.SYSCATALOG_)'
I've tried also setting the --catalog and --schema option, however nothing worked for me.
Any help ?
Shame on us! :-)
Apparently the filter options for tables, catalogs and schemas are never used by the plugin.
I'll work on that today.
thanks for the great work @Forge. In case you might be interested, I've blogged about the Forge hibernate plugin here. Just one thing: I've hit a type mismatch on the Entity Primary key which is coded as Integer in Entity class and as Long in the view Bean class. Not tried on other DBs so I'm not sure if this issue is specific of MySQL.
Keep forging :-)