Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Failing to update a model that is persisted in the DB [Teneo/Hibernate]
Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #118778] Thu, 17 April 2008 12:19 Go to next message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

hi,
i'm trying to implement saving/loading to/from database in a Eclipse EMF
project using Teneo/Hibernate.
saving/loading is also working somewhat fine (creates mapping, tables and
stuff quite fine), but once i've loaded something from the DB i can not
save it anymore.
creating new models and saving them works fine, also loading them from the
DB again is doing well. but i neither can save the same model twice, nor
can i load and then save the model again.

i'm quite new to this kind of stuff, so maybe it is (hopefully) just
because i'm plain stupid and don't see an obvious error.

I hope you can pin down my errors or maybe tell me where to look more
closely. thx for your patience :)

Hibernate version: 3.2.6

Name and version of the database: HSQLDB 1.8.0.9

exeptions that apear are:
Illegal attempt to associate a collection with two open sessions
if i load the model and save afterwards

and:
Don't change the reference to a collection with
cascade="all-delete-orphan"

if i try saving twice.


public static boolean doSaveToDB(String fileName, HbDataStore hbds) 
{ 
   if (!session.isOpen()) 
   { 
      session = sessionFactory.openSession(); 
      session.setFlushMode(FlushMode.MANUAL); 
      tx = session.getTransaction(); 
   } 
   tx.begin(); 

   try 
   { 
      
session.saveOrUpdate(editingDomain.getResourceSet().getResources().get(0).getContents().get(0)); 
   } catch (HibernateException e) 
   { 
      e.printStackTrace(); 
   } 
   session.flush(); 
   tx.commit(); 
   if (session.isOpen()) 
   { 
      session.clear(); 
      session.close(); 
   } 

   return true; 
}


public static Modell loadExistingModellFromDB(String fileName, HbDataStore 
hbds) 
{ 
   if (!session.isOpen()) 
   { 
      session = sessionFactory.openSession(); 
      session.setFlushMode(FlushMode.MANUAL); 
      tx = session.getTransaction(); 
   } 

   URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName); 
   Modell model = null; 
   tx.begin(); 
   try 
   { 
      try 
      { 
         
editingDomain.getResourceSet().getResources().get(0).load(Collections.EMPTY_MAP); 
      } catch (IOException e) 
      { 
         e.printStackTrace(); 
      } 

      BigInteger fileID = new BigInteger(fileName); 
      BigInteger ID = null; 
      try 
      { 
         for (int i = 0; !fileID.equals(ID) || (fileID.compareTo(ID) < 0) 
; i++) 
         { 
            editingDomain.getResourceSet().getResources().clear(); 
            editingDomain.getResourceSet().createResource(resourceURI); 
            editingDomain.getResourceSet().getResource(resourceURI, true); 
            model = (Modell) 
editingDomain.getResourceSet().getResources().get(0).getContents().get(i); 
            List models = session.createSQLQuery("SELECT E_ID FROM 
\"modell\"").list(); 
            ID = (BigInteger) models.get(i); 
         } 
      } catch (RuntimeException e) 
      { 
         System.err.println("No entry found!"); 
      } 
   } catch (HibernateException e) 
   { 
      e.printStackTrace(); 
   } catch (RuntimeException re) 
   { 
      re.printStackTrace(); 
   } 
   session.flush(); 
   tx.commit(); 
   if (session.isOpen()) 
   { 
      try 
      { 
         session.clear(); 
         session.close(); 
      } catch (HibernateException e) 
      { 
         System.err.println("Session closing failed"); 
         e.printStackTrace(); 
      } 
   } 

   return model; 
}


public static HbDataStore initializeDataStore(String fileName) 
{ 
   final HbDataStore hbds = (HbDataStore) 
HbHelper.INSTANCE.createRegisterDataStore(fileName); 
   final EPackage[] ePackages = new EPackage[] { EcupackPackage.eINSTANCE 
}; 
   hbds.setEPackages(ePackages); 
   final Properties props = new Properties(); // the database settings 
   try 
   { 
      props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver"); 
      props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" + 
"ECUall"); 
      props.setProperty(Environment.USER, "sa"); 
      props.setProperty(Environment.PASS, ""); 
      props.setProperty(Environment.DIALECT, 
"org.hibernate.dialect.HSQLDialect"); 
      props.setProperty(Environment.HBM2DDL_AUTO, "update"); 
      props.setProperty(Environment.CACHE_PROVIDER, 
"org.hibernate.cache.HashtableCacheProvider"); 
      props.setProperty(Environment.AUTOCOMMIT, "false"); 
      hbds.setProperties(props); 
   } catch (RuntimeException e1) 
   { 
      e1.printStackTrace(); 
   } 
   try 
   { 
      hbds.initialize(); 
   } catch (RuntimeException e) 
   { 
      e.printStackTrace(); 
   } 
   return hbds; 
}
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #118791 is a reply to message #118778] Thu, 17 April 2008 12:22 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
I will look at it but can you reformat the source code in your post a bit, with me (using
thunderbird) all the java code seems to be placed on one line.

gr. Martin

Felix wrote:
> hi, i'm trying to implement saving/loading to/from database in a Eclipse
> EMF project using Teneo/Hibernate. saving/loading is also working
> somewhat fine (creates mapping, tables and stuff quite fine), but once
> i've loaded something from the DB i can not save it anymore.
> creating new models and saving them works fine, also loading them from
> the DB again is doing well. but i neither can save the same model twice,
> nor can i load and then save the model again.
> i'm quite new to this kind of stuff, so maybe it is (hopefully) just
> because i'm plain stupid and don't see an obvious error.
> I hope you can pin down my errors or maybe tell me where to look more
> closely. thx for your patience :)
> Hibernate version: 3.2.6
> Name and version of the database: HSQLDB 1.8.0.9
>
> exeptions that apear are:
> Illegal attempt to associate a collection with two open sessions
> if i load the model and save afterwards
>
> and:
> Don't change the reference to a collection with
> cascade="all-delete-orphan"

> if i try saving twice.
>
>
>
> public static boolean doSaveToDB(String fileName, HbDataStore hbds) {   
> if (!session.isOpen())   {      session = sessionFactory.openSession(); 
>      session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }   tx.begin();
>   try   {      
> session.saveOrUpdate(editingDomain.getResourceSet().getResources().get(0).getContents().get(0)); 
>   } catch (HibernateException e)   {      e.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      
> session.clear();      session.close();   }
>   return true; }
> 

>
>
> public static Modell loadExistingModellFromDB(String fileName, 
> HbDataStore hbds) {   if (!session.isOpen())   {      session = 
> sessionFactory.openSession();      
> session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }
>   URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);   
> Modell model = null;   tx.begin();   try   {      try      {         
> editingDomain.getResourceSet().getResources().get(0).load(Collections.EMPTY_MAP); 
>      } catch (IOException e)      {         e.printStackTrace();      }
>      BigInteger fileID = new BigInteger(fileName);      BigInteger ID = 
> null;      try      {         for (int i = 0; !fileID.equals(ID) || 
> (fileID.compareTo(ID) < 0) ; i++)         {            
> editingDomain.getResourceSet().getResources().clear();            
> editingDomain.getResourceSet().createResource(resourceURI);            
> editingDomain.getResourceSet().getResource(resourceURI, true); 
>            model = (Modell) 
> editingDomain.getResourceSet().getResources().get(0).getContents().get(i); 
>            List models = session.createSQLQuery("SELECT E_ID FROM 
> \"modell\"").list();            ID = (BigInteger) models.get(i);         
> }      } catch (RuntimeException e)      {         
> System.err.println("No entry found!");      }   } catch 
> (HibernateException e)   {      e.printStackTrace();   } catch 
> (RuntimeException re)   {      re.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      try 
>      {         session.clear();         session.close();      } catch 
> (HibernateException e)      {         System.err.println("Session 
> closing failed");         e.printStackTrace();      }   }
>   return model; }
> 

>
>
> public static HbDataStore initializeDataStore(String fileName) {   final 
> HbDataStore hbds = (HbDataStore) 
> HbHelper.INSTANCE.createRegisterDataStore(fileName);   final EPackage[] 
> ePackages = new EPackage[] { EcupackPackage.eINSTANCE };   
> hbds.setEPackages(ePackages);   final Properties props = new 
> Properties(); // the database settings   try   {      
> props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");      
> props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" + 
> "ECUall");      props.setProperty(Environment.USER, "sa");      
> props.setProperty(Environment.PASS, "");      
> props.setProperty(Environment.DIALECT, 
> "org.hibernate.dialect.HSQLDialect");      
> props.setProperty(Environment.HBM2DDL_AUTO, "update");      
> props.setProperty(Environment.CACHE_PROVIDER, 
> "org.hibernate.cache.HashtableCacheProvider");      
> props.setProperty(Environment.AUTOCOMMIT, "false");      
> hbds.setProperties(props);   } catch (RuntimeException e1)   {      
> e1.printStackTrace();   }   try   {      hbds.initialize();   } catch 
> (RuntimeException e)   {      e.printStackTrace();   }   return hbds; }
> 

>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #118831 is a reply to message #118791] Thu, 17 April 2008 12:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

oh, sorry. i've just copy/pasted it from another forum and didnt noticed.
here it comes again (hope its correct now)

(looks fine in the web interface, but if it's still reformating it
strangely, maybe you can have a look here:

http://forum.hibernate.org/viewtopic.php?t=985865

sorry, i never used newsreader before :) )

thx for your help!

public static boolean doSaveToDB(String fileName, HbDataStore hbds)
{
if (!session.isOpen())
{
session = sessionFactory.openSession();
session.setFlushMode(FlushMode.MANUAL);
tx = session.getTransaction();
}
tx.begin();
try
{
session.saveOrUpdate(editingDomain.getResourceSet().getResou rces().get(0).getContents().get(0));
} catch (HibernateException e)
{
e.printStackTrace();
}
session.flush();
tx.commit();
if (session.isOpen())
{
session.clear();
session.close();
}

return true;
}


public static Modell loadExistingModellFromDB(String fileName, HbDataStore
hbds)
{
if (!session.isOpen())
{
session = sessionFactory.openSession();
session.setFlushMode(FlushMode.MANUAL);
tx = session.getTransaction();
}

URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);
Modell model = null;
tx.begin();
try
{
try
{

editingDomain.getResourceSet().getResources().get(0).load(Co llections.EMPTY_MAP);
} catch (IOException e)
{
e.printStackTrace();
}

BigInteger fileID = new BigInteger(fileName);
BigInteger ID = null;
try
{
for (int i = 0; !fileID.equals(ID) || (fileID.compareTo(ID) < 0)
; i++)
{
editingDomain.getResourceSet().getResources().clear();
editingDomain.getResourceSet().createResource(resourceURI);
editingDomain.getResourceSet().getResource(resourceURI, true);
model = (Modell)
editingDomain.getResourceSet().getResources().get(0).getCont ents().get(i);
List models = session.createSQLQuery("SELECT E_ID FROM
\"modell\"").list();
ID = (BigInteger) models.get(i);
}
} catch (RuntimeException e)
{
System.err.println("No entry found!");
}
} catch (HibernateException e)
{
e.printStackTrace();
} catch (RuntimeException re)
{
re.printStackTrace();
}
session.flush();
tx.commit();
if (session.isOpen())
{
try
{
session.clear();
session.close();
} catch (HibernateException e)
{
System.err.println("Session closing failed");
e.printStackTrace();
}
}

return model;
}


public static HbDataStore initializeDataStore(String fileName)
{
final HbDataStore hbds = (HbDataStore)
HbHelper.INSTANCE.createRegisterDataStore(fileName);
final EPackage[] ePackages = new EPackage[] { EcupackPackage.eINSTANCE
};
hbds.setEPackages(ePackages);
final Properties props = new Properties(); // the database settings
try
{
props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");
props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" +
"ECUall");
props.setProperty(Environment.USER, "sa");
props.setProperty(Environment.PASS, "");
props.setProperty(Environment.DIALECT,
"org.hibernate.dialect.HSQLDialect");
props.setProperty(Environment.HBM2DDL_AUTO, "update");
props.setProperty(Environment.CACHE_PROVIDER,
"org.hibernate.cache.HashtableCacheProvider");
props.setProperty(Environment.AUTOCOMMIT, "false");
hbds.setProperties(props);
} catch (RuntimeException e1)
{
e1.printStackTrace();
}
try
{
hbds.initialize();
} catch (RuntimeException e)
{
e.printStackTrace();
}
return hbds;
}


Martin Taal wrote:

> Hi Felix,
> I will look at it but can you reformat the source code in your post a bit,
with me (using
> thunderbird) all the java code seems to be placed on one line.

> gr. Martin

> Felix wrote:
>> hi, i'm trying to implement saving/loading to/from database in a Eclipse
>> EMF project using Teneo/Hibernate. saving/loading is also working
>> somewhat fine (creates mapping, tables and stuff quite fine), but once
>> i've loaded something from the DB i can not save it anymore.
>> creating new models and saving them works fine, also loading them from
>> the DB again is doing well. but i neither can save the same model twice,
>> nor can i load and then save the model again.
>> i'm quite new to this kind of stuff, so maybe it is (hopefully) just
>> because i'm plain stupid and don't see an obvious error.
>> I hope you can pin down my errors or maybe tell me where to look more
>> closely. thx for your patience :)
>> Hibernate version: 3.2.6
>> Name and version of the database: HSQLDB 1.8.0.9
>>
>> exeptions that apear are:
>> Illegal attempt to associate a collection with two open sessions
>> if i load the model and save afterwards
>>
>> and:
>> Don't change the reference to a collection with
>> cascade="all-delete-orphan"

>> if i try saving twice.
>>
>>
>>
>> public static boolean doSaveToDB(String fileName, HbDataStore hbds) {   
>> if (!session.isOpen())   {      session = sessionFactory.openSession(); 
>>      session.setFlushMode(FlushMode.MANUAL);      tx = 
>> session.getTransaction();   }   tx.begin();
>>   try   {      
>> 
session.saveOrUpdate(editingDomain.getResourceSet().getResources().get(0).getContents().get(0)); 
>>   } catch (HibernateException e)   {      e.printStackTrace();   }   
>> session.flush();   tx.commit();   if (session.isOpen())   {      
>> session.clear();      session.close();   }
>>   return true; }
>> 

>>
>>
>> public static Modell loadExistingModellFromDB(String fileName, 
>> HbDataStore hbds) {   if (!session.isOpen())   {      session = 
>> sessionFactory.openSession();      
>> session.setFlushMode(FlushMode.MANUAL);      tx = 
>> session.getTransaction();   }
>>   URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);   
>> Modell model = null;   tx.begin();   try   {      try      {         
>> 
editingDomain.getResourceSet().getResources().get(0).load(Collections.EMPTY_MAP); 
>>      } catch (IOException e)      {         e.printStackTrace();      }
>>      BigInteger fileID = new BigInteger(fileName);      BigInteger ID = 
>> null;      try      {         for (int i = 0; !fileID.equals(ID) || 
>> (fileID.compareTo(ID) < 0) ; i++)         {            
>> editingDomain.getResourceSet().getResources().clear();            
>> editingDomain.getResourceSet().createResource(resourceURI);            
>> editingDomain.getResourceSet().getResource(resourceURI, true); 
>>            model = (Modell) 
>> editingDomain.getResourceSet().getResources().get(0).getContents().get(i); 
>>            List models = session.createSQLQuery("SELECT E_ID FROM 
>> "modell"").list();            ID = (BigInteger) models.get(i);         
>> }      } catch (RuntimeException e)      {         
>> System.err.println("No entry found!");      }   } catch 
>> (HibernateException e)   {      e.printStackTrace();   } catch 
>> (RuntimeException re)   {      re.printStackTrace();   }   
>> session.flush();   tx.commit();   if (session.isOpen())   {      try 
>>      {         session.clear();         session.close();      } catch 
>> (HibernateException e)      {         System.err.println("Session 
>> closing failed");         e.printStackTrace();      }   }
>>   return model; }
>> 

>>
>>
>> public static HbDataStore initializeDataStore(String fileName) {   final 
>> HbDataStore hbds = (HbDataStore) 
>> HbHelper.INSTANCE.createRegisterDataStore(fileName);   final EPackage[] 
>> ePackages = new EPackage[] { EcupackPackage.eINSTANCE };   
>> hbds.setEPackages(ePackages);   final Properties props = new 
>> Properties(); // the database settings   try   {      
>> props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");      
>> props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" + 
>> "ECUall");      props.setProperty(Environment.USER, "sa");      
>> props.setProperty(Environment.PASS, "");      
>> props.setProperty(Environment.DIALECT, 
>> "org.hibernate.dialect.HSQLDialect");      
>> props.setProperty(Environment.HBM2DDL_AUTO, "update");      
>> props.setProperty(Environment.CACHE_PROVIDER, 
>> "org.hibernate.cache.HashtableCacheProvider");      
>> props.setProperty(Environment.AUTOCOMMIT, "false");      
>> hbds.setProperties(props);   } catch (RuntimeException e1)   {      
>> e1.printStackTrace();   }   try   {      hbds.initialize();   } catch 
>> (RuntimeException e)   {      e.printStackTrace();   }   return hbds; }
>> 

>>
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #118857 is a reply to message #118778] Thu, 17 April 2008 13:15 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
The resource you open using the resourceURI is a HibernateResource. A HibernateResource has its own
session (well not always see the link below...). When an object is loaded into the HibernateResource
from the db then the object (and its collections) are registered with the session of the resource
(this is done by hibernate). So when you try to persist the object from the resource using another
session then you get this exception.

If you want to read something from a resource and then save it using a separate hibernate session
you have to remove the object from the session of the resource. The HibernateResource has a
getSession() method on which you can call evict. However, it is much easier to either choose a
resource approach (load and save through a resource instance) or not use resources at all and work
with direct hql queries and the hibernate session (as you also do in your code).

Here is some more info on the hibernate resource:
http://www.elver.org/hibernate/hibernateresources.html

After a quick glance I would rewrite your for-loop a bit to:
Resource res = editingDomain.getResourceSet().createResource(resourceURI);
for (int i = 0; !fileID.equals(ID) || (fileID.compareTo(ID) < 0) ; i++)
{
model = (Modell)res.getContents().get(i);
List models = session.createSQLQuery("SELECT E_ID FROM \"modell\"").list();
ID = (BigInteger) models.get(i);
}

Let me know if you have more questions.

gr. Martin

Felix wrote:
> hi, i'm trying to implement saving/loading to/from database in a Eclipse
> EMF project using Teneo/Hibernate. saving/loading is also working
> somewhat fine (creates mapping, tables and stuff quite fine), but once
> i've loaded something from the DB i can not save it anymore.
> creating new models and saving them works fine, also loading them from
> the DB again is doing well. but i neither can save the same model twice,
> nor can i load and then save the model again.
> i'm quite new to this kind of stuff, so maybe it is (hopefully) just
> because i'm plain stupid and don't see an obvious error.
> I hope you can pin down my errors or maybe tell me where to look more
> closely. thx for your patience :)
> Hibernate version: 3.2.6
> Name and version of the database: HSQLDB 1.8.0.9
>
> exeptions that apear are:
> Illegal attempt to associate a collection with two open sessions
> if i load the model and save afterwards
>
> and:
> Don't change the reference to a collection with
> cascade="all-delete-orphan"

> if i try saving twice.
>
>
>
> public static boolean doSaveToDB(String fileName, HbDataStore hbds) {   
> if (!session.isOpen())   {      session = sessionFactory.openSession(); 
>      session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }   tx.begin();
>   try   {      
> session.saveOrUpdate(editingDomain.getResourceSet().getResources().get(0).getContents().get(0)); 
>   } catch (HibernateException e)   {      e.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      
> session.clear();      session.close();   }
>   return true; }
> 

>
>
> public static Modell loadExistingModellFromDB(String fileName, 
> HbDataStore hbds) {   if (!session.isOpen())   {      session = 
> sessionFactory.openSession();      
> session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }
>   URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);   
> Modell model = null;   tx.begin();   try   {      try      {         
> editingDomain.getResourceSet().getResources().get(0).load(Collections.EMPTY_MAP); 
>      } catch (IOException e)      {         e.printStackTrace();      }
>      BigInteger fileID = new BigInteger(fileName);      BigInteger ID = 
> null;      try      {         for (int i = 0; !fileID.equals(ID) || 
> (fileID.compareTo(ID) < 0) ; i++)         {            
> editingDomain.getResourceSet().getResources().clear();            
> editingDomain.getResourceSet().createResource(resourceURI);            
> editingDomain.getResourceSet().getResource(resourceURI, true); 
>            model = (Modell) 
> editingDomain.getResourceSet().getResources().get(0).getContents().get(i); 
>            List models = session.createSQLQuery("SELECT E_ID FROM 
> \"modell\"").list();            ID = (BigInteger) models.get(i);         
> }      } catch (RuntimeException e)      {         
> System.err.println("No entry found!");      }   } catch 
> (HibernateException e)   {      e.printStackTrace();   } catch 
> (RuntimeException re)   {      re.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      try 
>      {         session.clear();         session.close();      } catch 
> (HibernateException e)      {         System.err.println("Session 
> closing failed");         e.printStackTrace();      }   }
>   return model; }
> 

>
>
> public static HbDataStore initializeDataStore(String fileName) {   final 
> HbDataStore hbds = (HbDataStore) 
> HbHelper.INSTANCE.createRegisterDataStore(fileName);   final EPackage[] 
> ePackages = new EPackage[] { EcupackPackage.eINSTANCE };   
> hbds.setEPackages(ePackages);   final Properties props = new 
> Properties(); // the database settings   try   {      
> props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");      
> props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" + 
> "ECUall");      props.setProperty(Environment.USER, "sa");      
> props.setProperty(Environment.PASS, "");      
> props.setProperty(Environment.DIALECT, 
> "org.hibernate.dialect.HSQLDialect");      
> props.setProperty(Environment.HBM2DDL_AUTO, "update");      
> props.setProperty(Environment.CACHE_PROVIDER, 
> "org.hibernate.cache.HashtableCacheProvider");      
> props.setProperty(Environment.AUTOCOMMIT, "false");      
> hbds.setProperties(props);   } catch (RuntimeException e1)   {      
> e1.printStackTrace();   }   try   {      hbds.initialize();   } catch 
> (RuntimeException e)   {      e.printStackTrace();   }   return hbds; }
> 

>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #118883 is a reply to message #118857] Thu, 17 April 2008 13:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

thanks for your really fast answer!
i'll try it and hope i understood the problem finaly :)
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #119664 is a reply to message #118857] Wed, 23 April 2008 08:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

hi again,

i now have implemented the save/load routines with the resource aproach
and its working fine... until i need locking mechanism :-/
so far i use:

Resource res = editingDomain.getResourceSet().getResources().get(0);
res.save(Collections.EMPTY_MAP);

to save and catch the IOException thrown by the res.save.

i tryed to let 2 clients load the same model and both modify it. the first
attempt to save is working fine, but the second one ends with some
exceptions:

org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect): [...#4]

org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect): [...#4]

org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect): [...#4]

Exception in thread "main"
org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when saving
resource 1

Caused by: org.hibernate.StaleObjectStateException: Row was updated or
deleted by another transaction (or unsaved-value mapping was incorrect):
[...#4]

i guess thats because of the automatic versioning hibernate does
(optimistic loading?), what is ok so far. the problem is that the resource
has neither a .merge() method nor are there unhandled exceptions where i
can handle what should happen when there are conflicts.

what i try to do is, i want to let multiple users load the model, but if
one changes the model the others should get a warning and have to save
with a different name.
is there a (simple ;) ) way to do this?

thx for your help
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #119690 is a reply to message #119664] Wed, 23 April 2008 11:30 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
Teneo does not provide a server-client notification mechanism. The cdo project provides this. Within
the Teneo context I would try the following:
Before saving a resource get the modified eobjects (call: getModifiedEObjects), for each of the
objects read the version from the db (using a query which only reads the version column) and compare
it with the version in the object itself (or make a more efficient query in which you also use the
in-mem version). If the version in the object < than the db version then you know that it was
updated and that the user needs to be notified.

I did an extensive check if hibernate supports this functionality out of the box but it does not.

Btw, can you enter a bugzilla feature request for this so that I can add the above functionality to
the HibernateResource? I am not sure when I have time to do this but then it is on the list at least.

The above strategy works fine if the nr. of modified objects per save is fairly modest. If the
number of modified objects is huge then the only way is to use a client-server notification
mechanism (which is not part of Teneo).

gr. Martin

Felix wrote:
> hi again,
>
> i now have implemented the save/load routines with the resource aproach
> and its working fine... until i need locking mechanism :-/
> so far i use:
>
> Resource res = editingDomain.getResourceSet().getResources().get(0);
> res.save(Collections.EMPTY_MAP);
>
> to save and catch the IOException thrown by the res.save.
>
> i tryed to let 2 clients load the same model and both modify it. the
> first attempt to save is working fine, but the second one ends with some
> exceptions:
>
> org.hibernate.StaleObjectStateException: Row was updated or deleted by
> another transaction (or unsaved-value mapping was incorrect): [...#4]
>
> org.hibernate.StaleObjectStateException: Row was updated or deleted by
> another transaction (or unsaved-value mapping was incorrect): [...#4]
>
> org.hibernate.StaleObjectStateException: Row was updated or deleted by
> another transaction (or unsaved-value mapping was incorrect): [...#4]
>
> Exception in thread "main"
> org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when saving
> resource 1
>
> Caused by: org.hibernate.StaleObjectStateException: Row was updated or
> deleted by another transaction (or unsaved-value mapping was incorrect):
> [...#4]
>
> i guess thats because of the automatic versioning hibernate does
> (optimistic loading?), what is ok so far. the problem is that the
> resource has neither a .merge() method nor are there unhandled
> exceptions where i can handle what should happen when there are conflicts.
>
> what i try to do is, i want to let multiple users load the model, but if
> one changes the model the others should get a warning and have to save
> with a different name.
> is there a (simple ;) ) way to do this?
>
> thx for your help
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #120108 is a reply to message #119690] Fri, 25 April 2008 14:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

hi martin,
thx for your quick help!
but how can i use querys with the automaticaly created session from the
hibernate resource? can i somehow retrieve the active session from my
resource?

Martin Taal wrote:

> Hi Felix,
> Teneo does not provide a server-client notification mechanism. The cdo
project provides this. Within
> the Teneo context I would try the following:
> Before saving a resource get the modified eobjects (call:
getModifiedEObjects), for each of the
> objects read the version from the db (using a query which only reads the
version column) and compare
> it with the version in the object itself (or make a more efficient query in
which you also use the
> in-mem version). If the version in the object < than the db version then you
know that it was
> updated and that the user needs to be notified.

> I did an extensive check if hibernate supports this functionality out of the
box but it does not.

> Btw, can you enter a bugzilla feature request for this so that I can add the
above functionality to
> the HibernateResource? I am not sure when I have time to do this but then it
is on the list at least.

> The above strategy works fine if the nr. of modified objects per save is
fairly modest. If the
> number of modified objects is huge then the only way is to use a
client-server notification
> mechanism (which is not part of Teneo).

> gr. Martin

> Felix wrote:
>> hi again,
>>
>> i now have implemented the save/load routines with the resource aproach
>> and its working fine... until i need locking mechanism :-/
>> so far i use:
>>
>> Resource res = editingDomain.getResourceSet().getResources().get(0);
>> res.save(Collections.EMPTY_MAP);
>>
>> to save and catch the IOException thrown by the res.save.
>>
>> i tryed to let 2 clients load the same model and both modify it. the
>> first attempt to save is working fine, but the second one ends with some
>> exceptions:
>>
>> org.hibernate.StaleObjectStateException: Row was updated or deleted by
>> another transaction (or unsaved-value mapping was incorrect): [...#4]
>>
>> org.hibernate.StaleObjectStateException: Row was updated or deleted by
>> another transaction (or unsaved-value mapping was incorrect): [...#4]
>>
>> org.hibernate.StaleObjectStateException: Row was updated or deleted by
>> another transaction (or unsaved-value mapping was incorrect): [...#4]
>>
>> Exception in thread "main"
>> org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when saving
>> resource 1
>>
>> Caused by: org.hibernate.StaleObjectStateException: Row was updated or
>> deleted by another transaction (or unsaved-value mapping was incorrect):
>> [...#4]
>>
>> i guess thats because of the automatic versioning hibernate does
>> (optimistic loading?), what is ok so far. the problem is that the
>> resource has neither a .merge() method nor are there unhandled
>> exceptions where i can handle what should happen when there are conflicts.
>>
>> what i try to do is, i want to let multiple users load the model, but if
>> one changes the model the others should get a warning and have to save
>> with a different name.
>> is there a (simple ;) ) way to do this?
>>
>> thx for your help
>>
>>
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #120178 is a reply to message #120108] Fri, 25 April 2008 18:15 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
The hibernateresource has a getSession method and a getSessionWrapper method. The source code shows
how you can use the sessionwrapper (just a wrapper to make the hibernateresource also work with the
jpa entitymanager).

It is probably easiest to extend the HibernateResource and add the required behavior in the subclass.

gr. Martin

Felix wrote:
> hi martin,
> thx for your quick help!
> but how can i use querys with the automaticaly created session from the
> hibernate resource? can i somehow retrieve the active session from my
> resource?
>
> Martin Taal wrote:
>
>> Hi Felix,
>> Teneo does not provide a server-client notification mechanism. The cdo
> project provides this. Within
>> the Teneo context I would try the following:
>> Before saving a resource get the modified eobjects (call:
> getModifiedEObjects), for each of the
>> objects read the version from the db (using a query which only reads the
> version column) and compare
>> it with the version in the object itself (or make a more efficient
>> query in
> which you also use the
>> in-mem version). If the version in the object < than the db version
>> then you
> know that it was
>> updated and that the user needs to be notified.
>
>> I did an extensive check if hibernate supports this functionality out
>> of the
> box but it does not.
>
>> Btw, can you enter a bugzilla feature request for this so that I can
>> add the
> above functionality to
>> the HibernateResource? I am not sure when I have time to do this but
>> then it
> is on the list at least.
>
>> The above strategy works fine if the nr. of modified objects per save is
> fairly modest. If the
>> number of modified objects is huge then the only way is to use a
> client-server notification
>> mechanism (which is not part of Teneo).
>
>> gr. Martin
>
>> Felix wrote:
>>> hi again,
>>>
>>> i now have implemented the save/load routines with the resource
>>> aproach and its working fine... until i need locking mechanism :-/
>>> so far i use:
>>>
>>> Resource res = editingDomain.getResourceSet().getResources().get(0);
>>> res.save(Collections.EMPTY_MAP);
>>>
>>> to save and catch the IOException thrown by the res.save.
>>>
>>> i tryed to let 2 clients load the same model and both modify it. the
>>> first attempt to save is working fine, but the second one ends with
>>> some exceptions:
>>>
>>> org.hibernate.StaleObjectStateException: Row was updated or deleted
>>> by another transaction (or unsaved-value mapping was incorrect): [...#4]
>>>
>>> org.hibernate.StaleObjectStateException: Row was updated or deleted
>>> by another transaction (or unsaved-value mapping was incorrect): [...#4]
>>>
>>> org.hibernate.StaleObjectStateException: Row was updated or deleted
>>> by another transaction (or unsaved-value mapping was incorrect): [...#4]
>>>
>>> Exception in thread "main"
>>> org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when
>>> saving resource 1
>>>
>>> Caused by: org.hibernate.StaleObjectStateException: Row was updated
>>> or deleted by another transaction (or unsaved-value mapping was
>>> incorrect): [...#4]
>>>
>>> i guess thats because of the automatic versioning hibernate does
>>> (optimistic loading?), what is ok so far. the problem is that the
>>> resource has neither a .merge() method nor are there unhandled
>>> exceptions where i can handle what should happen when there are
>>> conflicts.
>>>
>>> what i try to do is, i want to let multiple users load the model, but
>>> if one changes the model the others should get a warning and have to
>>> save with a different name.
>>> is there a (simple ;) ) way to do this?
>>>
>>> thx for your help
>>>
>>>
>
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #121855 is a reply to message #120178] Mon, 05 May 2008 16:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

hi again,
still digging up more questions after solving a problem ;)
is there a easy way to delete a whole model from the DB? when i use the
delete method from the session, it just deletes the "root table" and
leaving the rest of the model as data corpses in the database.

sc.getSessionWrapper().delete(tempRes.getContents().get(0));

thats the code i yet tried.

thx a lot

felix
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #121880 is a reply to message #121855] Mon, 05 May 2008 17:23 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
Normally if you delete the root which contains all other data then it should also delete all its
children (and their children). So I am not sure if you have everything contained in the root and/or
that the containment relations are mapped with delete cascade and orphan-delete. You can check the
hibernate mapping for that.

gr. Martin

Felix wrote:
> hi again,
> still digging up more questions after solving a problem ;)
> is there a easy way to delete a whole model from the DB? when i use the
> delete method from the session, it just deletes the "root table" and
> leaving the rest of the model as data corpses in the database.
>
> sc.getSessionWrapper().delete(tempRes.getContents().get(0));
>
> thats the code i yet tried.
>
> thx a lot
>
> felix
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617811 is a reply to message #118778] Thu, 17 April 2008 12:22 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
I will look at it but can you reformat the source code in your post a bit, with me (using
thunderbird) all the java code seems to be placed on one line.

gr. Martin

Felix wrote:
> hi, i'm trying to implement saving/loading to/from database in a Eclipse
> EMF project using Teneo/Hibernate. saving/loading is also working
> somewhat fine (creates mapping, tables and stuff quite fine), but once
> i've loaded something from the DB i can not save it anymore.
> creating new models and saving them works fine, also loading them from
> the DB again is doing well. but i neither can save the same model twice,
> nor can i load and then save the model again.
> i'm quite new to this kind of stuff, so maybe it is (hopefully) just
> because i'm plain stupid and don't see an obvious error.
> I hope you can pin down my errors or maybe tell me where to look more
> closely. thx for your patience :)
> Hibernate version: 3.2.6
> Name and version of the database: HSQLDB 1.8.0.9
>
> exeptions that apear are:
> Illegal attempt to associate a collection with two open sessions
> if i load the model and save afterwards
>
> and:
> Don't change the reference to a collection with
> cascade="all-delete-orphan"

> if i try saving twice.
>
>
>
> public static boolean doSaveToDB(String fileName, HbDataStore hbds) {   
> if (!session.isOpen())   {      session = sessionFactory.openSession(); 
>      session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }   tx.begin();
>   try   {      
> session.saveOrUpdate(editingDomain.getResourceSet().getResources().get(0).getContents().get(0)); 
>   } catch (HibernateException e)   {      e.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      
> session.clear();      session.close();   }
>   return true; }
> 

>
>
> public static Modell loadExistingModellFromDB(String fileName, 
> HbDataStore hbds) {   if (!session.isOpen())   {      session = 
> sessionFactory.openSession();      
> session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }
>   URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);   
> Modell model = null;   tx.begin();   try   {      try      {         
> editingDomain.getResourceSet().getResources().get(0).load(Collections.EMPTY_MAP); 
>      } catch (IOException e)      {         e.printStackTrace();      }
>      BigInteger fileID = new BigInteger(fileName);      BigInteger ID = 
> null;      try      {         for (int i = 0; !fileID.equals(ID) || 
> (fileID.compareTo(ID) < 0) ; i++)         {            
> editingDomain.getResourceSet().getResources().clear();            
> editingDomain.getResourceSet().createResource(resourceURI);            
> editingDomain.getResourceSet().getResource(resourceURI, true); 
>            model = (Modell) 
> editingDomain.getResourceSet().getResources().get(0).getContents().get(i); 
>            List models = session.createSQLQuery("SELECT E_ID FROM 
> \"modell\"").list();            ID = (BigInteger) models.get(i);         
> }      } catch (RuntimeException e)      {         
> System.err.println("No entry found!");      }   } catch 
> (HibernateException e)   {      e.printStackTrace();   } catch 
> (RuntimeException re)   {      re.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      try 
>      {         session.clear();         session.close();      } catch 
> (HibernateException e)      {         System.err.println("Session 
> closing failed");         e.printStackTrace();      }   }
>   return model; }
> 

>
>
> public static HbDataStore initializeDataStore(String fileName) {   final 
> HbDataStore hbds = (HbDataStore) 
> HbHelper.INSTANCE.createRegisterDataStore(fileName);   final EPackage[] 
> ePackages = new EPackage[] { EcupackPackage.eINSTANCE };   
> hbds.setEPackages(ePackages);   final Properties props = new 
> Properties(); // the database settings   try   {      
> props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");      
> props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" + 
> "ECUall");      props.setProperty(Environment.USER, "sa");      
> props.setProperty(Environment.PASS, "");      
> props.setProperty(Environment.DIALECT, 
> "org.hibernate.dialect.HSQLDialect");      
> props.setProperty(Environment.HBM2DDL_AUTO, "update");      
> props.setProperty(Environment.CACHE_PROVIDER, 
> "org.hibernate.cache.HashtableCacheProvider");      
> props.setProperty(Environment.AUTOCOMMIT, "false");      
> hbds.setProperties(props);   } catch (RuntimeException e1)   {      
> e1.printStackTrace();   }   try   {      hbds.initialize();   } catch 
> (RuntimeException e)   {      e.printStackTrace();   }   return hbds; }
> 

>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617821 is a reply to message #118791] Thu, 17 April 2008 12:50 Go to previous message
Felix is currently offline FelixFriend
Messages: 11
Registered: July 2009
Junior Member
oh, sorry. i've just copy/pasted it from another forum and didnt noticed.
here it comes again (hope its correct now)

(looks fine in the web interface, but if it's still reformating it
strangely, maybe you can have a look here:

http://forum.hibernate.org/viewtopic.php?t=985865

sorry, i never used newsreader before :) )

thx for your help!

public static boolean doSaveToDB(String fileName, HbDataStore hbds)
{
if (!session.isOpen())
{
session = sessionFactory.openSession();
session.setFlushMode(FlushMode.MANUAL);
tx = session.getTransaction();
}
tx.begin();
try
{
session.saveOrUpdate(editingDomain.getResourceSet().getResou rces().get(0).getContents().get(0));
} catch (HibernateException e)
{
e.printStackTrace();
}
session.flush();
tx.commit();
if (session.isOpen())
{
session.clear();
session.close();
}

return true;
}


public static Modell loadExistingModellFromDB(String fileName, HbDataStore
hbds)
{
if (!session.isOpen())
{
session = sessionFactory.openSession();
session.setFlushMode(FlushMode.MANUAL);
tx = session.getTransaction();
}

URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);
Modell model = null;
tx.begin();
try
{
try
{

editingDomain.getResourceSet().getResources().get(0).load(Co llections.EMPTY_MAP);
} catch (IOException e)
{
e.printStackTrace();
}

BigInteger fileID = new BigInteger(fileName);
BigInteger ID = null;
try
{
for (int i = 0; !fileID.equals(ID) || (fileID.compareTo(ID) < 0)
; i++)
{
editingDomain.getResourceSet().getResources().clear();
editingDomain.getResourceSet().createResource(resourceURI);
editingDomain.getResourceSet().getResource(resourceURI, true);
model = (Modell)
editingDomain.getResourceSet().getResources().get(0).getCont ents().get(i);
List models = session.createSQLQuery("SELECT E_ID FROM
\"modell\"").list();
ID = (BigInteger) models.get(i);
}
} catch (RuntimeException e)
{
System.err.println("No entry found!");
}
} catch (HibernateException e)
{
e.printStackTrace();
} catch (RuntimeException re)
{
re.printStackTrace();
}
session.flush();
tx.commit();
if (session.isOpen())
{
try
{
session.clear();
session.close();
} catch (HibernateException e)
{
System.err.println("Session closing failed");
e.printStackTrace();
}
}

return model;
}


public static HbDataStore initializeDataStore(String fileName)
{
final HbDataStore hbds = (HbDataStore)
HbHelper.INSTANCE.createRegisterDataStore(fileName);
final EPackage[] ePackages = new EPackage[] { EcupackPackage.eINSTANCE
};
hbds.setEPackages(ePackages);
final Properties props = new Properties(); // the database settings
try
{
props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");
props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" +
"ECUall");
props.setProperty(Environment.USER, "sa");
props.setProperty(Environment.PASS, "");
props.setProperty(Environment.DIALECT,
"org.hibernate.dialect.HSQLDialect");
props.setProperty(Environment.HBM2DDL_AUTO, "update");
props.setProperty(Environment.CACHE_PROVIDER,
"org.hibernate.cache.HashtableCacheProvider");
props.setProperty(Environment.AUTOCOMMIT, "false");
hbds.setProperties(props);
} catch (RuntimeException e1)
{
e1.printStackTrace();
}
try
{
hbds.initialize();
} catch (RuntimeException e)
{
e.printStackTrace();
}
return hbds;
}


Martin Taal wrote:

> Hi Felix,
> I will look at it but can you reformat the source code in your post a bit,
with me (using
> thunderbird) all the java code seems to be placed on one line.

> gr. Martin

> Felix wrote:
>> hi, i'm trying to implement saving/loading to/from database in a Eclipse
>> EMF project using Teneo/Hibernate. saving/loading is also working
>> somewhat fine (creates mapping, tables and stuff quite fine), but once
>> i've loaded something from the DB i can not save it anymore.
>> creating new models and saving them works fine, also loading them from
>> the DB again is doing well. but i neither can save the same model twice,
>> nor can i load and then save the model again.
>> i'm quite new to this kind of stuff, so maybe it is (hopefully) just
>> because i'm plain stupid and don't see an obvious error.
>> I hope you can pin down my errors or maybe tell me where to look more
>> closely. thx for your patience :)
>> Hibernate version: 3.2.6
>> Name and version of the database: HSQLDB 1.8.0.9
>>
>> exeptions that apear are:
>> Illegal attempt to associate a collection with two open sessions
>> if i load the model and save afterwards
>>
>> and:
>> Don't change the reference to a collection with
>> cascade="all-delete-orphan"

>> if i try saving twice.
>>
>>
>>
>> public static boolean doSaveToDB(String fileName, HbDataStore hbds) {   
>> if (!session.isOpen())   {      session = sessionFactory.openSession(); 
>>      session.setFlushMode(FlushMode.MANUAL);      tx = 
>> session.getTransaction();   }   tx.begin();
>>   try   {      
>> 
session.saveOrUpdate(editingDomain.getResourceSet().getResources().get(0).getContents().get(0)); 
>>   } catch (HibernateException e)   {      e.printStackTrace();   }   
>> session.flush();   tx.commit();   if (session.isOpen())   {      
>> session.clear();      session.close();   }
>>   return true; }
>> 

>>
>>
>> public static Modell loadExistingModellFromDB(String fileName, 
>> HbDataStore hbds) {   if (!session.isOpen())   {      session = 
>> sessionFactory.openSession();      
>> session.setFlushMode(FlushMode.MANUAL);      tx = 
>> session.getTransaction();   }
>>   URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);   
>> Modell model = null;   tx.begin();   try   {      try      {         
>> 
editingDomain.getResourceSet().getResources().get(0).load(Collections.EMPTY_MAP); 
>>      } catch (IOException e)      {         e.printStackTrace();      }
>>      BigInteger fileID = new BigInteger(fileName);      BigInteger ID = 
>> null;      try      {         for (int i = 0; !fileID.equals(ID) || 
>> (fileID.compareTo(ID) < 0) ; i++)         {            
>> editingDomain.getResourceSet().getResources().clear();            
>> editingDomain.getResourceSet().createResource(resourceURI);            
>> editingDomain.getResourceSet().getResource(resourceURI, true); 
>>            model = (Modell) 
>> editingDomain.getResourceSet().getResources().get(0).getContents().get(i); 
>>            List models = session.createSQLQuery("SELECT E_ID FROM 
>> "modell"").list();            ID = (BigInteger) models.get(i);         
>> }      } catch (RuntimeException e)      {         
>> System.err.println("No entry found!");      }   } catch 
>> (HibernateException e)   {      e.printStackTrace();   } catch 
>> (RuntimeException re)   {      re.printStackTrace();   }   
>> session.flush();   tx.commit();   if (session.isOpen())   {      try 
>>      {         session.clear();         session.close();      } catch 
>> (HibernateException e)      {         System.err.println("Session 
>> closing failed");         e.printStackTrace();      }   }
>>   return model; }
>> 

>>
>>
>> public static HbDataStore initializeDataStore(String fileName) {   final 
>> HbDataStore hbds = (HbDataStore) 
>> HbHelper.INSTANCE.createRegisterDataStore(fileName);   final EPackage[] 
>> ePackages = new EPackage[] { EcupackPackage.eINSTANCE };   
>> hbds.setEPackages(ePackages);   final Properties props = new 
>> Properties(); // the database settings   try   {      
>> props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");      
>> props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" + 
>> "ECUall");      props.setProperty(Environment.USER, "sa");      
>> props.setProperty(Environment.PASS, "");      
>> props.setProperty(Environment.DIALECT, 
>> "org.hibernate.dialect.HSQLDialect");      
>> props.setProperty(Environment.HBM2DDL_AUTO, "update");      
>> props.setProperty(Environment.CACHE_PROVIDER, 
>> "org.hibernate.cache.HashtableCacheProvider");      
>> props.setProperty(Environment.AUTOCOMMIT, "false");      
>> hbds.setProperties(props);   } catch (RuntimeException e1)   {      
>> e1.printStackTrace();   }   try   {      hbds.initialize();   } catch 
>> (RuntimeException e)   {      e.printStackTrace();   }   return hbds; }
>> 

>>
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617823 is a reply to message #118778] Thu, 17 April 2008 13:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
The resource you open using the resourceURI is a HibernateResource. A HibernateResource has its own
session (well not always see the link below...). When an object is loaded into the HibernateResource
from the db then the object (and its collections) are registered with the session of the resource
(this is done by hibernate). So when you try to persist the object from the resource using another
session then you get this exception.

If you want to read something from a resource and then save it using a separate hibernate session
you have to remove the object from the session of the resource. The HibernateResource has a
getSession() method on which you can call evict. However, it is much easier to either choose a
resource approach (load and save through a resource instance) or not use resources at all and work
with direct hql queries and the hibernate session (as you also do in your code).

Here is some more info on the hibernate resource:
http://www.elver.org/hibernate/hibernateresources.html

After a quick glance I would rewrite your for-loop a bit to:
Resource res = editingDomain.getResourceSet().createResource(resourceURI);
for (int i = 0; !fileID.equals(ID) || (fileID.compareTo(ID) < 0) ; i++)
{
model = (Modell)res.getContents().get(i);
List models = session.createSQLQuery("SELECT E_ID FROM \"modell\"").list();
ID = (BigInteger) models.get(i);
}

Let me know if you have more questions.

gr. Martin

Felix wrote:
> hi, i'm trying to implement saving/loading to/from database in a Eclipse
> EMF project using Teneo/Hibernate. saving/loading is also working
> somewhat fine (creates mapping, tables and stuff quite fine), but once
> i've loaded something from the DB i can not save it anymore.
> creating new models and saving them works fine, also loading them from
> the DB again is doing well. but i neither can save the same model twice,
> nor can i load and then save the model again.
> i'm quite new to this kind of stuff, so maybe it is (hopefully) just
> because i'm plain stupid and don't see an obvious error.
> I hope you can pin down my errors or maybe tell me where to look more
> closely. thx for your patience :)
> Hibernate version: 3.2.6
> Name and version of the database: HSQLDB 1.8.0.9
>
> exeptions that apear are:
> Illegal attempt to associate a collection with two open sessions
> if i load the model and save afterwards
>
> and:
> Don't change the reference to a collection with
> cascade="all-delete-orphan"

> if i try saving twice.
>
>
>
> public static boolean doSaveToDB(String fileName, HbDataStore hbds) {   
> if (!session.isOpen())   {      session = sessionFactory.openSession(); 
>      session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }   tx.begin();
>   try   {      
> session.saveOrUpdate(editingDomain.getResourceSet().getResources().get(0).getContents().get(0)); 
>   } catch (HibernateException e)   {      e.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      
> session.clear();      session.close();   }
>   return true; }
> 

>
>
> public static Modell loadExistingModellFromDB(String fileName, 
> HbDataStore hbds) {   if (!session.isOpen())   {      session = 
> sessionFactory.openSession();      
> session.setFlushMode(FlushMode.MANUAL);      tx = 
> session.getTransaction();   }
>   URI resourceURI = URI.createURI("hbxml://?dsname=" + fileName);   
> Modell model = null;   tx.begin();   try   {      try      {         
> editingDomain.getResourceSet().getResources().get(0).load(Collections.EMPTY_MAP); 
>      } catch (IOException e)      {         e.printStackTrace();      }
>      BigInteger fileID = new BigInteger(fileName);      BigInteger ID = 
> null;      try      {         for (int i = 0; !fileID.equals(ID) || 
> (fileID.compareTo(ID) < 0) ; i++)         {            
> editingDomain.getResourceSet().getResources().clear();            
> editingDomain.getResourceSet().createResource(resourceURI);            
> editingDomain.getResourceSet().getResource(resourceURI, true); 
>            model = (Modell) 
> editingDomain.getResourceSet().getResources().get(0).getContents().get(i); 
>            List models = session.createSQLQuery("SELECT E_ID FROM 
> \"modell\"").list();            ID = (BigInteger) models.get(i);         
> }      } catch (RuntimeException e)      {         
> System.err.println("No entry found!");      }   } catch 
> (HibernateException e)   {      e.printStackTrace();   } catch 
> (RuntimeException re)   {      re.printStackTrace();   }   
> session.flush();   tx.commit();   if (session.isOpen())   {      try 
>      {         session.clear();         session.close();      } catch 
> (HibernateException e)      {         System.err.println("Session 
> closing failed");         e.printStackTrace();      }   }
>   return model; }
> 

>
>
> public static HbDataStore initializeDataStore(String fileName) {   final 
> HbDataStore hbds = (HbDataStore) 
> HbHelper.INSTANCE.createRegisterDataStore(fileName);   final EPackage[] 
> ePackages = new EPackage[] { EcupackPackage.eINSTANCE };   
> hbds.setEPackages(ePackages);   final Properties props = new 
> Properties(); // the database settings   try   {      
> props.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");      
> props.setProperty(Environment.URL, "jdbc:hsqldb:hsql://127.0.0.1/" + 
> "ECUall");      props.setProperty(Environment.USER, "sa");      
> props.setProperty(Environment.PASS, "");      
> props.setProperty(Environment.DIALECT, 
> "org.hibernate.dialect.HSQLDialect");      
> props.setProperty(Environment.HBM2DDL_AUTO, "update");      
> props.setProperty(Environment.CACHE_PROVIDER, 
> "org.hibernate.cache.HashtableCacheProvider");      
> props.setProperty(Environment.AUTOCOMMIT, "false");      
> hbds.setProperties(props);   } catch (RuntimeException e1)   {      
> e1.printStackTrace();   }   try   {      hbds.initialize();   } catch 
> (RuntimeException e)   {      e.printStackTrace();   }   return hbds; }
> 

>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617825 is a reply to message #118857] Thu, 17 April 2008 13:41 Go to previous message
Felix is currently offline FelixFriend
Messages: 11
Registered: July 2009
Junior Member
thanks for your really fast answer!
i'll try it and hope i understood the problem finaly :)
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617885 is a reply to message #118857] Wed, 23 April 2008 08:28 Go to previous message
Felix is currently offline FelixFriend
Messages: 11
Registered: July 2009
Junior Member
hi again,

i now have implemented the save/load routines with the resource aproach
and its working fine... until i need locking mechanism :-/
so far i use:

Resource res = editingDomain.getResourceSet().getResources().get(0);
res.save(Collections.EMPTY_MAP);

to save and catch the IOException thrown by the res.save.

i tryed to let 2 clients load the same model and both modify it. the first
attempt to save is working fine, but the second one ends with some
exceptions:

org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect): [...#4]

org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect): [...#4]

org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect): [...#4]

Exception in thread "main"
org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when saving
resource 1

Caused by: org.hibernate.StaleObjectStateException: Row was updated or
deleted by another transaction (or unsaved-value mapping was incorrect):
[...#4]

i guess thats because of the automatic versioning hibernate does
(optimistic loading?), what is ok so far. the problem is that the resource
has neither a .merge() method nor are there unhandled exceptions where i
can handle what should happen when there are conflicts.

what i try to do is, i want to let multiple users load the model, but if
one changes the model the others should get a warning and have to save
with a different name.
is there a (simple ;) ) way to do this?

thx for your help
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617887 is a reply to message #119664] Wed, 23 April 2008 11:30 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
Teneo does not provide a server-client notification mechanism. The cdo project provides this. Within
the Teneo context I would try the following:
Before saving a resource get the modified eobjects (call: getModifiedEObjects), for each of the
objects read the version from the db (using a query which only reads the version column) and compare
it with the version in the object itself (or make a more efficient query in which you also use the
in-mem version). If the version in the object < than the db version then you know that it was
updated and that the user needs to be notified.

I did an extensive check if hibernate supports this functionality out of the box but it does not.

Btw, can you enter a bugzilla feature request for this so that I can add the above functionality to
the HibernateResource? I am not sure when I have time to do this but then it is on the list at least.

The above strategy works fine if the nr. of modified objects per save is fairly modest. If the
number of modified objects is huge then the only way is to use a client-server notification
mechanism (which is not part of Teneo).

gr. Martin

Felix wrote:
> hi again,
>
> i now have implemented the save/load routines with the resource aproach
> and its working fine... until i need locking mechanism :-/
> so far i use:
>
> Resource res = editingDomain.getResourceSet().getResources().get(0);
> res.save(Collections.EMPTY_MAP);
>
> to save and catch the IOException thrown by the res.save.
>
> i tryed to let 2 clients load the same model and both modify it. the
> first attempt to save is working fine, but the second one ends with some
> exceptions:
>
> org.hibernate.StaleObjectStateException: Row was updated or deleted by
> another transaction (or unsaved-value mapping was incorrect): [...#4]
>
> org.hibernate.StaleObjectStateException: Row was updated or deleted by
> another transaction (or unsaved-value mapping was incorrect): [...#4]
>
> org.hibernate.StaleObjectStateException: Row was updated or deleted by
> another transaction (or unsaved-value mapping was incorrect): [...#4]
>
> Exception in thread "main"
> org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when saving
> resource 1
>
> Caused by: org.hibernate.StaleObjectStateException: Row was updated or
> deleted by another transaction (or unsaved-value mapping was incorrect):
> [...#4]
>
> i guess thats because of the automatic versioning hibernate does
> (optimistic loading?), what is ok so far. the problem is that the
> resource has neither a .merge() method nor are there unhandled
> exceptions where i can handle what should happen when there are conflicts.
>
> what i try to do is, i want to let multiple users load the model, but if
> one changes the model the others should get a warning and have to save
> with a different name.
> is there a (simple ;) ) way to do this?
>
> thx for your help
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617915 is a reply to message #119690] Fri, 25 April 2008 14:38 Go to previous message
Felix is currently offline FelixFriend
Messages: 11
Registered: July 2009
Junior Member
hi martin,
thx for your quick help!
but how can i use querys with the automaticaly created session from the
hibernate resource? can i somehow retrieve the active session from my
resource?

Martin Taal wrote:

> Hi Felix,
> Teneo does not provide a server-client notification mechanism. The cdo
project provides this. Within
> the Teneo context I would try the following:
> Before saving a resource get the modified eobjects (call:
getModifiedEObjects), for each of the
> objects read the version from the db (using a query which only reads the
version column) and compare
> it with the version in the object itself (or make a more efficient query in
which you also use the
> in-mem version). If the version in the object < than the db version then you
know that it was
> updated and that the user needs to be notified.

> I did an extensive check if hibernate supports this functionality out of the
box but it does not.

> Btw, can you enter a bugzilla feature request for this so that I can add the
above functionality to
> the HibernateResource? I am not sure when I have time to do this but then it
is on the list at least.

> The above strategy works fine if the nr. of modified objects per save is
fairly modest. If the
> number of modified objects is huge then the only way is to use a
client-server notification
> mechanism (which is not part of Teneo).

> gr. Martin

> Felix wrote:
>> hi again,
>>
>> i now have implemented the save/load routines with the resource aproach
>> and its working fine... until i need locking mechanism :-/
>> so far i use:
>>
>> Resource res = editingDomain.getResourceSet().getResources().get(0);
>> res.save(Collections.EMPTY_MAP);
>>
>> to save and catch the IOException thrown by the res.save.
>>
>> i tryed to let 2 clients load the same model and both modify it. the
>> first attempt to save is working fine, but the second one ends with some
>> exceptions:
>>
>> org.hibernate.StaleObjectStateException: Row was updated or deleted by
>> another transaction (or unsaved-value mapping was incorrect): [...#4]
>>
>> org.hibernate.StaleObjectStateException: Row was updated or deleted by
>> another transaction (or unsaved-value mapping was incorrect): [...#4]
>>
>> org.hibernate.StaleObjectStateException: Row was updated or deleted by
>> another transaction (or unsaved-value mapping was incorrect): [...#4]
>>
>> Exception in thread "main"
>> org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when saving
>> resource 1
>>
>> Caused by: org.hibernate.StaleObjectStateException: Row was updated or
>> deleted by another transaction (or unsaved-value mapping was incorrect):
>> [...#4]
>>
>> i guess thats because of the automatic versioning hibernate does
>> (optimistic loading?), what is ok so far. the problem is that the
>> resource has neither a .merge() method nor are there unhandled
>> exceptions where i can handle what should happen when there are conflicts.
>>
>> what i try to do is, i want to let multiple users load the model, but if
>> one changes the model the others should get a warning and have to save
>> with a different name.
>> is there a (simple ;) ) way to do this?
>>
>> thx for your help
>>
>>
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617920 is a reply to message #120108] Fri, 25 April 2008 18:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
The hibernateresource has a getSession method and a getSessionWrapper method. The source code shows
how you can use the sessionwrapper (just a wrapper to make the hibernateresource also work with the
jpa entitymanager).

It is probably easiest to extend the HibernateResource and add the required behavior in the subclass.

gr. Martin

Felix wrote:
> hi martin,
> thx for your quick help!
> but how can i use querys with the automaticaly created session from the
> hibernate resource? can i somehow retrieve the active session from my
> resource?
>
> Martin Taal wrote:
>
>> Hi Felix,
>> Teneo does not provide a server-client notification mechanism. The cdo
> project provides this. Within
>> the Teneo context I would try the following:
>> Before saving a resource get the modified eobjects (call:
> getModifiedEObjects), for each of the
>> objects read the version from the db (using a query which only reads the
> version column) and compare
>> it with the version in the object itself (or make a more efficient
>> query in
> which you also use the
>> in-mem version). If the version in the object < than the db version
>> then you
> know that it was
>> updated and that the user needs to be notified.
>
>> I did an extensive check if hibernate supports this functionality out
>> of the
> box but it does not.
>
>> Btw, can you enter a bugzilla feature request for this so that I can
>> add the
> above functionality to
>> the HibernateResource? I am not sure when I have time to do this but
>> then it
> is on the list at least.
>
>> The above strategy works fine if the nr. of modified objects per save is
> fairly modest. If the
>> number of modified objects is huge then the only way is to use a
> client-server notification
>> mechanism (which is not part of Teneo).
>
>> gr. Martin
>
>> Felix wrote:
>>> hi again,
>>>
>>> i now have implemented the save/load routines with the resource
>>> aproach and its working fine... until i need locking mechanism :-/
>>> so far i use:
>>>
>>> Resource res = editingDomain.getResourceSet().getResources().get(0);
>>> res.save(Collections.EMPTY_MAP);
>>>
>>> to save and catch the IOException thrown by the res.save.
>>>
>>> i tryed to let 2 clients load the same model and both modify it. the
>>> first attempt to save is working fine, but the second one ends with
>>> some exceptions:
>>>
>>> org.hibernate.StaleObjectStateException: Row was updated or deleted
>>> by another transaction (or unsaved-value mapping was incorrect): [...#4]
>>>
>>> org.hibernate.StaleObjectStateException: Row was updated or deleted
>>> by another transaction (or unsaved-value mapping was incorrect): [...#4]
>>>
>>> org.hibernate.StaleObjectStateException: Row was updated or deleted
>>> by another transaction (or unsaved-value mapping was incorrect): [...#4]
>>>
>>> Exception in thread "main"
>>> org.eclipse.emf.teneo.hibernate.HbMapperException: Exception when
>>> saving resource 1
>>>
>>> Caused by: org.hibernate.StaleObjectStateException: Row was updated
>>> or deleted by another transaction (or unsaved-value mapping was
>>> incorrect): [...#4]
>>>
>>> i guess thats because of the automatic versioning hibernate does
>>> (optimistic loading?), what is ok so far. the problem is that the
>>> resource has neither a .merge() method nor are there unhandled
>>> exceptions where i can handle what should happen when there are
>>> conflicts.
>>>
>>> what i try to do is, i want to let multiple users load the model, but
>>> if one changes the model the others should get a warning and have to
>>> save with a different name.
>>> is there a (simple ;) ) way to do this?
>>>
>>> thx for your help
>>>
>>>
>
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617992 is a reply to message #120178] Mon, 05 May 2008 16:52 Go to previous message
Felix is currently offline FelixFriend
Messages: 11
Registered: July 2009
Junior Member
hi again,
still digging up more questions after solving a problem ;)
is there a easy way to delete a whole model from the DB? when i use the
delete method from the session, it just deletes the "root table" and
leaving the rest of the model as data corpses in the database.

sc.getSessionWrapper().delete(tempRes.getContents().get(0));

thats the code i yet tried.

thx a lot

felix
Re: Failing to update a model that is persisted in the DB [Teneo/Hibernate] [message #617994 is a reply to message #121855] Mon, 05 May 2008 17:23 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
Normally if you delete the root which contains all other data then it should also delete all its
children (and their children). So I am not sure if you have everything contained in the root and/or
that the containment relations are mapped with delete cascade and orphan-delete. You can check the
hibernate mapping for that.

gr. Martin

Felix wrote:
> hi again,
> still digging up more questions after solving a problem ;)
> is there a easy way to delete a whole model from the DB? when i use the
> delete method from the session, it just deletes the "root table" and
> leaving the rest of the model as data corpses in the database.
>
> sc.getSessionWrapper().delete(tempRes.getContents().get(0));
>
> thats the code i yet tried.
>
> thx a lot
>
> felix
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:Implementation Package Location
Next Topic:[Teneo] hibernate3.jar dependencies
Goto Forum:
  


Current Time: Fri Apr 19 20:27:43 GMT 2024

Powered by FUDForum. Page generated in 0.06159 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top