Hi,
This is probalbly something silly.
I have succesfully reversed som tables from postgres.
However when I try to create a sessionFactory the console canot find the xml mapping files.
They are ( like the example ) in my project folder /src/com/wer
the config xml is there also.
In the configuration of the console, I selected these files where is say 'mapping files' but that doesn't help.
I did have a look at the existing posts, but could not find an answer.
Needless to say I am a newbie.
Could somebody help me out?
Thanks.
Hibernate version:
3
Mapping documents:
<?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 name="pgSessFact">
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/testing</property>
<property name="hibernate.cglib.use_reflection_optimizer">true</property>
<property name="hibernate.connection.password">postgres</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<mapping resource="com/rev/PgTsDict.hbm.xml"/>
<mapping resource="com/rev/PgTsCfg.hbm.xml"/>
<mapping resource="com/rev/PgTsParser.hbm.xml"/>
<mapping resource="com/rev/PgTsCfgmap.hbm.xml"/>
<mapping resource="com/rev/Table1.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Full stack trace of any exception that occurs:
org.hibernate.MappingException: Resource: com/rev/PgTsDict.hbm.xml not found
at org.hibernate.cfg.Configuration.addResource(Configuration.java:439)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1369)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1341)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1323)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1290)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1252)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:151)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:128)
at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:50)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:47)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:555)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:505)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:419)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2803)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1569)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:285)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:710)
at org.eclipse.core.launcher.Main.main(Main.java:694)
Name and version of the database you are using:
Postgres 8
|