facebook

An internal error occurred during: "Generating Artifact

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

    prtferreira
    Member

    Hi there,

    I’m getting this message when i’m trying to mapping the tables using the hibernate generator capabilities. I don’t think that is a JDBC problem because i’m using the ojdbc14.jar and i have access to the table in the DBExplorer and i also can create new tables and it’s working fine. If it was a JDBC problem i couldn’t connect through DBExplorer, right?

    I hope someone can help me.

    hibernate.cfg.xml

    <?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”&gt;

    <!– Generated by MyEclipse Hibernate Tools. –>
    <hibernate-configuration>
    <session-factory>
    <property name=”connection.username”>user</property>
    <property name=”connection.url”>jdbc:oracle:thin:@IP:1521:DTIB1</property>
    <property name=”dialect”>org.hibernate.dialect.Oracle9Dialect</property>
    <property name=”myeclipse.connection.profile”>DEV</property>
    <property name=”connection.password”>pass</property>
    <property name=”connection.driver_class”>oracle.jdbc.driver.OracleDriver</property>

    </session-factory>

    </hibernate-configuration>

    Thanks in advance.

    !ENTRY org.eclipse.core.jobs 4 2 2006-11-08 17:59:39.312
    !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:DTIBRP
    Configured catalog:null
    Available schemas:
    DAA
    DBSNMP
    DTBC_SIGMA
    DTIB02
    DTIBHK
    DTIBRP
    ERWIN
    LMS06
    OPS$ORACLE
    OUTLN
    PERFSTAT
    SYS
    SYSTEM
    TRACESVR
    TSREORG
    UEAIDWH
    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:400)
    at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:65)
    at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration$1.readDatabaseSchema(MEJDBCMetaDataConfiguration.java:102)
    at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:87)
    at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:134)
    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)
    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

    #261537 Reply

    prtferreira
    Member

    I solved the problem…Thanks anyway

    The problem was when i was configurating the database drivers and we choose the Drivers JARs and add the OJDBC14.jar then we have two choices in the driver class name:

    oracle.jdbc.OracleDriver
    oracle.jdbc.driver.OracleDriver

    I was choosed the oracle.jdbc.driver.OracleDriver and it didn’t work…then i choosed the other and it’s working fine now.

    Any question don’t hesitate…

    Thanks.

    #261560 Reply

    Haris Peco
    Member

    prtferreira ,

    Caused by: java.sql.SQLException: Invalid column name

    This is JDBC bug in JDBC version 8.1.7 (you have chosen newer driver probably).It works in DB Explorer, because Db explorer doesn’t use buggy JDBC method (geting comment on columns).

    Try with newer oracle jdbc driver ( http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html ) and you will be able to choose some driver class name (however, oracle.jdbc.driver package is deprecated)

    Regards,

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: An internal error occurred during: "Generating Artifact

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