• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stable JDO implementation

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

I've got following list of open-source JDO implementations from http://www.jdocentral.com.
Speedo (Open-Source)
http://speedo.objectweb.org
JBossDO (Open-Source)
http://www.jboss.org/index.html?module=html&op=userdisplay&id=developers/projects/jboss/jbossdo
Jakarta OJB (Open-Source)
http://jakarta.apache.org/ojb
Triactive JDO (Open-Source)
http://tjdo.sourceforge.net
XORM (Open-Source)
http://xorm.org
JPOX (Open-Source)
http://jpox.sf.net
I'm new to JDO, hence does not know which one of the above open-source JDO implementations is a stable one to use in my application.
Would be great if I get help to decide this.
regards,
kalpesh
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I had to make a quick decision, I would concentrate my research into TJDO and OJB because they're relatively mature and have probably the largest user communities. I could be wrong, of course.
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends on your requirements, like data storage, your data model, existing schemas, and bla bla bla...
- You can forget about JBossDO for a while. I mean, probably one year.
- The Apache OJB doesn't have their own JDO implementation, they have only one adapter do the JDO RI, which is based on the file system for data
storage. Don't recommend
- Speedo. I can't comment
- XORM. stable JDO implementation that supports RDBMS, but using a different concept of interfaces. I recommend
- TJDO. stable JDO implementation that supports RDBMS. works only with schemas created by TJDO. I recommend
- JPOX. stable JDO implementation that supports RDBMS.
I'm a JPOX developer, and so, I would like not to comment about JPOX.
 
kalpeshS desai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Erik,
I'm trying to run a test jdo project using EclipseJDO as a plugin for Eclipse 2.1 as instructed at url,
http://jpox.sourceforge.net/user-docs/eclipseJDO/Tutorial-EclipseJDO.html
I'm using eclipse 2.1.
I've followed all the steps listed in this html.
The enhancer works fine, but when it try to run the Main class, I get error,
java.lang.NullPointerException
at org.jpox.poid.MaxPoidGenerator.reserveBlock(MaxPoidGenerator.java:73)
at org.jpox.poid.PoidManager.getPoidBlock(PoidManager.java:63)
at org.jpox.poid.PoidManager.getPoid(PoidManager.java:38)
at org.jpox.store.StoreManager$2.execute(StoreManager.java:1048)
at org.jpox.store.StoreManager$MgmtTransaction.execute(StoreManager.java:1619)
at org.jpox.store.StoreManager.getNextOID(StoreManager.java:1053)
at org.jpox.store.table.JDOBaseTable.newOID(JDOBaseTable.java:69)
at org.jpox.store.StoreManager.newObjectID(StoreManager.java:981)
at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:267)
at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:712)
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:733)
at model.Main.main(Main.java:29)
java.lang.NullPointerException
at org.jpox.store.table.JDOBaseTable.newOID(JDOBaseTable.java:84)
at org.jpox.store.StoreManager.newObjectID(StoreManager.java:981)
at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:267)
at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:712)
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:733)
at model.Main.main(Main.java:29)
Exception in thread "main"
I'm using com.versant.eclipse.jdo_0.9.7.zip and com.versant.eclipse.jdo.jpox_0.9.7.zip as plugins.
My class,
--------
public class Inv {
String name;
String value;

public void setName(String nm)
{
name = nm;
}
public String getName(){
return name;
}
public void setValue(String val){
value = val;
}
public String getValue(){
return value;
}
}
Inv.jdo file
-------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jdo SYSTEM "file:/javax/jdo/jdo.dtd">
<jdo>
<package name="model">
<class name="Inv">
<field name="name" persistence-modifier="persistent"/>
<field name="value" persistence-modifier="persistent"/>
</class>
</package>
</jdo>
Main class
----------
public class Main {
public static void main(String[] args) {
Properties properties = new Properties();
properties.setProperty("javax.jdo.PersistenceManagerFactoryClass", "org.jpox.PersistenceManagerFactoryImpl");
properties.setProperty("javax.jdo.option.ConnectionURL", "jdbc racle:thin:@T00328588:1521 evk");
properties.setProperty("javax.jdo.option.ConnectionDriverName","oracle.jdbc.driver.OracleDriver");
properties.setProperty("javax.jdo.option.ConnectionUserName","scott");
properties.setProperty("javax.jdo.option.ConnectionPassword","tiger");
properties.setProperty("org.jpox.autoCreateTables","true");
properties.setProperty("org.jpox.validateTables","false");
properties.setProperty("org.jpox.validateConstraints","false");

PersistenceManagerFactory pmfactory = JDOHelper.getPersistenceManagerFactory(properties);
PersistenceManager pm = pmfactory.getPersistenceManager();
Transaction tx = pm.currentTransaction();
tx.begin();
Inv inv = new Inv();
inv.setName("HardDisk");
inv.setValue("150");
pm.makePersistent(inv);
tx.commit();
pm.close();
}
}
Oracle table
------------
NAME VARCHAR2(10)
VALUE VARCHAR2(10)

Kindly address me where I'm doing wrong.
Sorry for such a long question.
Regards,
Kalpesh
 
Erik Bengtson
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using an existing table?
If not, please enable the LOG4J in debug mode and send us.
By the way, it's better to post this type of question at our forum. Many other developers also can help.
Regards,
Erik
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic