All my OJB use-case tests work fine outside Tomcat, but the minute they're
in a web container I get a ClassNotPersistenceCapableException.
As a very simple test, I put this inside a scriptlet in a JSP:
Lineal x1 = new Lineal(50, Lineal.METRE);
Lineal y1 = new Lineal(100, Lineal.METRE);
String gis1 = "gis1";
Node node = new Node(gis1, x1, y1);
PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
broker.store(node);
broker.close();
This dumps this stack trace:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: OJB
ERROR: Dont know how to autoincrement field class
com.kiwiplan.persistence.PersistentObject.id
at org.apache.ojb.broker.Identity.(Identity.java:156)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:534)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(PersistenceBroker
Impl.java:497)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:53)
...
The class in question is not PersistentObject as the trace claims, but it is
a subclass of PersistentObject called Node. All PersistentObject provides is
the id attribute.
All this worked just fine under 0.9.4. Does anyone know what could be
causing this problem?
Thanks
Gareth.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>