[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-5077) Hibernate session manager error when full class name is used in one-to-many association

Jiri Peterka (JIRA) jira-events at lists.jboss.org
Thu Oct 22 07:47:05 EDT 2009


Hibernate session manager error when full class name is used in one-to-many association
---------------------------------------------------------------------------------------

                 Key: JBIDE-5077
                 URL: https://jira.jboss.org/jira/browse/JBIDE-5077
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: Hibernate
    Affects Versions: 3.1.0.M4
         Environment: eclipse.buildId=M20090917-0800
java.version=1.6.0_0
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.jee.product -debug -consoleLog
            Reporter: Jiri Peterka
         Attachments: Dog.java, Owner.java

STEPS:
1. Create xml mapping files for Dog.java and Owner.java
2. Add files into Mapping in Hibernate Console Configuration
3. Refresh Configuration
ASSERT: No errors occurs

REALITY:
org.hibernate.MappingException: Association references unmapped class: org.example.hibernate.Dog
	at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2380)
	at org.hibernate.cfg.HbmBinder.bindListSecondPass(HbmBinder.java:2231)
	at org.hibernate.cfg.HbmBinder$ListSecondPass.secondPass(HbmBinder.java:2729)
	at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
	at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
	at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:505)
	at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
	at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:94)
	at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:500)
	at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
	at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
	at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
	at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

WORKAROUND: change generated class name to <one-to-many class="Dog" /> instead of generated  <one-to-many class="org.example.hibernate.Dog" /> in mapping XML file

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list