facebook

[Closed] Hibernate Mapping Generation problem -4.1GA upgrade

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

    Jason
    Member

    I’m having problems with Hibernate mapping generation after updating to 4.1 GA.

    I go to a database table on an Oracle 9 database and try to create the mapping. I recieve the error

    An internal error occurred during Generating Artifacts

    and no java classes are generated or hibernate files. I’ve used MyEclipse and Hibernate in the last 6 months and had no problems with any of these tables. I went back to a previous version of MyEclipse (version 4.0 Milestone 3) and had no problems. So I expect something has changed in your process. I’ve also tried this on my windows box and my solaris box with the same error. I’ve also tried another Oracle database but it gave me the same error. From the DB browser I can do everything I did before the upgrade. (i.e. view all tables, edit tables, etc.)

    No rush but any help is appreciated. MyEclipse is great by the way. Can’t wait to see the web services tool in the future.
    Thanks,
    Jason

    Here is what the log says.

    !ENTRY org.eclipse.core.runtime 4 2 2006-01-24 10:07:59.235
    !MESSAGE An internal error occurred during: “Generating Artifacts”.
    !STACK 0
    org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
    Configured schema:null
    Configured catalog:corp_portal_studio
    Available schemas:
    ANALYTICS
    CORP_PORTAL_ANALYTICS
    CORP_PORTAL_APP
    CORP_PORTAL_COLLAB
    CORP_PORTAL_CONTENT
    CORP_PORTAL_STUDIO
    CORP_PORTAL_WORKFLOW
    DBSNMP
    MONITOR
    OUTLN
    PERFSTAT
    PITSTOP
    SYS
    SYSTEM
    Available catalogs:

    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
    at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.handleSQLException(JDBCMetaDataDialect.java:86)
    at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:50)
    at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:382)
    at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:62)
    at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration$1.readDatabaseSchema(MEJDBCMetaDataConfiguration.java:82)
    at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:85)
    at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:109)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$5.execute(GenerateArtifactsJob.java:393)
    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:388)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:255)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
    Caused by: java.sql.SQLException: Invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4383)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:667)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
    at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.convertRow(JDBCMetaDataDialect.java:79)
    at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:47)
    … 11 more

    Here is my system configuration.
    *** Date: Tue Jan 24 10:16:38 EST 2006

    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.4.2_03

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 4.1.0 GA
    Build id: 20060122-4.1-GA

    *** Eclipse details:
    Eclipse SDK

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Platform

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse RCP

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Java Development Tools

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Plug-in Development Environment

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Project SDK

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\eclipse3_1\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    18c_60
    -vm
    D:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\javaw.exe

    Here is the table script. I’ve tried a few other tables and it still has the same problem.

    create table “CORP_PORTAL_STUDIO”.”AT_SHOP”(
    “ID” NUMBER(22) PRIMARY KEY not null,
    “QUESTION” VARCHAR2 not null,
    “ANSWER” VARCHAR2,
    “PUBLISH” VARCHAR2,
    “DATE_SUBMITTED” DATE)

    I’m using classes12.zip as the JDBC driver. I also put in ojdbc14.jar and ojdbc14_g.jar afterwards to see if that would help due to the error message. Still getting the same error.

    #245180 Reply

    Riyad Kalla
    Member

    We did make some changes to generation, I will kick this to the guys that worked on it and see what they say.

    #245189 Reply

    Brian Fernandes
    Moderator

    Jason,

    Major changes were introduced in the generation process from 4.1m2 onwards, I think the last version you used was 4.0.3.

    In your driver setup, you mentioned using multiple JAR files, can you remove them all (if you did have all of them there together) and add just ojdbc14.jar? What is the fully qualified name of the Oracle driver you’re using?
    Sanity check: are you sure you’re using Oracle 9 and the correct JDBC driver for it?

    The problem does seem to be that your catalogs are being confused for your schemas, do you have the correct dialect specified in your hibernate.cfg.xml file – also have you got a default_schema attribute specified in the config file?

    Best,
    Brian.

    #245204 Reply

    Jason
    Member

    OK,

    I did as you suggested and did a sanity check with the database. The DBA told me the database is Oracle 9.2.0.4. So I made sure I was using the proper driver (ojdbc14.jar) for that version.

    Everything appears to work great now with the generation process.

    I’m guessing the earlier versions of MyEclipse were more forgiving with the drivers.

    Thanks for such a quick response!!
    – Jason Drury

    #245207 Reply

    Brian Fernandes
    Moderator

    Jason,

    Glad it’s working for you now.

    Best,
    Brian.

    #246739 Reply

    Stocolmo
    Member

    I have the same problem but I’m using MySQL, using the mysql-connector-java-3.1.12-bin
    no files created.

    thanks

    #246740 Reply

    Riyad Kalla
    Member

    Stocolmo can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: [Closed] Hibernate Mapping Generation problem -4.1GA upgrade

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