- This topic has 31 replies, 13 voices, and was last updated 14 years, 4 months ago by support-shalini.
-
AuthorPosts
-
Haris PecoMemberhidejay,
Please use real jdbc driver except odbc.See this http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-14575.html for jdbc driver informations
rteodosio,
log4j in hibernate is from hibernate distribution (for hibernate 3.1 it is 1.2.11)
Regards,
Peco
lorelly26_2006MemberPlease help me!
I have problems with Hibernate mapping generation with 5.1.0 GA
Eclipse SDK: 3.1.2
MyEclipse: 5.1.0 GA
Oracle: 9.2
Driver: Oracle thin driverCREATE TABLE MYSCHEMA.Assignments(
project_id NUMBER(10, 0) NOT NULL,
person_id NUMBER(19, 0) NOT NULL,
assigned_date DATE NOT NULL,
CONSTRAINT PK_ASSIGNMENTS PRIMARY KEY (project_id, person_id)
);
CREATE TABLE MYSCHEMA.People(
person_id NUMBER(19, 0) NOT NULL,
person_type VARCHAR2(20) NOT NULL
CONSTRAINT CHK_PERSON_TYPE CHECK (person_type in (‘EMPLOYEE’, ‘CONTRACTOR’)),
first_name VARCHAR2(30) NOT NULL,
last_name VARCHAR2(30) NOT NULL,
identifier VARCHAR2(30) NOT NULL,
CONSTRAINT PK_PEOPLE PRIMARY KEY (person_id)
);CREATE TABLE MYSCHEMA.Projects(
project_id NUMBER(10, 0) NOT NULL,
project_name VARCHAR2(50) NOT NULL,
description VARCHAR2(500) NOT NULL,
project_leader NUMBER(19, 0),
CONSTRAINT PK_PROJECTS PRIMARY KEY (project_id)
);ALTER TABLE MYSCHEMA.Assignments ADD CONSTRAINT FK_PEOPLE
FOREIGN KEY (person_id)
REFERENCES MYSCHEMA.People(person_id);ALTER TABLE MYSCHEMA.Assignments ADD CONSTRAINT FK_PROJECTS
FOREIGN KEY (project_id)
REFERENCES MYSCHEMA.Projects(project_id);ALTER TABLE MYSCHEMA.Projects ADD CONSTRAINT FK_PROJECT_LEADER
FOREIGN KEY (project_leader)
REFERENCES MYSCHEMA.People(person_id);When I Hibernate mapping generation, it give me this error:
An internal error occurred during “Generating Artifacts”java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$ValueIterator.next(Unknown Source)
at com.genuitec.eclipse.hibernate.tool.MESingleClassExporter.doStart(MESingleClassExporter.java:58)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:92)
at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:58)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:390)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:303)Here is 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”><!– Generated by MyEclipse Hibernate Tools. –>
<hibernate-configuration><session-factory>
<property name=”connection.username”>system</property>
<property name=”connection.url”>
jdbc:oracle:thin:@localhost:1521:orcl
</property>
<property name=”dialect”>
org.hibernate.dialect.Oracle9Dialect
</property>
<property name=”myeclipse.connection.profile”>oracle</property>
<property name=”connection.password”>laura26</property>
<property name=”connection.driver_class”>
oracle.jdbc.driver.OracleDriver
</property></session-factory>
</hibernate-configuration>
Thank you in advance!
Haris PecoMemberlorelly26_2006,
I have tested your schema and it works fine.
Could you send more details like :– your jdbc version
– how you add hibernate capabilities and what libraries you use (2.0, 3.0 or 3.1)
– your .myhibernatedata file (in root of your project)Thanks,
lorelly26_2006MemberHi,
I solved the problem. I was connected to the database profile as SYSTEM, not as MYSCHEMA (the user I created).
Thanks for your reply anyway :).
Laura
Haris PecoMemberLaura,
You can call ‘Reverse engineering’ for other user (schema) if you have required permissions.User SYSTEM have all permissions and he can call ‘Reverse engineering’ fro every user.You have other problem or your database have some incorrect settings.
Regards,
warren@roberts.nameMemberI am also getting this error. This is a brand new project and I can’t reverse any tables. I’ve re-installed eclipse 3.2.1 and myeclipse 5.1.0. The table I’m trying to reverse engineer is real simple
create table login (
username varchar(50) primary key not null,
password varchar(50) not null);Here is my hbm file
<?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”><!– Generated by MyEclipse Hibernate Tools. –>
<hibernate-configuration><session-factory>
<property name=”connection.username”>wcroberts</property>
<property name=”connection.url”>
jdbc:mysql://raptor/abundantwellbeing
</property>
<property name=”dialect”>
org.hibernate.dialect.MySQLDialect
</property>
<property name=”myeclipse.connection.profile”>
auser
</property>
<property name=”connection.password”>apwd</property>
<property name=”connection.driver_class”>
com.mysql.jdbc.Driver
</property></session-factory>
</hibernate-configuration>
And here is the stack trace in the logfile
!ENTRY org.eclipse.core.jobs 4 2 2006-12-12 11:29:15.645
!MESSAGE An internal error occurred during: “Generating Artifacts”.
!STACK 0
java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
at java.util.HashMap$ValueIterator.next(HashMap.java:871)
at com.genuitec.eclipse.hibernate.tool.MESingleClassExporter.doStart(MESingleClassExporter.java:58)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:92)
at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:58)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:390)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:303)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)any help would be appreciated.
Haris PecoMemberCould you send us your database and jdbc version ?
Can you see a table in db explorer ?Thanks,
warren@roberts.nameMembermysql Ver 14.12 Distrib 5.0.27, for redhat-linux-gnu (x86_64) using readline 5.0
mysql-connector-java-5.0.4-bin.jar
Yes I can connect to the db with the database explorer. I built two hbm files by hand today and they work fine as well.
Thanx
Warren Roberts
Haris PecoMemberWarren,
Your jdbc driver works with MyEclipse.I am not sure for your database (64-bit), but I think that it is not problem.
Please, check if you use same driver in db explorer (jdbc driver 5.0.4, url jdbc:mysql://raptor/abundantwellbeing and driver class com.mysql.jdbc.Driver)
MyEclipse Reverse engineering doesn’t use hibernate.cfg.xml for connection, it use connection profile info.
It is possible that you have some problems with character setting in database server – could you send me output of ‘SHOW CREATE DATABASE abundantwellbeing’ (you can do it with MyEclipse sql editor)Thanks,
nicola_javaMemberYou must define a primary key for each table 8)
tsadeeshMemberI am getting error while generating the mapping file. Pls find the log file for the same.
eclipse.buildId=M20060921-0945
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86Error
Tue Feb 27 10:07:28 CST 2007
An internal error occurred during: “Generating Artifacts”.org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:RJANARD
Configured catalog:null
Available schemas:
AAGARW4
AAMEND1
AATHREY
ABALAK1
ABALAS1
ABLAIR
ADEMUTH
ADMP
AEBARLE
AGRUBER
AKNUTSO
ALARSO1
ANONYMOUS
APOHLMA
ARIPKA1
ASIMI02
ASIMIO1
ASIMIO2
ASRINI1
ASUDARS
ATHAKUR
ATHANG2
AWATHKE
AWILS35
AWOLD
AWOLFE
AZIEBEL
BANNEST
BATHREY
BBROW16
BEMIS
BENGMAN
BFARWEL
BHART
BHELM
BJARVIS
BKRISH2
BLENER1
BLENERS
BMALLE1
BMCADAMS
BNELSON
BPAJO
BPOEHLI
BRAGHAV
CABTHIR
CALDERJE
CANTONI
CAREONE
CBATHIR
CBENN15
CBIRKHO
CBORUS1
CCANNIZ
CCIUSER
CDONLE1
CERRAM
CFIORESI
CFISCH1
CHANSO5
CHERNA2
CHUBERT
CINMAN
CLEDER1
CLM_01
CLOW
CMANOHA
CMCALMO
CMCCANN
CMCMIL1
CMIDDAU
CMOORE
CMORR17
CMORRIS
CODNLE1
CONEIL3
CONV
CONV_GATE
COTOLA
CPENNIN
CPIERC2
CRYSTAL
CSCHU15
CSTEWA4
CSWANK
CTXSYS
CXAUDIT
CZAKRZE
DALTEND
DBACALZO
DBENTS
DBSNMP
DCASTLE
DCHRIS8
DDACHEL
DDEGROT
DDELHOT
DDELHOTA
DDIENER
DDS
DELANCEJ
DGAFFNE
DGATES3
DGRIKST
DHOLLINS
DHORN
DKASAN
DKOHUES
DORIS
DORIS_GATE
DORIS_QUERY
DPATANI
DPEDDIR
DPODZI2
DSHAMMA
DSTEPHE
DSTEPHEN
DSURPLU
DTRUE
EDALDE
EDALDE1
EDAV17
EDAVI17
EEIDE
EGURUSA
EKNIGH2
ELOEW
EMCHENR
EPIDAEM
ETOOLEY
FCHARET
FGASS
GANDER9
GARMIS
GCAMPBE
GONZALJ4
GPORTMA
GSANTI2
GSPENC1
GVESPER
GVITRAN
HAFNERHS
HANDERS
HBENSO2
HKUTCHE
HWOLF3
IKHACHA
INIEZGO
IRADS
ITCONFIG
ITULLO1
JARENJA
JARNEJA
JCARTUJ
JECALDER
JESSEG
JHAJIAN
JHOSTEN
JJAJJ
JJAVENE
JJOHN51
JJORDAN
JKENNY1
JKOH
JLOEW
JNICHO4
JOCH1
JPARROT
JPARROT2
JPATEL2
JRAO
JROSITZ
JROTHBA
JSAWYE4
JSCHW14
JSTAIB
JSTERL1
JSTINN1
JSUBRAM
JSURJAD
JSWENSO
JTOKACH
JVISPER
KBUDDI
KGHANBA
KGLUR
KGRAINE
KJOHN59
KKIMM
KKOLLE
KLEITCH
KLEWISS
KMILL24
KPARKS3
KREMATA
KSWART1
KVISHWA
KZUBER1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
TBENOI2
TBESUP
TCLM03
TEST
TEST04
TEST1
TEST2
TEST9
TESTCD01
TESTCDLT
TESTED
TESTUSR2
TFEDIE
TGALLMA
THARTM4
TLOKEN
TMILLER
TOOL
TOOLEYE
TPARGHI
TPOLIC1
TSOTODI
TSPENC4
TSTUSER
TTIERNEY
T_PR_RO
UBHUSER
UGUNTUB
UHCDBA
VADDAGU
VBLANTO
VJOHNS6
VKUMA17
VSHAH
VTRAN2
VTRAN3
WKPROXY
WKSYS
WMSYS
XCLM001
XCLM03
XDB
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:104)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:87)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:137)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$6.execute(GenerateArtifactsJob.java:529)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:524)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:296)
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
Haris PecoMembertsadeesh,
There is bug in Oracle jdbc driver (version 8i).Try use newer driver from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
Regards,
sbhas2kMemberHi,
I am also getting the same error. I have gone through all the posts listed here, but my prob was not solved.
I am using Myeclipse 5.1.1 GA, Hibernate 3
I can connect to DB using MyEclipse DBexplorer and i can see all schema’s and other stuff like querying the db etc. But while doing Hibernate reverse engineering i am getting the generating artifacts error.
<?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”><!– Generated by MyEclipse Hibernate Tools. –>
<hibernate-configuration><session-factory>
<property name=”connection.url”>
jdbc:oracle:thin:@172.25.33.102:1521:contact
</property>
<property name=”dialect”>
org.hibernate.dialect.Oracle9Dialect
</property>
<property name=”myeclipse.connection.profile”>DevDB</property>
<property name=”connection.driver_class”>
oracle.jdbc.driver.OracleDriver
</property>
<property name=”connection.username”>XXXXX</property>
<property name=”connection.password”>XXXXX</property></session-factory>
</hibernate-configuration>
I tried to get the error log.. but i cant find PDE Runime-Error log view in windows-show view.
Regards,
Bhaskaran
exlipzSnx7MemberHi all, i’m getting this error as well .. Using MyEclipse Blue addition
[quote]
An internal error occurred during: “Generating Artifacts”.
Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:KTR
Configured catalog:null
Available schemas:
ACC_CTRL
AURORA$ORB$UNAUTHENTICATED
BCARI
CGS
CTXSYS
DBAREP
DBEXP
DBSNMP
DFHR
DFHR3
DFLPROC
DOTNAVY
DYD
FHRD
FOF
GENSEC
GOOFYEXP
HRBAK
HRBAK2
HRMART
HRPLAN
HRTEST
IMPORT
ITS
JON
JSEC
JSEC_TMP
JTRACK
JTRACK_TMP
KTR
KTR_PAS
LOCNAVY
LOGIN
MDSYS
NAVREP
NLRD
OPP
ORDPLUGINS
ORDSYS
OUTLN
PHILINE
PUBS
REP
SCOTT
SDC
SDCFMU
SECURITY
SYS
SYSTEM
TEST
TOAD
TRCK
Available catalogs:
[quote]config file
<?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"> <!-- Generated by MyEclipse Hibernate Tools. --> <hibernate-configuration> <session-factory> <property name="connection.username">KTR</property> <property name="connection.url">jdbc:oracle:thin:@10.121.48.21:1521:goofy</property> <property name="dialect">org.hibernate.dialect.OracleDialect</property> <property name="myeclipse.connection.profile">OracleClass12Driver</property> <property name="connection.password">ktr</property> <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property> <mapping resource="com/myeclipse/hibernatespring/User.hbm.xml" /> </session-factory> </hibernate-configuration>
PLEASE HELP ME!
flytimeMemberjava.lang.NullPointerException
at com.microsoft.sqlserver.jdbc.SQLServerStatement.clearColumnsValues(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.cancelUpdates(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(Unknown Source)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.advance(ResultSetIterator.java:79)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.hasNext(ResultSetIterator.java:42)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:482)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration$1.readDatabaseSchema(MEJDBCMetaDataConfiguration.java:104)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:137)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$7.execute(GenerateArtifactsJob.java:877)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:91)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:858)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:405)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) -
AuthorPosts