4 Replies Latest reply on Aug 1, 2006 5:42 AM by delerious121

    problem in eclipse hibernate console configuration

    delerious121

      Hi

      i am getting following error in hibernate console of eclipse(v3.1.1)

      Error 2006-08-01 13:54:36.917 org.hibernate.MappingException: Resource: com/TblIntRateIndex.hbm.xml not found
      org.hibernate.MappingException: Resource: com/TblIntRateIndex.hbm.xml not found
      at org.hibernate.cfg.Configuration.addResource(Configuration.java:479)
      at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
      at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1344)
      at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:208)
      at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:155)
      at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:131)
      at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
      at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:112)
      at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:98)
      at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:19)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
      at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

      and my console fails to expand.

      My resource view of my java project in eclipse is as follows

      events
      ---com
      ---*.java
      ---*.hbm.xml
      ---*.class
      ---lib
      ---all libraries
      --- .classpath
      --- .project
      --- hibernate.cfg.xml
      --- hibernate.reveng.xml

      hibernate.cfg.xml file is as follows

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
      <hibernate-configuration>
      <session-factory>
      oracle.jdbc.driver.OracleDriver
      scoreplus
      jdbc:oracle:thin:@BLRKEC24428D:1521:ORCL
      scoreplus
      org.hibernate.dialect.Oracle9Dialect

      <!-- JDBC connection pool (use the built-in) -->
      1

      org.hibernate.hql.classic.ClassicQueryTranslatorFactory

      <!-- Echo all executed SQL to stdout -->
      true









      </session-factory>
      </hibernate-configuration>

      can some one help



        • 1. Re: problem in eclipse hibernate console configuration
          maxandersen

          did you put the build output path into the console configuration classpath ?

          • 2. Re: problem in eclipse hibernate console configuration
            delerious121

            i will mail the folder structure again to avoid confusion

            events
            -------com
            ----------*.java
            ----------*.hbm.xml
            ----------*.class
            -------lib
            ----------all libraries
            -------.classpath
            -------.project
            -------hibernate.cfg.xml
            -------hibernate.reveng.xml



            • 3. Re: problem in eclipse hibernate console configuration
              delerious121

              Thanks for your reply max

              my build output folder is events
              i tried putting the same in configuration class path along with OJDBC14.jar i got following exception

              Error 2006-08-01 15:03:58.733 java.lang.NullPointerException
              java.lang.NullPointerException
              at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationFile(ClassLoaderHelper.java:91)
              at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationURL(ClassLoaderHelper.java:83)
              at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationsURLForResources(ClassLoaderHelper.java:117)
              at org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences.getCustomClassPathURLS(EclipseConsoleConfigurationPreferences.java:81)
              at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:109)
              at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:98)
              at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:19)
              at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
              at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
              at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

              • 4. Re: problem in eclipse hibernate console configuration
                delerious121

                also if you see i have got only one config file \events\hibernate.cfg.xml and when i configure the console i point configuration file parameter of the wizard to this file still the mappings in the wizard are not loaded and when i add them manually by clicking on Add buttons under mapping section

                what gets added is

                \events\com\*.hbm.xml

                is this some path problem??