Announcement Announcement Module
Collapse
No announcement yet.
Error running db-reverse-engineer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error running db-reverse-engineer

    Hi,

    I've setup db-reverse-engineer according to the tutorial but when I run the plugin it seems to fail with some strange exception complaining about ApplicationContextAware not found.

    My Setup is like:
    • IntelliJ IDEA 10.5.2 (but I tried from cmd line as well)
    • JDK 1.6.0_22
    • Grails 2.0.0
    • Oracle 11g (hosted by Ubuntu 10.10 running inside a VMWare)
    • OJDBC6 11.2.0.2.0

    After the "connecting to..." line comes up Oracle goes into high load and after appr. 30-60sec the application crashes.

    Thank you in advance for help!

    Here's the log:
    Code:
    | Loading Grails 2.0.0
    | Configuring classpath
    | Configuring classpath.
    | Environment set to development
    | Environment set to development.
    | Environment set to development..
    | Environment set to development...
    | Environment set to development....
    | Environment set to development.....
    | Packaging Grails application
    | Packaging Grails application.
    | Packaging Grails application..
    | Packaging Grails application...
    | Packaging Grails application....
    | Packaging Grails application.....
    | Compiling 1 source files
    | Compiling 1 source files.
    | Compiling 1 source files..
    | Compiling 1 source files...
    | Compiling 1 source files....
    | Compiling 1 source files.....
    util.GrailsUtil [DEPRECATED] Method ApplicationHolder.setApplication(application) is deprecated and will be removed in a future version of Grails.
    webxml.WebxmlGrailsPlugin Did not find application config file: WebXmlConfig
    webxml.WebxmlGrailsPlugin Did not find application config file: WebXmlConfig
    util.GrailsUtil [DEPRECATED] Method ApplicationHolder.setApplication(application) is deprecated and will be removed in a future version of Grails.
    | Packaging Grails application
    | Packaging Grails application.
    | Compiling 1 source files
    | Compiling 1 source files.
    | Compiling 1 source files..
    | Compiling 1 source files...
    | Compiling 1 source files....
    | Compiling 1 source files.....
    webxml.WebxmlGrailsPlugin Did not find application config file: WebXmlConfig
    webxml.WebxmlGrailsPlugin Did not find application config file: WebXmlConfig
    | Starting database reverse engineering, connecting to 'jdbc:oracle:thin:@192.168.0.128:1521:xe' as 'sdd' ...
    | Starting database reverse engineering, connecting to 'jdbc:oracle:thin:@192.168.0.128:1521:xe' as 'sdd' ....
    | Starting database reverse engineering, connecting to 'jdbc:oracle:thin:@192.168.0.128:1521:xe' as 'sdd' .....
    | Compiling 10 source files
    | Compiling 10 source files.
    | Compiling 10 source files..
    | Compiling 10 source files...
    | Error Error running forked reverse-engineer script: Java returned: 1
    
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:169)
    	at grails.plugin.reveng.Reenigne.class$(Reenigne.groovy)
    	at grails.plugin.reveng.Reenigne.$get$$class$grails$util$GrailsUtil(Reenigne.groovy)
    	at grails.plugin.reveng.Reenigne.execute(Reenigne.groovy:73)
    	at grails.plugin.reveng.Reenigne$execute.call(Unknown Source)
    	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    	at grails.plugin.reveng.RevengRunner.run(RevengRunner.groovy:81)
    	at grails.plugin.reveng.RevengRunner$run.call(Unknown Source)
    	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    	at grails.plugin.reveng.RevengRunner.main(RevengRunner.groovy:28)
    Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAware
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	... 27 more
    
    | Finished database reverse engineering

  • #2
    Getting the same exception! Help

    Hi,
    I am also getting the same exception.
    Did you happen to resolve it some how?

    Thanks

    Comment


    • #3
      I fixed it this way
      Added absolute path to the mysql driver jar in Config.groovy file.

      grails.plugin.reveng.jdbcDriverJarPath = '/home/silver/SVNRoot/mysql-driver/mysql-connector-java-5.1.18-bin.jar'

      This is mentioned in here
      http://grails-plugins.github.com/gra...iguration.html

      Hope this helps you

      Thanks
      Ahsan

      Comment

      Working...
      X