Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
version 3.0, beta 3
eclipse tools version:
3.0, alpha 1
Mapping documents:
eclipse tool generated hibernate.cfg.xml
Code:
<?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">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost/t1db</property>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
</session-factory>
</hibernate-configuration>
No other mapping files are generated or input.
Code between sessionFactory.openSession() and session.close():n/a
Full stack trace of any exception that occurs:Code:
org.hibernate.MappingException: Association references unmapped class: GenerateMap
at org.hibernate.cfg.JDBCBinder.bindCollectionSecondPass(JDBCBinder.java:1178)
at org.hibernate.cfg.JDBCBinder$CollectionSecondPass.secondPass(JDBCBinder.java:1201)
at org.hibernate.cfg.HbmBinder$SecondPass.doSecondPass(HbmBinder.java:2052)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:830)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:801)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:218)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105)
Name and version of the database you are using:hsqldb 1.7.2
oracle 9.2 using oracle jdbc driver 10.1
The generated SQL (show_sql=true):n/a
Debug level Hibernate log excerpt:How can I turn on debug level log for eclipse plugin?
I'm following the steps outlined in the tools' introduction web page:
http://www.hibernate.org/hib_docs/tools/. I successfully created the hibernate.cfg.xml, and the hibernate console. Then I try to 'reverse engineer'. I select destination directory, "Reverse engineer from JDBC connection", "Generate domain code" and "Generate mappings".
I don't know if this exception is expected behavior. I'm expecting the tool to generate all mappings and not complain that one does not exist.
I this is expected behavior, what am I expected to do at this point: hand code the mapping to the class (that doesn't exist yet either)?
I am able to view the table schema using squirrel. The exception indicates that the schema can be read (otherwise, the tool would not have known about the foreign key association - right?)
I run this in a fresh install of eclipse 3.1M4 w/ eclipse tools and jboss plugin 1.4.1, and with a brand-new workspace.
Here is schema reduced to two tables with minimal columns:
Code:
CREATE TABLE "PRICE_CHANGE" (
"PC_ID" VARCHAR(20) NOT NULL,
"PC_STATE" VARCHAR(20) NULL,
"ACTION" VARCHAR(20) NULL,
CONSTRAINT "SYS_C004194"
PRIMARY KEY ("PC_ID")
);
CREATE TABLE "GENERATE_MAP" (
"PC_GEN_ID" VARCHAR(20) NULL,
"GEN_DATE" DATE NULL,
"LCR_PC_ID" VARCHAR(20) NULL,
CONSTRAINT R_31
FOREIGN KEY ("PC_ID")
REFERENCES "PRICE_CHANGE"
);
I apologize if this already appears on this or other hibernate forum. I spent about 30 minutes searching and didn't find this specific problem described. I you know of a topic, could you provide link? or a successful search that would lead me to it? Thanks.
John