-
1. Re: How to get more details about the error
koen.aers Jul 17, 2012 2:38 AM (in response to fjkjava)Hi Fabian,
In JBoss Tools/JBDS it is unfortunately not possible to set the verbose output. This is something on our todo list.
And in the meantime, the Hibernate Tools plugins has undergone some changes so the video is not up to date anymore. You need to use the 'datasource add' command to define the datasource and then use the '--datasource' option on the 'generate-entities' command to point hibernate tools to the datasource to use. Let me use is this helps and if not where exactly you run into trouble.
Also stay tuned because there are more changes coming for the Hibernate Tools plugin.
Cheers,
Koen
-
2. Re: How to get more details about the error
fjkjava Jul 17, 2012 4:20 PM (in response to koen.aers)Thanks Koen,
Still no luck.
[workapp] workapp $ datasource add --name workappDS --type HSQL --dialect org.hibernate.dialect.OracleDialect --driver oracle.jdbc.driver.OracleDriver --url jdbc:oracle:thin:@devdb.test.com:1521:dev --user test --pathToDriver C:\Java\Jar\ojdbc6.jar
***ERROR*** Exception encountered: [Error: could not access: devdb; in class: org.jboss.forge.shell.command.fshparser.FSHRuntime]
[Near : {... devdb.test.com:1521:de ....}]
^
[Line: 1, Column: 1] (type "set VERBOSE true" to enable stack traces)
[workapp] workapp $
Thanks
Fabian
-
3. Re: How to get more details about the error
lincolnthree Jul 17, 2012 4:44 PM (in response to fjkjava)1 of 1 people found this helpfulAh, yes. You've run into the magical '@' is a reserved character "Feature" of the Forge Script Language.
You need to put "quotes" around your --url "jdbc:oracle:thin:@devdb.test.com:1521:dev"
That should work
~Lincoln
-
4. Re: How to get more details about the error
fjkjava Jul 17, 2012 6:15 PM (in response to lincolnthree)I added datasource but still couldn't reverse engineer.
[workapp] workapp $ datasource add
[name=ARG (of type java.lang.String)]: workappDS
Enter the dialect to use for the datasource. [org.hibernate.dialect.H2Dialect] org.hibernate.dialect.OracleDialect
Specify the class name for the JDBC driver for the datasource. [org.h2.Driver] oracle.jdbc.driver.OracleDriver
Enter the path in the local file system to the jar file containing the JDBC driver. [null] C:\Java\Jar\ojdbc6.jar
Specify the URL for the JDBC connection. [jdbc:h2:tcp://localhost/sakila] "jdbc:oracle:thin:@devdb.test.com:1521:dev"
Enter the user name for JDBC connection. [sa] test
***SUCCESS***
Data source "workappDS" was saved succesfully:
dialect: org.hibernate.dialect.OracleDialect
driver class: oracle.jdbc.driver.OracleDriver
driver location: C:\Java\Jar\ojdbc6.jar
url: "jdbc:oracle:thin:@devdb.test.com:1521:dev"
user: test
[workapp] workapp $ generate-entities --datasource workappDS --schema testsc
Enter the password for JDBC connection. ********
In which package you'd like to generate the entities, or enter for default: [com.test.workapp.model]
***ERROR*** An unexpected error happened during reverse engineering.
[workapp] workapp $
Fabian
-
5. Re: How to get more details about the error
lincolnthree Jul 17, 2012 6:32 PM (in response to fjkjava)Hmmm... I think Koen may have to help you with this one. He's the expert on the rev-eng plugin.
-
6. Re: How to get more details about the error
fjkjava Jul 18, 2012 12:03 PM (in response to lincolnthree)Thanks Lincoln for your input.
Anybody did this previously?
I am still getting the same error. I tried from a differnt machine completely different environment but still no luck.
Regards
Fabian
-
7. Re: How to get more details about the error
koen.aers Jul 19, 2012 2:21 AM (in response to fjkjava)Hi Fabian,
Normally it should work fine with the H2 sakila database. Did you try that one?
Also, can you give the details of the other environment you used?
I'll try to setup your environment and reproduce your problems.
Cheers,
Koen
-
8. Re: How to get more details about the error
fjkjava Jul 23, 2012 12:08 PM (in response to koen.aers)I know H2 works fine I was able do using postgresql also but oracle still no success. We can't changes the database it should be oracle our ERP is running in oracle. We are planning to start a new project(using EAP 6) next month so I was trying to create a sample before that. I think it is not good to start from the scratch nowadays. So if Forge can give us all entities, session and pages that would be helpful.
We are using Oracle 10g here I tried to reverse engineer from the exiting database(We did many times using seam-gen) but failed. So I downloaded Oracle Database Express Edition 11g Release 2 and created a simple database with only three tables failed again. I am not sure what I am doing wrong it just says **ERROR*** An unexpected error happened during reverse engineering.
Regards
Fabian
-
9. Re: How to get more details about the error
koen.aers Jul 23, 2012 12:40 PM (in response to fjkjava)Hi Fabian,
I'll try to use Oracle Database Express Edition 11g and report back first thing tomorrow.
Cheers,
Koen
-
10. Re: How to get more details about the error
fjkjava Jul 23, 2012 12:59 PM (in response to koen.aers)Thanks Koen I appreciate that
-
11. Re: How to get more details about the error
fjkjava Jul 23, 2012 5:49 PM (in response to koen.aers)Hi Koen,
It may be because of the following error. I tried the same from command line then I got error when I tried to install Hibernate-tools.
[no project] workspace $ forge install-plugin hibernate-tools
Connecting to remote repository [https://raw.github.com/forge/plugin-repository/
master/repository.yaml]... connected!
**INFO** Preparing to install plugin: hibernate-tools
**INFO** Checking out plugin source files to [C:\/TEMP/forgetemp75895753399067
59225/repo] via 'git'
**INFO** Switching to branch/tag [refs/heads/master]
**INFO** Invoking build with underlying build system.
[INFO] Scanning for projects...
.
.
.
Failed loading: org.jboss.hibernate.forge.hibernate-tools-plugin:1.0.5.Final:1.0
.0-SNAPSHOT-c2113dd1-ca11-4b13-aa2e-d9d5dfae4d14
org.jboss.modules.ModuleNotFoundException: Module org.jboss.hibernate.forge.hibe
rnate-tools-plugin:1.0.0-SNAPSHOT-c2113dd1-ca11-4b13-aa2e-d9d5dfae4d14 is not fo
und in local module loader @1ef8cf3 (roots: C:\Forge1.0.5\modules,U:\.forge\plug
ins,C:\workspace)
at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java
:126)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)
at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.j
ava:94)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:204)
at org.jboss.forge.shell.Bootstrap.loadPlugins(Bootstrap.java:225)
at org.jboss.forge.shell.Bootstrap.access$200(Bootstrap.java:55)
at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:131)
at java.lang.Thread.run(Thread.java:619)
Windows? Really? Okay...[no project] workspace $ version
JBoss Forge, version [ 1.0.5.Final ] - JBoss, by Red Hat, Inc. [ http://jboss.org/forge ] -
12. Re: How to get more details about the error
electrobolt Jul 24, 2012 5:44 PM (in response to fjkjava)Hi,
you might want to try to add USERHOME to your local home (e.g. C:\Users\<username) in your environment variable as your plugin is looking at U:\.forge\plugins.
Cheers,
Adrian