java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy

Hibernate JIRA | Rich Taylor | 8 years ago
  1. 0

    When trying to execute a hibernate tools generation in Eclipse Ganymede with a custom ReverseEngineeringStrategy class, the class cannot be found by hibernate tools. I only get this error when the project is set to use JDK 6. If I lower it to JDK 5 the issue goes away. Here is the resulting stack trace when executing the generation: org.hibernate.console.HibernateConsoleRuntimeException: Could not create or find com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy with one argument delegate constructor at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:358) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880) at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341) ... 12 more !SUBENTRY 1 org.hibernate.eclipse.console 4 666 2008-09-10 15:02:02.570 !MESSAGE java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy !STACK 0 java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880) at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) See here for more information: http://forum.hibernate.org/viewtopic.php?p=2395107#2395107

    Hibernate JIRA | 8 years ago | Rich Taylor
    java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
  2. 0

    When trying to execute a hibernate tools generation in Eclipse Ganymede with a custom ReverseEngineeringStrategy class, the class cannot be found by hibernate tools. I only get this error when the project is set to use JDK 6. If I lower it to JDK 5 the issue goes away. Here is the resulting stack trace when executing the generation: org.hibernate.console.HibernateConsoleRuntimeException: Could not create or find com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy with one argument delegate constructor at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:358) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880) at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341) ... 12 more !SUBENTRY 1 org.hibernate.eclipse.console 4 666 2008-09-10 15:02:02.570 !MESSAGE java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy !STACK 0 java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880) at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) See here for more information: http://forum.hibernate.org/viewtopic.php?p=2395107#2395107

    Hibernate JIRA | 8 years ago | Rich Taylor
    java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
  3. 0

    XMind Pro in a MAC OS (Leopard)

    Google Groups | 8 years ago | aribe...@gmail.com
    java.lang.ClassNotFoundException: org.xmind.ui.carbon.OpenDocumentHook
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Eclipse plugin: Trying to load JDBC Driver via Class.forName("...")

    Google Groups | 1 decade ago | georg....@gmail.com
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
  6. 0

    java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver - Using BIRT with Maximo - BIRT Developer Center

    actuate.com | 7 months ago
    java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassNotFoundException

      com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy

      at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal()
    2. Eclipse OSGi
      DefaultClassLoader.loadClass
      1. org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481)
      2. org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
      3. org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
      4. org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
      4 frames
    3. Java RT
      Class.forName
      1. java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      2. java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
      3. java.lang.Class.forName0(Native Method)
      4. java.lang.Class.forName(Class.java:164)
      4 frames
    4. Hibernate
      ReflectHelper.classForName
      1. org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
      1 frame
    5. org.hibernate.eclipse
      CodeGenerationLaunchDelegate$2.execute
      1. org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341)
      2. org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339)
      3. org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303)
      3 frames
    6. org.hibernate.console
      ConsoleConfiguration.execute
      1. org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
      2. org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
      2 frames
    7. org.hibernate.eclipse
      CodeGenerationLaunchDelegate.launch
      1. org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283)
      2. org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216)
      3. org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136)
      3 frames
    8. Debug Core
      LaunchConfiguration.launch
      1. org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764)
      2. org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614)
      2 frames
    9. org.eclipse.debug
      DebugUIPlugin$7.run
      1. org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880)
      2. org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966)
      2 frames
    10. JFace
      ModalContext$ModalContextThread.run
      1. org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
      1 frame