facebook

Reverse Engineering – TopLink – Oracle

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

    batkinson
    Member

    Hello,

    I am trying to use the JPA reverse engineering tool. I am using TopLink essentials, with an Oracle 10g XE database. When I try to generate the entities and DAOs, I keep getting the following error (taken from the log file)

    
    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:409)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:119)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1929)
        at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:73)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$7.execute(GenerateArtifactsJob.java:856)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:837)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:401)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    
    
    

    What confuses me is that I’m not using hibernate; I’m using TopLink.

    I am able to connect to the Oracle db in the Database explorer.

    My persistence.xml file looks like this:

        <persistence-unit name="SampleJPAOraclePU" transaction-type="RESOURCE_LOCAL">
            <provider>oracle.toplink.essentials.PersistenceProvider</provider>
              <properties>
                <property name = "toplink.jdbc.driver" value = "oracle.jdbc.driver.OracleDriver"/>
                <property name = "toplink.jdbc.url" value = "jdbc:oracle:thin:SYMSERVER/Symserver@localhost:1521:XE"/>
                <property name = "toplink.jdbc.user" value = "symserver"/>
                <property name = "toplink.jdbc.password" value = "********"/>
                <property name = "toplink.platform.class.name" value = "oracle.toplink.essentials.platform.oracle.OraclePlatform" />
              </properties>
        </persistence-unit>

    I’m using

    MyEclipse Enterprise Workbench Version: 6.0.1 GA

    I have been able to successfully generate entities and DAOs using the MyEclipse Derby connection.

    Thanks for the help,
    Bryan

    #280882 Reply

    Loyal Water
    Member

    Bryan,
    Can you go to Project Properties, under MyEclipse, and see which icons are lit up… do you have JPA capabilities on that project?

    #280893 Reply

    batkinson
    Member

    Hi Nipun,

    Yes, the JPA icon is lit up. It is the only one.

    Bryan

    #280942 Reply

    Riyad Kalla
    Member

    Bryan,
    I’m totally baffled by this one… So if you go to the DB explorere, and rev-eng our Derby database into the *same* project, it works fine… but if you do the exact same actions with your Oracle connection, it starts giving you Hibernate errors? (you are positive you are selecting JPA from the Rev Eng menu right?)

    #280986 Reply

    batkinson
    Member

    Hi Riyad,

    Thanks for your reply. I was actually doing the rev-eng from different projects, but I followed the same process. ie. create project, add jpa capabilities attaching to db driver, then reverse engineering a table. Closing all projects but one, then reverse engineering the oracle database into the project that the Derby database worked with solved the problem. I’m not sure exactly what happened, but I suspect I had some configuration problems on the second project. Your hint about the *same* project solved it.

    Thanks very much.
    Bryan

    #280996 Reply

    Riyad Kalla
    Member

    Bryan,
    I’m really glad it’s working now, cause I had no idea what to suggest next. Let’s chalk it up to code-goblins 😉

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Reverse Engineering – TopLink – Oracle

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