When I try to setup hibernate tools in eclipse I am unable to get the Session Factory to behave. I have an existing hibernate.cfg.xml I am using from the webapp, it has the existing hbm files defined but no db info (using spring). I made a hibernate.properties with the database info inside it for the eclipse tool. I can view my existing beans/hbm's and I can walk the db from the hibernate view.
What I cannot do is use the session factory, when I click the session factory tree I get the following error:
Code:
!ENTRY org.hibernate.eclipse.console 4 4 2009-05-13 19:06:15.984
!MESSAGE Problems while creating sessionfactory
!SUBENTRY 1 org.hibernate.eclipse.console 4 150 2009-05-13 19:06:15.984
!MESSAGE org.hibernate.MappingException: Could not determine type for: dao.StringToCharUserType, for columns: [org.hibernate.mapping.Column(purpose_code)]
!STACK 0
org.hibernate.MappingException: Could not determine type for: dao.StringToCharUserType, for columns: [org.hibernate.mapping.Column(purpose_code)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.RootClass.validate(RootClass.java:193)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:395)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:390)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:99)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:105)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2009-05-13 19:06:15.984
!MESSAGE org.hibernate.MappingException: Could not determine type for: dao.StringToCharUserType, for columns: [org.hibernate.mapping.Column(purpose_code)]
!STACK 0
org.hibernate.MappingException: Could not determine type for: dao.StringToCharUserType, for columns: [org.hibernate.mapping.Column(purpose_code)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.RootClass.validate(RootClass.java:193)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:395)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:390)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:99)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:105)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I am on a sybase legacy db and have a working UserType dao.StringToCharUserType that converts db char to a java String. Why is this erroring and stopping the session factory from being used?
Thanks in advance!