Hi Thomas,

I think this is a concurrency problem. Do this error occur under heavy load? I try to fix this in OJB 1.0.x release branch (OJB_1_0_RELEASE). If possible please try latest from OJB 1.0.x branch (PB-api is stable) and run your test against it.

regards,
Armin


Thomas Franke wrote:
Thomas Dudziak wrote:

Please post the stacktrace of the exact exception. In what way do you
set the primarykey values, application or database ?

We set the primary key in the application.

Sometimes we create a new object with all primary keys but the row is already in the rdbms. We do this because we don't want get the object from the rdms first. Thus we have one rdbms access instead of two.

Here is the full stacktrace:

25.02.2005 15:41:34 [ERROR] de.softenergy.wis.dbadapter.interfaces.calculations.tcategories.CalculatedTCatDayAdapterIF - store(Collection days):
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init Identity for given object [lop] 0 [lop_day] 1109199600000 [modification] 1109342494882 [nutzer_id] 1 [t_klassen_id] 4 [term] 0 [w_id] 50
at org.apache.ojb.broker.Identity.init(Unknown Source)
at org.apache.ojb.broker.Identity.<init>(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown Source)
at de.softenergy.wis.dbadapter.ojb.calculations.tcategories.OjbCalculatedTCatDayAdapter.store(OjbCalculatedTCatDayAdapter.java:97)


at de.softenergy.wis.businesslayer.logic.calculations.tcategories.TCategoryDay.calcPlantDays(TCategoryDay.java:320)

at de.softenergy.wis.businesslayer.logic.calculations.tcategories.TCategoryDay.calcPlant(TCategoryDay.java:248)

at de.softenergy.wis.businesslayer.logic.calculations.tcategories.TCategoryDay.calcTDay(TCategoryDay.java:205)

at de.softenergy.wis.businesslayer.logic.calculations.tcategories.TCategoryDay.execute(TCategoryDay.java:166)

at de.softenergy.wis.businesslayer.logic.calculations.CalculationStarter.run(CalculationStarter.java:60)

Caused by: java.lang.NullPointerException
    at org.apache.ojb.broker.Identity.checkForPrimaryKeys(Unknown Source)
    ... 13 more



best regards and thanks for your answer

Thomas

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to