facebook

create an hibernate mapping, the error occurs.

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

    gonwy1976
    Member

    hi,can you help me?

    when i create an hibernate mapping, the error occurs. Error detail:
    An internal error occurred during: “Generating Artifacts”.
    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$5.execute(GenerateArtifactsJob.java:405)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
    at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:400)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:266)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

    eclipse.buildId=M20060118-1600
    java.version=1.4.2_03
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
    Command-line arguments: -os win32 -ws win32 -arch x86

    myeclipse version = 4.1.1GA
    oracle=10.1.0.2
    oracle driver=ojdbc14_10.2.0.2.zip

    #265702 Reply

    gonwy1976
    Member

    applicationContext.xml:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”&gt;

    <beans>

    <bean id=”dataSource” class=”org.apache.commons.dbcp.BasicDataSource”>
    <property name=”driverClassName”>
    <value>oracle.jdbc.OracleDriver</value>
    </property>
    <property name=”url”>
    <value>jdbc:oracle:thin:@***.***.***.***:1521:****</value>
    </property>
    <property name=”username”>
    <value>*****</value>
    </property>
    <property name=”password”>
    <value>*****</value>
    </property>
    </bean>
    <bean id=”sessionFactory” class=”org.springframework.orm.hibernate3.LocalSessionFactoryBean”>
    <property name=”dataSource”>
    <ref bean=”dataSource” />
    </property>
    <property name=”hibernateProperties”>
    <props>
    <prop key=”hibernate.dialect”>org.hibernate.dialect.Oracle9Dialect</prop>
    </props>
    </property>
    </bean>
    </beans>

    #265713 Reply

    Haris Peco
    Member

    Your applicationContext.xml looks fine.
    Have you defined hibernate property correctly : right click on project, Properties>MyEclipse>Hibernate
    – choose you applicationContext.xml and sessionFactory for ‘Spring LocalSession FactoryBean Id’

    Regards

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: create an hibernate mapping, the error occurs.

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