facebook

Error of create DAO and data object

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #259906 Reply

    avseq
    Member

    Myeclipse occur error when I use hibernate ability and DataBase exploer to create DAO and data object.
    Error message :

    
    An internal error occurred during : "Generating Arifacts".
    

    Both Oracle 9i and Oracle 8i occur same error.
    Is there something wrong?

    #259908 Reply

    avseq
    Member

    Error message list below:

    
     !ENTRY org.eclipse.core.jobs 4 2 2006-10-05 14:44:42.847
    !MESSAGE An internal error occurred during: "Generating Artifacts".
    !STACK 0
    org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
        at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
        at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
        at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1877)
        at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:71)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$6.execute(GenerateArtifactsJob.java:514)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:70)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:509)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:293)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    !SESSION 2006-10-05 15:02:38.425 -----------------------------------------------
    eclipse.buildId=M20060629-1905
    java.version=1.4.2_08
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_TW
    Command-line arguments:  -os win32 -ws win32 -arch x86
    
    !ENTRY org.eclipse.wst.internet.cache 1 0 2006-10-05 15:03:19.425
    !MESSAGE wtp.autotest.noninteractive is set. Licenses dialogs will not be displayed.
    
    #259916 Reply

    Haris Peco
    Member

    avseq,

    Please, open hibernate.cfg.xml and in Dialect choose Oracle 9/10g (it will work for Oracle 8i too)
    You can check ‘Hibernate development’ in MyEclipse Help and follow simple quickstart tutorial

    Best
    Peco

    #260028 Reply

    avseq
    Member

    Hi support-snpe!
    Thanks for your reply.I choose Oracle 9/10g when I add Hibernate ability.
    But it also occor error.Is there something I should config?

    
     !ENTRY org.eclipse.core.jobs 4 2 2006-10-07 12:43:38.515
    !MESSAGE An internal error occurred during: "Generating Artifacts".
    !STACK 0
    org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
        at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
        at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
        at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1877)
        at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:71)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$6.execute(GenerateArtifactsJob.java:514)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:70)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:509)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:293)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    
    #260034 Reply

    Haris Peco
    Member

    Have you configure hibernate project with MyEclipse (right click and add Hibernate capabilities).
    If you do it then please send hibernate.cfg.xml

    Thanks

    #260052 Reply

    avseq
    Member

    Thanks for your reply.
    hibernate.cfg.xml list below.

    
    <?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">
    
    <!-- Generated by MyEclipse Hibernate Tools.                   -->
    <hibernate-configuration>
        <session-factory>
            <property name="connection.username">tester</property>
            <property name="connection.url">jdbc:oracle:thin:@192.168.1.12:1521:GROUP1</property>
            <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
            <property name="myeclipse.connection.profile">GROUP1</property>
            <property name="connection.password">tester2</property>
            <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
        </session-factory>
    
    </hibernate-configuration>
    
    #260053 Reply

    Haris Peco
    Member

    You have set dialect correctly – It is possible that Hibernate Reverse Engineering uses other file

    Check hibernate project properties : right click on project, choose Properties , look at MyEclipse-Hibernate node and check if you have correct ‘Active configuration file’.
    Your hibernate.cfg.xml have to be in source folder of your project.

    Regards
    Peco

    #260054 Reply

    avseq
    Member

    I have checked that I have correct ‘Active configuration file’.
    But it also occur the same error.
    My environment :
    Windows 2000 professional with sp4
    Eclipse 3.2 , MyEclipse 5.0M2

    #260206 Reply

    Haris Peco
    Member

    Please, use myeclipse 5.0.1

    Regards
    Peco

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Error of create DAO and data object

You must be logged in to post in the forum log in