-
1. Re: JBossIDE Hibernate 3.x... Howto
maxandersen Nov 15, 2005 3:09 PM (in response to renkrad)the configuration have not changed since these viewlets. Also check the documentation and especially the new and noteworthy to see changes.
-
2. Re: JBossIDE Hibernate 3.x... Howto
renkrad Nov 16, 2005 8:22 AM (in response to renkrad)Max i heve read them... Both, the demonstration of the Hibernate 1.5 and the what's new for the hibernate 3.x (not the release notes between those 2 versions).
Anyway, i posted this topic because i'm having some problems opening the Hibernate Configurations view. It throws an exception when i try to open the configuration i defined. The exception referes that the class should have one of the specified anotations, though the class defines the "@javax.persistence.Entity".
Heres the Stacktrace :org.hibernate.AnnotationException: Annotated class should have a @javax.persistence.Entity, @javax.persistence.Embeddable or @javax.persistence.EmbeddedSuperclass annotation: <MY CLASS> at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:334) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:256) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:191) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1138) at org.hibernate.console.ConsoleConfiguration$2.execute(Unknown Source) at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source) at org.hibernate.console.ConsoleConfiguration.execute(Unknown Source) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(Unknown Source) at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(Unknown Source) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(Unknown Source) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
-
3. Re: JBossIDE Hibernate 3.x... Howto
maxandersen Nov 16, 2005 8:27 AM (in response to renkrad)hmm - did you by any chance add ejb3 persistence jars to your console classpath? Don't! ;)
-
4. Re: JBossIDE Hibernate 3.x... Howto
renkrad Nov 16, 2005 10:11 AM (in response to renkrad)"max.andersen@jboss.com" wrote:
hmm - did you by any chance add ejb3 persistence jars to your console classpath? Don't! ;)
I didn't, at least to the console, though i added them to tha classpath of the project.
Created a new project without them defined explicitly in the classpath, using unstead the JBoss lib reference proviided by the eclipse, and it worked. Well it didn't throw any exception, and the only thing that apears on the configurations is the data base schema... The "configuration" and "SessionFactory" tree nothing appears.
I'm going crazy with this :|
Is it necessary to create a "persistence.xml" and a "persistence.properties"?
------------------
Here are the steps to use the hibernate :
- Create a Configuration file
- Create a console configuration
- Execute the Artifact Generation (Creates all beans with the anotations)
- Then i open the Hibernate Configurations View (Here only the database schema appears)
I'm i doing something wrong?
Thanx,
Daniel Campelo -
5. Re: JBossIDE Hibernate 3.x... Howto
maxandersen Nov 16, 2005 10:50 AM (in response to renkrad)no you are doing it right. If nothing comes up in the sessionfactory/configuration then no mappings have been found. Make sure they are listed in hibernate.cfg.xml
-
6. Re: JBossIDE Hibernate 3.x... Howto
renkrad Nov 16, 2005 12:01 PM (in response to renkrad)"max.andersen@jboss.com" wrote:
no you are doing it right. If nothing comes up in the sessionfactory/configuration then no mappings have been found. Make sure they are listed in hibernate.cfg.xml
Yes there were 2 hibernate.cfg.xml in the project :S
It gives an exception again.
"org.hibernate.MappingException: duplicate collection role mapping: myPackage.Test1.test2es"
Is there any FAQ that i can consult about the eclipse view "hibernate configurations"?
This is almost a walkthrought of the configuration problems :|
Daniel Campelo