- This topic has 5 replies, 5 voices, and was last updated 18 years, 1 month ago by Haris Peco.
-
AuthorPosts
-
DavidGriffithsMemberI am trying to generate Hibernate xml and pojo files from some database tables, but I am getting the error listed in the subject line.
In order to try to troubleshoot, I added and removed features (referenced objects a->b, changed the location where the files were to be saved), and cut the number of tables down to 1.
The “Details” button is greyed out, so I am not sure what’s going on.
My configuration is:
Eclipse 3.2, MyEclipse 5.0, java.runtime.version=1.5.0_06-b05I also see a warning dialog just before the error dialog appears:
“The selected package might contain files that will be overwritten by artifact generation”.
I’ve read through the other recent topics on this subject, but they don’t seem to be applicable. I’d post any log information, but I don’t see any logging in either MyEclipse or Eclipse.
David
Haris PecoMemberDavid,
Please, try follow hibernate quickstart from MyEclipse 5.0 help and ask if it is not enough
If you have correct connection profile and got errors when call myEclipse Hibernate wizard , tehn send details
about your database, jdbc driver (vendor and version)Thanks
Peco
Joel AlvimParticipant@support-snpe wrote:
David,
Please, try follow hibernate quickstart from MyEclipse 5.0 help and ask if it is not enough
If you have correct connection profile and got errors when call myEclipse Hibernate wizard , tehn send details
about your database, jdbc driver (vendor and version)Thanks
PecoHi got the same error….
I’m using an Oracle database (version 8) which MyEclipse DB can explore without any problems. I’m using eclipse 3.2 and MyEclipse 5.
When trying to generate code for any table, I get the following error when pressing finish:
org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:MYSCHEMA
Available schemas:MYOTHERSCHEMASAvailable 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
edwardjsongMemberHad a similar error to David Griffiths and just wanted to share my experience. My solution was to check the jar with your JDBC driver in it. It may have been reduced to 0bytes. The error log is a good place to go to find this error, as you find a ClassNotFoundException, so it should be the first place you go to find what went wrong. Make sure that the JDBC driver is available and in your classpath and you should be good to go.
Peace
FYI Version info:
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_03*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.1.1 GA
Build id: 20060309-4.1.1-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.2
Build id: M20060118-1600Eclipse Platform
Version: 3.1.2
Build id: M20060118-1600Eclipse RCP
Version: 3.1.2
Build id: M20060118-1600Eclipse Java Development Tools
Version: 3.1.2
Build id: M20060118-1600Eclipse Plug-in Development Environment
Version: 3.1.2
Build id: M20060118-1600Eclipse Project SDK
Version: 3.1.2
Build id: M20060118-1600Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\eclipse_3.1.2\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
270_60
-vm
C:\WINDOWS\system32\javaw.exe
Brian FernandesModeratormindwalker,
Could you tell us more about what driver you’re using? Most problems are caused by using drivers named classes12.jar – this series was only for Java 1.3.
If you upgrade to a more recent Oracle driver (usually named ojdbc14.jar) you shouldn’t have a problem.Let us know if you require further assistance,
Brian.
Haris PecoMemberJdbc driver from oracle version 8 (8.1 – I suppose that you use this driver) have bug
Please, usejdbc driver from version 9 (or 10) – you can download one from
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.htmlThis driver will work with oracle >= 8.1.7
Best
Peco -
AuthorPosts