Hibernate Mapping File not found [message #615568] |
Tue, 26 February 2008 08:31 |
Daniel Gerlach Messages: 36 Registered: July 2009 |
Member |
|
|
Hi,
i want to use two different mapping files. So i defined the
PersistenceOptions.MAPPING_FILE_PATH,
" C:/Users/gerlacdt/workspace/BpelFragmentMining/hibernate2.hb m.xml "). I
tried the absolute path and a relative one, but i always get this
exception:
org.eclipse.emf.teneo.hibernate.HbStoreException: Path to mapping file:
C:/Users/gerlacdt/workspace/BpelFragmentMining/hibernate2.hb m.xml does not
exist!
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel( HbSessionDataStore.java:160)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:74)
at
org.eclipse.emf.teneo.hibernate.HbBaseSessionDataStore.getSe ssionFactory(HbBaseSessionDataStore.java:55)
at
de.uni.stuttgart.gerlacdt.bpel.database.PostgresqlConfigurat ionFragments. <init>(PostgresqlConfigurationFragments.java:24)
at test.DatabaseTest1.createFragmentsTables(DatabaseTest1.java: 46)
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)
...
Is there a special notation for defining the resource path? I saw that the
mapping file is loaded in HbSessionDataStore.class.mapmodel() method. But
my InputStream "is" is always null.
Code:
final InputStream is = this.getClass().getResourceAsStream(element);
Thanks in advance,
Daniel Gerlach
|
|
|
Powered by
FUDForum. Page generated in 0.03326 seconds