You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Stijn de Witt <St...@bergland-it.nl> on 2004/07/28 18:43:28 UTC

Query results have all fields null, and log msg 'object is a proxy'

I posted (half an hour before):
> ... I got everything to work really
> easy thanks to the new docs, and I learned some new stuff too.

<ahem> I might have been to early saying everything works...
I noticed that my query actually doesn't work any more. Can anyone tell me
what's going on?

I have an OM where Candidate extends Person. Person has addresses,
phone numbers and so on, and it also has a status.
Candidate contains specififc fields for a candidate for a job. Things
like experience, social security number, education.
I am querying for all candidates that have status==Status.PENDINGREVIEW. I
know there are three records in the DB.
I get 3 results as I expect, but all fields are set to null...??
Alsy, I see it logging that 'object is a proxy' which I don't think is
correct?
If I should post additional info, such as the repository_user.xml, please
let me know.

TIA for any help,
-Stijn

Here is the code:

protected void loadCandidatesFromDb(Portlet portlet, RunData data)
{
  logger.debug("loadCandidatesFromDb: Starting...");
     Implementation impl = null;
     Database db = null;
     Transaction tx = null;

     try
     {
   logger.debug("loadCandidatesFromDb: Getting OJB instance...");
   impl = OJB.getInstance();
   logger.debug("loadCandidatesFromDb: Getting databse...");
   db = impl.newDatabase();
   logger.debug("loadCandidatesFromDb: Opening database connection...");
   db.open("default", Database.OPEN_READ_ONLY);
   logger.debug("loadCandidatesFromDb: Getting transaction...");
   tx = impl.newTransaction();
   logger.debug("loadCandidatesFromDb: Starting transaction...");
   tx.begin();

   logger.debug("loadCandidatesFromDb: Creating query...");
   org.apache.ojb.odmg.oql.EnhancedOQLQuery query = impl.newOQLQuery();

//   org.apache.ojb.odmg.oql.EnhancedOQLQuery query =
((org.apache.ojb.odmg.ImplementationImpl) impl).newOQLQuery();

   query.create("select candidates from "
        + Candidate.class.getName()
              + " where status = $1");
   query.bind(new java.lang.Integer(Status.PENDINGREVIEW));
   logger.debug("loadCandidatesFromDb: Executing query...");
   DList results = (DList) query.execute();
   logger.debug("loadCandidatesFromDb: Query executed...");
   this.candidates = new Vector();
   this.candidates.addAll(results);


   // DEBUG CODE {
   logger.debug("Found " + results.size() + " results:");
   Iterator it = results.iterator();
   while (it.hasNext())
   {
    Candidate c = (Candidate) it.next();
    logger.debug("Found candidate " + c + ";");
   }
   logger.debug("this.candidates==" + this.candidates + ";");
   // DEBUG CODE }


   logger.debug("loadCandidatesFromDb: Committing transaction...");
   tx.commit();
   logger.debug("loadCandidatesFromDb: Committed transaction.");
   tx = null;
  }
  catch(Exception e)
  {
   logger.error("loadCandidatesFromDb: ERROR: [" + e.getClass().getName() +
"]: " + e.getMessage(), e);
   if ((tx != null) && (tx.isOpen()))
   {
    logger.debug("loadCandidatesFromDb: Aborting transaction...");
    tx.abort();
    tx = null;
   }
  }
  finally
  {
   logger.debug("loadCandidatesFromDb: Closing database connection...");
   try
   {
    // Unfortunately, db.close() can also throw exceptions, so wrap it
    // in another try..catch..finally
    db.close();
   }
   catch(Exception e)
   {
    logger.error("loadCandidatesFromDb: ERROR: [" + e.getClass().getName() +
"]: " + e.getMessage(), e);
   }
   finally
   {
    logger.debug("loadCandidatesFromDb: Done.");
   }
  }
}


And here is (a fragment of) the logfile.
Messages from BitCandidateReviewAction are logged by me.
The rest is mostly OJB.

2004-07-28 18:21:16,625 [PoolThread-9] INFO  RepositoryPersistor - Read
connection repository took 344 ms
2004-07-28 18:21:16,750 [PoolThread-9] INFO
PersistenceBrokerFactoryBaseImpl - Create new PB instance for PBKey
org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****,
already created persistence broker instances: 0
2004-07-28 18:21:16,875 [PoolThread-9] INFO  ObjectCacheFactory - Start
creating new ObjectCache instance
2004-07-28 18:21:16,890 [PoolThread-9] INFO  ObjectCacheFactory - Default
ObjectCache class was org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
2004-07-28 18:21:16,890 [PoolThread-9] INFO  CacheDistributor - Use property
'descriptorBasedCaches' is set 'false'
2004-07-28 18:21:16,890 [PoolThread-9] INFO  ObjectCacheFactory -
Instantiate new org.apache.ojb.broker.cache.CacheDistributor class object
2004-07-28 18:21:16,890 [PoolThread-9] DEBUG ObjectCacheFactory - Object
cache created, using
cache:org.apache.ojb.broker.cache.CacheDistributor@5b701a[Associated
PB=org.apache.ojb.broker.core.PersistenceBrokerImpl@11ce012,Used default
cache=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl@baf4ae[Count of
cached objects=0,Lookup hits=0,Failures=0,Reclaimed=0],Mapped caches={}]
2004-07-28 18:21:16,890 [PoolThread-9] INFO  ObjectCacheFactory - New
ObjectCache instance was created
2004-07-28 18:21:16,890 [PoolThread-9] DEBUG SequenceManagerFactory -
Default sequence manager class was
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
2004-07-28 18:21:16,890 [PoolThread-9] DEBUG SequenceManagerFactory - create
new sequence manager for broker
org.apache.ojb.broker.core.PersistenceBrokerImpl@11ce012
2004-07-28 18:21:16,890 [PoolThread-9] DEBUG SequenceManagerFactory -
Jdbc-Connection-Descriptor 'default' use sequence manager: class
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
2004-07-28 18:21:17,046 [PoolThread-9] DEBUG ImplementationImpl - Set
current database org.apache.ojb.odmg.DatabaseImpl@2f60ce PBKey was
org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****
2004-07-28 18:21:17,046 [PoolThread-9] DEBUG DatabaseImpl - Open database
using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, user=root,
password=*****
2004-07-28 18:21:17,046 [PoolThread-9] DEBUG PersistenceBrokerImpl -
PB.close was called:
org.apache.ojb.broker.core.PersistenceBrokerImpl@11ce012
2004-07-28 18:21:17,046 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Getting transaction...
2004-07-28 18:21:17,078 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Starting transaction...
2004-07-28 18:21:17,140 [PoolThread-9] DEBUG TransactionImpl - Begin
transaction was called on tx org.apache.ojb.odmg.TransactionImpl@735f45,
with associated PB null
2004-07-28 18:21:17,140 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Creating query...
2004-07-28 18:21:17,156 [PoolThread-9] DEBUG OQLQueryImpl - create query for
query-string: select candidates from nl.bergland.codamo.job.Candidate where
status = $1
2004-07-28 18:21:17,375 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Executing query...
2004-07-28 18:21:17,375 [PoolThread-9] DEBUG OQLQueryImpl - Start execute
query
2004-07-28 18:21:17,390 [PoolThread-9] DEBUG
PersistenceBrokerFactoryDefaultImpl - Obtain broker from pool, used PBKey is
org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****
2004-07-28 18:21:17,390 [PoolThread-9] DEBUG QueryReferenceBroker -
getCollectionByQuery (class org.apache.ojb.odmg.collections.DListImpl_2,
class nl.bergland.codamo.job.Candidate, QueryByCriteria from class
nl.bergland.codamo.job.Candidate  where [status = 4])
2004-07-28 18:21:17,406 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Candidate]
2004-07-28 18:21:17,437 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
QueryByCriteria from class nl.bergland.codamo.job.Candidate  where [status =
4]
2004-07-28 18:21:17,453 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-28 18:21:17,453 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-28 18:21:17,484 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
A0.availableFrom,A0.socialSecurityNr,A0.married,A0.hasTransportation,A0.driv
ersLicense,A0.id FROM bit_job_Candidate A0 INNER JOIN bit_Person A1 ON
A0.id=A1.id WHERE A1.status = ?
2004-07-28 18:21:17,500 [PoolThread-9] INFO  ConnectionFactoryPooledImpl -
Create new connection
pool:org.apache.ojb.broker.metadata.JdbcConnectionDescriptor@695527[
  jcd-alias=default
  default-connection=true
  dbms=MySQL
  jdbc-level=2.0
  driver=org.gjt.mm.mysql.Driver
  protocol=jdbc
  sub-protocol=mysql
  db-alias=//localhost:3306/berglandadvies
  user=root
  password=*****
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0,
validationQuery=@VALIDATION_QUERY@, maxIdle=-1, maxActive=21, maxWait=5000,
removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false,
minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false,
removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1,
testOnBorrow=false}
  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false

sequenceDescriptor=org.apache.ojb.broker.metadata.SequenceDescriptor@1559ba8
[
     sequenceManagerClass=class
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
     Properties={autoNaming=true, globalSequenceId=false,
globalSequenceStart=10000, grabSize=20}
]
]
2004-07-28 18:21:17,500 [PoolThread-9] DEBUG ConnectionFactoryPooledImpl -
createPool was called
2004-07-28 18:21:17,531 [PoolThread-9] DEBUG ConnectionFactoryPooledImpl -
makeObject called
2004-07-28 18:21:17,546 [PoolThread-9] DEBUG ConnectionFactoryAbstractImpl -
Create new connection using DriverManager: com.mysql.jdbc.Connection@88e83d
2004-07-28 18:21:17,546 [PoolThread-9] DEBUG ConnectionManagerImpl - Request
new connection from ConnectionFactory: com.mysql.jdbc.Connection@88e83d
2004-07-28 18:21:17,578 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@8c2d23: SELECT
A0.availableFrom,A0.socialSecurityNr,A0.married,A0.hasTransportation,A0.driv
ersLicense,A0.id FROM bit_job_Candidate A0 INNER JOIN bit_Person A1 ON
A0.id=A1.id WHERE A1.status = 4
2004-07-28 18:21:17,781 [PoolThread-9] DEBUG RsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
QueryByCriteria from class nl.bergland.codamo.job.Candidate  where [status =
4], class descriptor: nl.bergland.codamo.job.Candidate]] initialized
2004-07-28 18:21:17,796 [PoolThread-9] DEBUG RsIterator - hasNext() -> true
2004-07-28 18:21:17,875 [PoolThread-9] DEBUG PersistenceBrokerImpl -
getObjectByIdentity nl.bergland.codamo.Person{1}
2004-07-28 18:21:17,890 [PoolThread-9] INFO  CacheDistributor - Create new
ObjectCacheImplementation for 'default'
2004-07-28 18:21:17,890 [PoolThread-9] DEBUG RsIterator - hasNext() -> true
2004-07-28 18:21:17,890 [PoolThread-9] DEBUG PersistenceBrokerImpl -
getObjectByIdentity nl.bergland.codamo.Person{21}
2004-07-28 18:21:17,890 [PoolThread-9] DEBUG RsIterator - hasNext() -> true
2004-07-28 18:21:17,890 [PoolThread-9] DEBUG PersistenceBrokerImpl -
getObjectByIdentity nl.bergland.codamo.Person{22}
2004-07-28 18:21:17,890 [PoolThread-9] DEBUG RsIterator - hasNext() -> false
2004-07-28 18:21:17,953 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Experience]
2004-07-28 18:21:17,953 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
Query from bit_job_CandidateExperience where
[[bit_job_CandidateExperience.candidateId IN [22, 21, 1]], id =
bit_job_CandidateExperience.experienceId]
2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
A0.comments,A0.duties,A0.startDate,A0.stopDate,A0.companyName,A0.id FROM
bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId IN (?,?,?)) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-28 18:21:17,984 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@cfaf6e: SELECT
A0.comments,A0.duties,A0.startDate,A0.stopDate,A0.companyName,A0.id FROM
bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId IN (22,21,1)) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-28 18:21:18,078 [PoolThread-9] DEBUG RsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query: Query from
bit_job_CandidateExperience where [[bit_job_CandidateExperience.candidateId
IN [22, 21, 1]], id = bit_job_CandidateExperience.experienceId], class
descriptor: nl.bergland.codamo.job.Experience]] initialized
2004-07-28 18:21:18,078 [PoolThread-9] DEBUG RsIterator - hasNext() -> false
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Experience]
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
ReportQuery from class nl.bergland.codamo.job.Experience
bit_job_CandidateExperience.candidateId
bit_job_CandidateExperience.experienceId  where
[[bit_job_CandidateExperience.candidateId IN [22, 21, 1]], id =
bit_job_CandidateExperience.experienceId]
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
bit_job_CandidateExperience.candidateId,bit_job_CandidateExperience.experien
ceId FROM bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId IN (?,?,?)) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@6de4b: SELECT
bit_job_CandidateExperience.candidateId,bit_job_CandidateExperience.experien
ceId FROM bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId IN (22,21,1)) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG ReportQueryRsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
ReportQuery from class nl.bergland.codamo.job.Experience
bit_job_CandidateExperience.candidateId
bit_job_CandidateExperience.experienceId  where
[[bit_job_CandidateExperience.candidateId IN [22, 21, 1]], id =
bit_job_CandidateExperience.experienceId], class descriptor:
nl.bergland.codamo.job.Experience]] initialized
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG ReportQueryRsIterator -
hasNext() -> false
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Education]
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
Query from bit_job_CandidateEducation where
[[bit_job_CandidateEducation.candidateId IN [22, 21, 1]], id =
bit_job_CandidateEducation.educationId]
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
A0.comments,A0.level,A0.startDate,A0.diploma,A0.institution,A0.stopDate,A0.n
ame,A0.id FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId IN (?,?,?)) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@19bf996: SELECT
A0.comments,A0.level,A0.startDate,A0.diploma,A0.institution,A0.stopDate,A0.n
ame,A0.id FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId IN (22,21,1)) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG RsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query: Query from
bit_job_CandidateEducation where [[bit_job_CandidateEducation.candidateId IN
[22, 21, 1]], id = bit_job_CandidateEducation.educationId], class
descriptor: nl.bergland.codamo.job.Education]] initialized
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG RsIterator - hasNext() -> false
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Education]
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
ReportQuery from class nl.bergland.codamo.job.Education
bit_job_CandidateEducation.candidateId
bit_job_CandidateEducation.educationId  where
[[bit_job_CandidateEducation.candidateId IN [22, 21, 1]], id =
bit_job_CandidateEducation.educationId]
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
bit_job_CandidateEducation.candidateId,bit_job_CandidateEducation.educationI
d FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId IN (?,?,?)) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-28 18:21:18,250 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@1ed620: SELECT
bit_job_CandidateEducation.candidateId,bit_job_CandidateEducation.educationI
d FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId IN (22,21,1)) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-28 18:21:18,250 [PoolThread-9] DEBUG ReportQueryRsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
ReportQuery from class nl.bergland.codamo.job.Education
bit_job_CandidateEducation.candidateId
bit_job_CandidateEducation.educationId  where
[[bit_job_CandidateEducation.candidateId IN [22, 21, 1]], id =
bit_job_CandidateEducation.educationId], class descriptor:
nl.bergland.codamo.job.Education]] initialized
2004-07-28 18:21:18,250 [PoolThread-9] DEBUG ReportQueryRsIterator -
hasNext() -> false
2004-07-28 18:21:18,250 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@735f45, object is
nl.bergland.codamo.job.Candidate@ba86efid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

2004-07-28 18:21:18,250 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-28 18:21:18,250 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.job.Candidate object
nl.bergland.codamo.job.Candidate@ba86efid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

2004-07-28 18:21:18,265 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe067f30ee:-7fff,
nl.bergland.codamo.Person{1})
2004-07-28 18:21:18,296 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091031678296
2004-07-28 18:21:18,312 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.Person{1}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@735f45, object is
nl.bergland.codamo.job.Candidate@11cccceid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.job.Candidate object
nl.bergland.codamo.job.Candidate@11cccceid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

2004-07-28 18:21:18,328 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe067f30ee:-7fff,
nl.bergland.codamo.Person{21})
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091031678328
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.Person{21}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@735f45, object is
nl.bergland.codamo.job.Candidate@1c9fe7eid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.job.Candidate object
nl.bergland.codamo.job.Candidate@1c9fe7eid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

2004-07-28 18:21:18,328 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe067f30ee:-7fff,
nl.bergland.codamo.Person{22})
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091031678328
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.Person{22}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Query executed...
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
Found 3 results:
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
Found candidate nl.bergland.codamo.job.Candidate@ba86efid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null
;
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
Found candidate nl.bergland.codamo.job.Candidate@11cccceid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null
;
2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
Found candidate nl.bergland.codamo.job.Candidate@1c9fe7eid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null
;


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Query results have all fields null, and log msg 'object is a proxy'

Posted by Stijn de Witt <St...@bergland-it.nl>.
Can anyone help me with this?

I have made some changes in my code, and I got one object of two currently
in the db to load correctly. I don't know why the other one does not load.
I'm having the feeling that I am missing something here. Here is my code
below. I have copied the relevant part of the new logfile and added some
comments/questions to pieces of it I thought looked strange...

Thanks for any help,
-Stijn


    protected void loadCandidatesFromDb(Portlet portlet, RunData data)
    {
  logger.debug("loadCandidatesFromDb: Starting...");
     Implementation impl = null;
     Database db = null;
     Transaction tx = null;

     try
     {
   logger.debug("loadCandidatesFromDb: Getting OJB instance...");
   impl = OJB.getInstance();
   logger.debug("loadCandidatesFromDb: Getting databse...");
   db = impl.newDatabase();
   DatabaseImpl dbImpl = (DatabaseImpl) db;

   logger.debug("loadCandidatesFromDb: Opening database connection...");
   if (dbImpl.isOpen())
    logger.debug("loadCandidatesFromDb: Database already open.");
   else
    db.open("default", Database.OPEN_READ_ONLY);

   PBKey pbKey = dbImpl.getPBKey();
   logger.debug("loadCandidatesFromDb: PBKey==" + pbKey);

   logger.debug("loadCandidatesFromDb: Getting transaction...");
   tx = impl.newTransaction();
   logger.debug("loadCandidatesFromDb: Starting transaction...");
   tx.begin();

   logger.debug("loadCandidatesFromDb: Creating query...");
//   org.apache.ojb.odmg.oql.EnhancedOQLQuery query = impl.newOQLQuery();
   OQLQuery query = impl.newOQLQuery();

//   org.apache.ojb.odmg.oql.EnhancedOQLQuery query =
((org.apache.ojb.odmg.ImplementationImpl) impl).newOQLQuery();

   query.create("select candidates from "
        + Candidate.class.getName()
              + " where status = $1");
   query.bind(new java.lang.Integer(Status.PENDINGREVIEW));
   logger.debug("loadCandidatesFromDb: Executing query...");
   DList results = (DList) query.execute();
   logger.debug("loadCandidatesFromDb: Query executed...");
   this.candidates = new Vector();
   this.candidates.addAll(results);


   // DEBUG CODE {
   logger.debug("Found " + results.size() + " results:");
   Iterator it = results.iterator();
   while (it.hasNext())
   {
    Candidate c = (Candidate) it.next();
    logger.debug("Found candidate " + c + ";");
   }
   logger.debug("this.candidates==" + this.candidates + ";");
   // DEBUG CODE }


   logger.debug("loadCandidatesFromDb: Committing transaction...");
   tx.commit();
   logger.debug("loadCandidatesFromDb: Committed transaction.");
   tx = null;
  }
  catch(Exception e)
  {
   logger.error("loadCandidatesFromDb: ERROR: [" + e.getClass().getName() +
"]: " + e.getMessage(), e);
   if ((tx != null) && (tx.isOpen()))
   {
    logger.debug("loadCandidatesFromDb: Aborting transaction...");
    tx.abort();
    tx = null;
   }
  }
  finally
  {
   logger.debug("loadCandidatesFromDb: Closing database connection...");
   try
   {
    // Unfortunately, db.close() can also throw exceptions, so wrap it
    // in another try..catch..finally
    db.close();
   }
   catch(Exception e)
   {
    logger.error("loadCandidatesFromDb: ERROR: [" + e.getClass().getName() +
"]: " + e.getMessage(), e);
   }
   finally
   {
    logger.debug("loadCandidatesFromDb: Done.");
   }
  }
    }


I set the logging level for classes in the org.apache.ojb.broker.metadata to
INFO to have a somewhat smaller logfile.


2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Starting...
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Getting OJB instance...
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Getting databse...
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Opening database connection...
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG
PersistenceBrokerFactoryDefaultImpl - Obtain broker from pool, used PBKey is
org.apache.ojb.broker.PBKey: jcdAlias=default, user=null, password=null

^ user=null, password=null ?  Is that ok?

2004-07-29 13:36:31,765 [PoolThread-9] DEBUG ImplementationImpl - Set
current database org.apache.ojb.odmg.DatabaseImpl@9d3f8b PBKey was
org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****

^ here it seems ok

2004-07-29 13:36:31,765 [PoolThread-9] DEBUG DatabaseImpl - Open database
using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, user=root,
password=*****
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG PersistenceBrokerImpl -
PB.close was called:
org.apache.ojb.broker.core.PersistenceBrokerImpl@19ab9c5
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: PBKey==org.apache.ojb.broker.PBKey: jcdAlias=default,
user=root, password=*****
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Getting transaction...
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Starting transaction...
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG TransactionImpl - Begin
transaction was called on tx org.apache.ojb.odmg.TransactionImpl@1b6c732,
with associated PB null

^ associated pb is null ??, Again, is this ok?


2004-07-29 13:36:31,765 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Creating query...
2004-07-29 13:36:31,765 [PoolThread-9] DEBUG OQLQueryImpl - create query for
query-string: select candidates from nl.bergland.codamo.job.Candidate where
status = $1
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Executing query...
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG OQLQueryImpl - Start execute
query
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG
PersistenceBrokerFactoryDefaultImpl - Obtain broker from pool, used PBKey is
org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG QueryReferenceBroker -
getCollectionByQuery (class org.apache.ojb.odmg.collections.DListImpl_2,
class nl.bergland.codamo.job.Candidate, QueryByCriteria from class
nl.bergland.codamo.job.Candidate  where [status = 4])
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Candidate]
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
QueryByCriteria from class nl.bergland.codamo.job.Candidate  where [status =
4]
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
A0.availableFrom,A0.socialSecurityNr,A0.married,A0.hasTransportation,A0.driv
ersLicense,A0.id FROM bit_job_Candidate A0 INNER JOIN bit_Person A1 ON
A0.id=A1.id WHERE A1.status = ?
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG ConnectionManagerImpl - Request
new connection from ConnectionFactory: com.mysql.jdbc.Connection@ac8360
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@1db4c43: SELECT
A0.availableFrom,A0.socialSecurityNr,A0.married,A0.hasTransportation,A0.driv
ersLicense,A0.id FROM bit_job_Candidate A0 INNER JOIN bit_Person A1 ON
A0.id=A1.id WHERE A1.status = 4
2004-07-29 13:36:31,781 [PoolThread-9] DEBUG RsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
QueryByCriteria from class nl.bergland.codamo.job.Candidate  where [status =
4], class descriptor: nl.bergland.codamo.job.Candidate]] initialized
2004-07-29 13:36:31,796 [PoolThread-9] DEBUG RsIterator - hasNext() -> true
2004-07-29 13:36:31,828 [PoolThread-9] DEBUG PersistenceBrokerImpl -
getObjectByIdentity nl.bergland.codamo.Person{1}
2004-07-29 13:36:31,828 [PoolThread-9] DEBUG RsIterator - hasNext() -> true
2004-07-29 13:36:31,828 [PoolThread-9] DEBUG RsIterator - hasNext() -> false
2004-07-29 13:36:31,890 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Education]
2004-07-29 13:36:31,890 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
Query from bit_job_CandidateEducation where
[bit_job_CandidateEducation.candidateId = 1, id =
bit_job_CandidateEducation.educationId]
2004-07-29 13:36:31,890 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-29 13:36:31,890 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null

^ Result of getTableAlias = null??

2004-07-29 13:36:31,890 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,890 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,890 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
A0.comments,A0.level,A0.startDate,A0.diploma,A0.institution,A0.stopDate,A0.n
ame,A0.id FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId = ?) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-29 13:36:31,890 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@101751: SELECT
A0.comments,A0.level,A0.startDate,A0.diploma,A0.institution,A0.stopDate,A0.n
ame,A0.id FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId = 1) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-29 13:36:31,921 [PoolThread-9] DEBUG RsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query: Query from
bit_job_CandidateEducation where [bit_job_CandidateEducation.candidateId =
1, id = bit_job_CandidateEducation.educationId], class descriptor:
nl.bergland.codamo.job.Education]] initialized
2004-07-29 13:36:31,921 [PoolThread-9] DEBUG RsIterator - hasNext() -> false
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Education]
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
ReportQuery from class nl.bergland.codamo.job.Education
bit_job_CandidateEducation.candidateId
bit_job_CandidateEducation.educationId  where
[bit_job_CandidateEducation.candidateId = 1, id =
bit_job_CandidateEducation.educationId]
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
bit_job_CandidateEducation.candidateId,bit_job_CandidateEducation.educationI
d FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId = ?) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@131b810: SELECT
bit_job_CandidateEducation.candidateId,bit_job_CandidateEducation.educationI
d FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
(bit_job_CandidateEducation.candidateId = 1) AND A0.id =
bit_job_CandidateEducation.educationId
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG ReportQueryRsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
ReportQuery from class nl.bergland.codamo.job.Education
bit_job_CandidateEducation.candidateId
bit_job_CandidateEducation.educationId  where
[bit_job_CandidateEducation.candidateId = 1, id =
bit_job_CandidateEducation.educationId], class descriptor:
nl.bergland.codamo.job.Education]] initialized
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG ReportQueryRsIterator -
hasNext() -> false
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Experience]
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
Query from bit_job_CandidateExperience where
[bit_job_CandidateExperience.candidateId = 1, id =
bit_job_CandidateExperience.experienceId]
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,937 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
A0.comments,A0.duties,A0.startDate,A0.stopDate,A0.companyName,A0.id FROM
bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId = ?) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@aaca8a: SELECT
A0.comments,A0.duties,A0.startDate,A0.stopDate,A0.companyName,A0.id FROM
bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId = 1) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG RsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query: Query from
bit_job_CandidateExperience where [bit_job_CandidateExperience.candidateId =
1, id = bit_job_CandidateExperience.experienceId], class descriptor:
nl.bergland.codamo.job.Experience]] initialized
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG RsIterator - hasNext() -> false
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG PersistenceBrokerImpl -
Creating RsIterator for class [nl.bergland.codamo.job.Experience]
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery :
ReportQuery from class nl.bergland.codamo.job.Experience
bit_job_CandidateExperience.candidateId
bit_job_CandidateExperience.experienceId  where
[bit_job_CandidateExperience.candidateId = 1, id =
bit_job_CandidateExperience.experienceId]
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG SqlQueryStatement$TableAlias -
TableAlias(): using hints ? false
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
Result of getTableAlias(): null
2004-07-29 13:36:31,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
SQL:SELECT
bit_job_CandidateExperience.candidateId,bit_job_CandidateExperience.experien
ceId FROM bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId = ?) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery:
com.mysql.jdbc.PreparedStatement@89848d: SELECT
bit_job_CandidateExperience.candidateId,bit_job_CandidateExperience.experien
ceId FROM bit_job_Experience A0,bit_job_CandidateExperience WHERE
(bit_job_CandidateExperience.candidateId = 1) AND A0.id =
bit_job_CandidateExperience.experienceId
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG ReportQueryRsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
ReportQuery from class nl.bergland.codamo.job.Experience
bit_job_CandidateExperience.candidateId
bit_job_CandidateExperience.experienceId  where
[bit_job_CandidateExperience.candidateId = 1, id =
bit_job_CandidateExperience.experienceId], class descriptor:
nl.bergland.codamo.job.Experience]] initialized
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG ReportQueryRsIterator -
hasNext() -> false
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@1b6c732, object is
nl.bergland.codamo.job.Candidate@1c3d34bid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

^ This one goes wrong... only null fields...

2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.job.Candidate object
nl.bergland.codamo.job.Candidate@1c3d34bid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

2004-07-29 13:36:31,968 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.Person{1})
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091100991968
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.Person{1}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@1b6c732, object is
nl.bergland.codamo.job.Candidate@162e79cid==0
salutation==MS
title==null
initials==S. G. M.
middleName==null
lastName==Jansen
firstName==Test
birthDate==2004-07-29
nationality==NL
 nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

 nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;

^ But this one is ok! Any null fields here are correct (also null in db)...

2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.job.Candidate object
nl.bergland.codamo.job.Candidate@162e79cid==0
salutation==MS
title==null
initials==S. G. M.
middleName==null
lastName==Jansen
firstName==Test
birthDate==2004-07-29
nationality==NL
 nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

 nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;


2004-07-29 13:36:31,968 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.Person{2})
2004-07-29 13:36:31,968 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091100991968
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@1b6c732, object is
nl.bergland.codamo.Person@13f79f7id==2
salutation==MS
title==null
initials==S. G. M.
middleName==null
lastName==Jansen
firstName==Test
birthDate==2004-07-29
nationality==NL
 nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

 nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;


2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.Person object
nl.bergland.codamo.Person@13f79f7id==2
salutation==MS
title==null
initials==S. G. M.
middleName==null
lastName==Jansen
firstName==Test
birthDate==2004-07-29
nationality==NL
 nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

 nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;


2004-07-29 13:36:31,984 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.Person{2})
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091100991984
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.Person{2}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@1b6c732, object is
nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.PhoneNumber object
nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

2004-07-29 13:36:31,984 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.PhoneNumber{3})
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091100991984
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.PhoneNumber{3}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - lock object
was called on tx org.apache.ojb.odmg.TransactionImpl@1b6c732, object is
nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;

2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - object is a
proxy
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - proceeding
with lock on class: nl.bergland.codamo.Address object
nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;

2004-07-29 13:36:31,984 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.readLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.Address{2})
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - registering
lock on object at 1091100991984
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.Address{2}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ObjectEnvelopeTable - register:
nl.bergland.codamo.Person{2}(org.apache.ojb.odmg.states.StateOldClean)
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Query executed...
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
Found 2 results:
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
Found candidate nl.bergland.codamo.job.Candidate@1c3d34bid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null
;
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
Found candidate nl.bergland.codamo.job.Candidate@162e79cid==0
salutation==MS
title==null
initials==S. G. M.
middleName==null
lastName==Jansen
firstName==Test
birthDate==2004-07-29
nationality==NL
 nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

 nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;

;
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
this.candidates==[nl.bergland.codamo.job.Candidate@1c3d34bid==0
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null
, nl.bergland.codamo.job.Candidate@162e79cid==0
salutation==MS
title==null
initials==S. G. M.
middleName==null
lastName==Jansen
firstName==Test
birthDate==2004-07-29
nationality==NL
 nl.bergland.codamo.PhoneNumber@53ececid==3;
number==555-TEST;
type==phoneDay;

 nl.bergland.codamo.Address@1e78461id==2;
street==Test lane;
houseNr==99;
zipCode==999-TST;
city==Test Town;
state==;
country==BE;
type==homeAddress;

];
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Committing transaction...
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - call
beginTransaction() on PB instance
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ConnectionManagerImpl -
localBegin was called for con com.mysql.jdbc.Connection@ac8360
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ConnectionManagerImpl - Try to
change autoCommit state to 'false'
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ObjectEnvelopeTable - PB is in
internal tx: true  broker was:
org.apache.ojb.broker.core.PersistenceBrokerHandle@1acb189
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - Commit
transaction org.apache.ojb.odmg.TransactionImpl@1b6c732, commit on broker
org.apache.ojb.broker.core.PersistenceBrokerHandle@1acb189
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG ConnectionManagerImpl - commit
was called
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.releaseLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.PhoneNumber{3})
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.releaseLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.Person{1})
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.releaseLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.Address{2})
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG LockManagerDefaultImpl -
LM.releaseLock(tx-192.168.2.112:1478a43:fe0a9fa61d:-7ffb,
nl.bergland.codamo.Person{2})
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG TransactionImpl - Close
Transaction and release current PB
org.apache.ojb.broker.core.PersistenceBrokerHandle@1acb189 on tx
org.apache.ojb.odmg.TransactionImpl@1b6c732
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG PersistenceBrokerImpl -
PB.close was called:
org.apache.ojb.broker.core.PersistenceBrokerImpl@19ab9c5
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Committed transaction.
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Closing database connection...
2004-07-29 13:36:31,984 [PoolThread-9] DEBUG BitCandidateReviewAction -
loadCandidatesFromDb: Done.






----- Original Message ----- 
From: "Stijn de Witt" <St...@bergland-it.nl>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Wednesday, July 28, 2004 6:43 PM
Subject: Query results have all fields null, and log msg 'object is a proxy'


> I posted (half an hour before):
> > ... I got everything to work really
> > easy thanks to the new docs, and I learned some new stuff too.
>
> <ahem> I might have been to early saying everything works...
> I noticed that my query actually doesn't work any more. Can anyone tell me
> what's going on?
>
> I have an OM where Candidate extends Person. Person has addresses,
> phone numbers and so on, and it also has a status.
> Candidate contains specififc fields for a candidate for a job. Things
> like experience, social security number, education.
> I am querying for all candidates that have status==Status.PENDINGREVIEW. I
> know there are three records in the DB.
> I get 3 results as I expect, but all fields are set to null...??
> Alsy, I see it logging that 'object is a proxy' which I don't think is
> correct?
> If I should post additional info, such as the repository_user.xml, please
> let me know.
>
> TIA for any help,
> -Stijn
>
> Here is the code:
>
> protected void loadCandidatesFromDb(Portlet portlet, RunData data)
> {
>   logger.debug("loadCandidatesFromDb: Starting...");
>      Implementation impl = null;
>      Database db = null;
>      Transaction tx = null;
>
>      try
>      {
>    logger.debug("loadCandidatesFromDb: Getting OJB instance...");
>    impl = OJB.getInstance();
>    logger.debug("loadCandidatesFromDb: Getting databse...");
>    db = impl.newDatabase();
>    logger.debug("loadCandidatesFromDb: Opening database connection...");
>    db.open("default", Database.OPEN_READ_ONLY);
>    logger.debug("loadCandidatesFromDb: Getting transaction...");
>    tx = impl.newTransaction();
>    logger.debug("loadCandidatesFromDb: Starting transaction...");
>    tx.begin();
>
>    logger.debug("loadCandidatesFromDb: Creating query...");
>    org.apache.ojb.odmg.oql.EnhancedOQLQuery query = impl.newOQLQuery();
>
> //   org.apache.ojb.odmg.oql.EnhancedOQLQuery query =
> ((org.apache.ojb.odmg.ImplementationImpl) impl).newOQLQuery();
>
>    query.create("select candidates from "
>         + Candidate.class.getName()
>               + " where status = $1");
>    query.bind(new java.lang.Integer(Status.PENDINGREVIEW));
>    logger.debug("loadCandidatesFromDb: Executing query...");
>    DList results = (DList) query.execute();
>    logger.debug("loadCandidatesFromDb: Query executed...");
>    this.candidates = new Vector();
>    this.candidates.addAll(results);
>
>
>    // DEBUG CODE {
>    logger.debug("Found " + results.size() + " results:");
>    Iterator it = results.iterator();
>    while (it.hasNext())
>    {
>     Candidate c = (Candidate) it.next();
>     logger.debug("Found candidate " + c + ";");
>    }
>    logger.debug("this.candidates==" + this.candidates + ";");
>    // DEBUG CODE }
>
>
>    logger.debug("loadCandidatesFromDb: Committing transaction...");
>    tx.commit();
>    logger.debug("loadCandidatesFromDb: Committed transaction.");
>    tx = null;
>   }
>   catch(Exception e)
>   {
>    logger.error("loadCandidatesFromDb: ERROR: [" + e.getClass().getName()
+
> "]: " + e.getMessage(), e);
>    if ((tx != null) && (tx.isOpen()))
>    {
>     logger.debug("loadCandidatesFromDb: Aborting transaction...");
>     tx.abort();
>     tx = null;
>    }
>   }
>   finally
>   {
>    logger.debug("loadCandidatesFromDb: Closing database connection...");
>    try
>    {
>     // Unfortunately, db.close() can also throw exceptions, so wrap it
>     // in another try..catch..finally
>     db.close();
>    }
>    catch(Exception e)
>    {
>     logger.error("loadCandidatesFromDb: ERROR: [" + e.getClass().getName()
+
> "]: " + e.getMessage(), e);
>    }
>    finally
>    {
>     logger.debug("loadCandidatesFromDb: Done.");
>    }
>   }
> }
>
>
> And here is (a fragment of) the logfile.
> Messages from BitCandidateReviewAction are logged by me.
> The rest is mostly OJB.
>
> 2004-07-28 18:21:16,625 [PoolThread-9] INFO  RepositoryPersistor - Read
> connection repository took 344 ms
> 2004-07-28 18:21:16,750 [PoolThread-9] INFO
> PersistenceBrokerFactoryBaseImpl - Create new PB instance for PBKey
> org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****,
> already created persistence broker instances: 0
> 2004-07-28 18:21:16,875 [PoolThread-9] INFO  ObjectCacheFactory - Start
> creating new ObjectCache instance
> 2004-07-28 18:21:16,890 [PoolThread-9] INFO  ObjectCacheFactory - Default
> ObjectCache class was org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
> 2004-07-28 18:21:16,890 [PoolThread-9] INFO  CacheDistributor - Use
property
> 'descriptorBasedCaches' is set 'false'
> 2004-07-28 18:21:16,890 [PoolThread-9] INFO  ObjectCacheFactory -
> Instantiate new org.apache.ojb.broker.cache.CacheDistributor class object
> 2004-07-28 18:21:16,890 [PoolThread-9] DEBUG ObjectCacheFactory - Object
> cache created, using
> cache:org.apache.ojb.broker.cache.CacheDistributor@5b701a[Associated
> PB=org.apache.ojb.broker.core.PersistenceBrokerImpl@11ce012,Used default
> cache=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl@baf4ae[Count of
> cached objects=0,Lookup hits=0,Failures=0,Reclaimed=0],Mapped caches={}]
> 2004-07-28 18:21:16,890 [PoolThread-9] INFO  ObjectCacheFactory - New
> ObjectCache instance was created
> 2004-07-28 18:21:16,890 [PoolThread-9] DEBUG SequenceManagerFactory -
> Default sequence manager class was
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
> 2004-07-28 18:21:16,890 [PoolThread-9] DEBUG SequenceManagerFactory -
create
> new sequence manager for broker
> org.apache.ojb.broker.core.PersistenceBrokerImpl@11ce012
> 2004-07-28 18:21:16,890 [PoolThread-9] DEBUG SequenceManagerFactory -
> Jdbc-Connection-Descriptor 'default' use sequence manager: class
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
> 2004-07-28 18:21:17,046 [PoolThread-9] DEBUG ImplementationImpl - Set
> current database org.apache.ojb.odmg.DatabaseImpl@2f60ce PBKey was
> org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****
> 2004-07-28 18:21:17,046 [PoolThread-9] DEBUG DatabaseImpl - Open database
> using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, user=root,
> password=*****
> 2004-07-28 18:21:17,046 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> PB.close was called:
> org.apache.ojb.broker.core.PersistenceBrokerImpl@11ce012
> 2004-07-28 18:21:17,046 [PoolThread-9] DEBUG BitCandidateReviewAction -
> loadCandidatesFromDb: Getting transaction...
> 2004-07-28 18:21:17,078 [PoolThread-9] DEBUG BitCandidateReviewAction -
> loadCandidatesFromDb: Starting transaction...
> 2004-07-28 18:21:17,140 [PoolThread-9] DEBUG TransactionImpl - Begin
> transaction was called on tx org.apache.ojb.odmg.TransactionImpl@735f45,
> with associated PB null
> 2004-07-28 18:21:17,140 [PoolThread-9] DEBUG BitCandidateReviewAction -
> loadCandidatesFromDb: Creating query...
> 2004-07-28 18:21:17,156 [PoolThread-9] DEBUG OQLQueryImpl - create query
for
> query-string: select candidates from nl.bergland.codamo.job.Candidate
where
> status = $1
> 2004-07-28 18:21:17,375 [PoolThread-9] DEBUG BitCandidateReviewAction -
> loadCandidatesFromDb: Executing query...
> 2004-07-28 18:21:17,375 [PoolThread-9] DEBUG OQLQueryImpl - Start execute
> query
> 2004-07-28 18:21:17,390 [PoolThread-9] DEBUG
> PersistenceBrokerFactoryDefaultImpl - Obtain broker from pool, used PBKey
is
> org.apache.ojb.broker.PBKey: jcdAlias=default, user=root, password=*****
> 2004-07-28 18:21:17,390 [PoolThread-9] DEBUG QueryReferenceBroker -
> getCollectionByQuery (class org.apache.ojb.odmg.collections.DListImpl_2,
> class nl.bergland.codamo.job.Candidate, QueryByCriteria from class
> nl.bergland.codamo.job.Candidate  where [status = 4])
> 2004-07-28 18:21:17,406 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> Creating RsIterator for class [nl.bergland.codamo.job.Candidate]
> 2004-07-28 18:21:17,437 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery
:
> QueryByCriteria from class nl.bergland.codamo.job.Candidate  where [status
=
> 4]
> 2004-07-28 18:21:17,453 [PoolThread-9] DEBUG
SqlQueryStatement$TableAlias -
> TableAlias(): using hints ? false
> 2004-07-28 18:21:17,453 [PoolThread-9] DEBUG
SqlQueryStatement$TableAlias -
> TableAlias(): using hints ? false
> 2004-07-28 18:21:17,484 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> SQL:SELECT
>
A0.availableFrom,A0.socialSecurityNr,A0.married,A0.hasTransportation,A0.driv
> ersLicense,A0.id FROM bit_job_Candidate A0 INNER JOIN bit_Person A1 ON
> A0.id=A1.id WHERE A1.status = ?
> 2004-07-28 18:21:17,500 [PoolThread-9] INFO  ConnectionFactoryPooledImpl -
> Create new connection
> pool:org.apache.ojb.broker.metadata.JdbcConnectionDescriptor@695527[
>   jcd-alias=default
>   default-connection=true
>   dbms=MySQL
>   jdbc-level=2.0
>   driver=org.gjt.mm.mysql.Driver
>   protocol=jdbc
>   sub-protocol=mysql
>   db-alias=//localhost:3306/berglandadvies
>   user=root
>   password=*****
>   eager-release=false
>   ConnectionPoolDescriptor={whenExhaustedAction=0,
> validationQuery=@VALIDATION_QUERY@, maxIdle=-1, maxActive=21,
maxWait=5000,
> removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false,
> minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false,
> removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1,
> testOnBorrow=false}
>   batchMode=false
>   useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
>   ignoreAutoCommitExceptions=false
>
>
sequenceDescriptor=org.apache.ojb.broker.metadata.SequenceDescriptor@1559ba8
> [
>      sequenceManagerClass=class
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
>      Properties={autoNaming=true, globalSequenceId=false,
> globalSequenceStart=10000, grabSize=20}
> ]
> ]
> 2004-07-28 18:21:17,500 [PoolThread-9] DEBUG ConnectionFactoryPooledImpl -
> createPool was called
> 2004-07-28 18:21:17,531 [PoolThread-9] DEBUG ConnectionFactoryPooledImpl -
> makeObject called
> 2004-07-28 18:21:17,546 [PoolThread-9] DEBUG
ConnectionFactoryAbstractImpl -
> Create new connection using DriverManager:
com.mysql.jdbc.Connection@88e83d
> 2004-07-28 18:21:17,546 [PoolThread-9] DEBUG ConnectionManagerImpl -
Request
> new connection from ConnectionFactory: com.mysql.jdbc.Connection@88e83d
> 2004-07-28 18:21:17,578 [PoolThread-9] DEBUG JdbcAccessImpl -
executeQuery:
> com.mysql.jdbc.PreparedStatement@8c2d23: SELECT
>
A0.availableFrom,A0.socialSecurityNr,A0.married,A0.hasTransportation,A0.driv
> ersLicense,A0.id FROM bit_job_Candidate A0 INNER JOIN bit_Person A1 ON
> A0.id=A1.id WHERE A1.status = 4
> 2004-07-28 18:21:17,781 [PoolThread-9] DEBUG RsIterator -
> RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
> QueryByCriteria from class nl.bergland.codamo.job.Candidate  where [status
=
> 4], class descriptor: nl.bergland.codamo.job.Candidate]] initialized
> 2004-07-28 18:21:17,796 [PoolThread-9] DEBUG RsIterator - hasNext() ->
true
> 2004-07-28 18:21:17,875 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> getObjectByIdentity nl.bergland.codamo.Person{1}
> 2004-07-28 18:21:17,890 [PoolThread-9] INFO  CacheDistributor - Create new
> ObjectCacheImplementation for 'default'
> 2004-07-28 18:21:17,890 [PoolThread-9] DEBUG RsIterator - hasNext() ->
true
> 2004-07-28 18:21:17,890 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> getObjectByIdentity nl.bergland.codamo.Person{21}
> 2004-07-28 18:21:17,890 [PoolThread-9] DEBUG RsIterator - hasNext() ->
true
> 2004-07-28 18:21:17,890 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> getObjectByIdentity nl.bergland.codamo.Person{22}
> 2004-07-28 18:21:17,890 [PoolThread-9] DEBUG RsIterator - hasNext() ->
false
> 2004-07-28 18:21:17,953 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> Creating RsIterator for class [nl.bergland.codamo.job.Experience]
> 2004-07-28 18:21:17,953 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery
:
> Query from bit_job_CandidateExperience where
> [[bit_job_CandidateExperience.candidateId IN [22, 21, 1]], id =
> bit_job_CandidateExperience.experienceId]
> 2004-07-28 18:21:17,953 [PoolThread-9] DEBUG
SqlQueryStatement$TableAlias -
> TableAlias(): using hints ? false
> 2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:17,953 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> SQL:SELECT
> A0.comments,A0.duties,A0.startDate,A0.stopDate,A0.companyName,A0.id FROM
> bit_job_Experience A0,bit_job_CandidateExperience WHERE
> (bit_job_CandidateExperience.candidateId IN (?,?,?)) AND A0.id =
> bit_job_CandidateExperience.experienceId
> 2004-07-28 18:21:17,984 [PoolThread-9] DEBUG JdbcAccessImpl -
executeQuery:
> com.mysql.jdbc.PreparedStatement@cfaf6e: SELECT
> A0.comments,A0.duties,A0.startDate,A0.stopDate,A0.companyName,A0.id FROM
> bit_job_Experience A0,bit_job_CandidateExperience WHERE
> (bit_job_CandidateExperience.candidateId IN (22,21,1)) AND A0.id =
> bit_job_CandidateExperience.experienceId
> 2004-07-28 18:21:18,078 [PoolThread-9] DEBUG RsIterator -
> RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query: Query
from
> bit_job_CandidateExperience where
[[bit_job_CandidateExperience.candidateId
> IN [22, 21, 1]], id = bit_job_CandidateExperience.experienceId], class
> descriptor: nl.bergland.codamo.job.Experience]] initialized
> 2004-07-28 18:21:18,078 [PoolThread-9] DEBUG RsIterator - hasNext() ->
false
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> Creating RsIterator for class [nl.bergland.codamo.job.Experience]
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery
:
> ReportQuery from class nl.bergland.codamo.job.Experience
> bit_job_CandidateExperience.candidateId
> bit_job_CandidateExperience.experienceId  where
> [[bit_job_CandidateExperience.candidateId IN [22, 21, 1]], id =
> bit_job_CandidateExperience.experienceId]
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG
SqlQueryStatement$TableAlias -
> TableAlias(): using hints ? false
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> SQL:SELECT
>
bit_job_CandidateExperience.candidateId,bit_job_CandidateExperience.experien
> ceId FROM bit_job_Experience A0,bit_job_CandidateExperience WHERE
> (bit_job_CandidateExperience.candidateId IN (?,?,?)) AND A0.id =
> bit_job_CandidateExperience.experienceId
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl -
executeQuery:
> com.mysql.jdbc.PreparedStatement@6de4b: SELECT
>
bit_job_CandidateExperience.candidateId,bit_job_CandidateExperience.experien
> ceId FROM bit_job_Experience A0,bit_job_CandidateExperience WHERE
> (bit_job_CandidateExperience.candidateId IN (22,21,1)) AND A0.id =
> bit_job_CandidateExperience.experienceId
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG ReportQueryRsIterator -
> RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
> ReportQuery from class nl.bergland.codamo.job.Experience
> bit_job_CandidateExperience.candidateId
> bit_job_CandidateExperience.experienceId  where
> [[bit_job_CandidateExperience.candidateId IN [22, 21, 1]], id =
> bit_job_CandidateExperience.experienceId], class descriptor:
> nl.bergland.codamo.job.Experience]] initialized
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG ReportQueryRsIterator -
> hasNext() -> false
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> Creating RsIterator for class [nl.bergland.codamo.job.Education]
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery
:
> Query from bit_job_CandidateEducation where
> [[bit_job_CandidateEducation.candidateId IN [22, 21, 1]], id =
> bit_job_CandidateEducation.educationId]
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG
SqlQueryStatement$TableAlias -
> TableAlias(): using hints ? false
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> SQL:SELECT
>
A0.comments,A0.level,A0.startDate,A0.diploma,A0.institution,A0.stopDate,A0.n
> ame,A0.id FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
> (bit_job_CandidateEducation.candidateId IN (?,?,?)) AND A0.id =
> bit_job_CandidateEducation.educationId
> 2004-07-28 18:21:18,140 [PoolThread-9] DEBUG JdbcAccessImpl -
executeQuery:
> com.mysql.jdbc.PreparedStatement@19bf996: SELECT
>
A0.comments,A0.level,A0.startDate,A0.diploma,A0.institution,A0.stopDate,A0.n
> ame,A0.id FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
> (bit_job_CandidateEducation.candidateId IN (22,21,1)) AND A0.id =
> bit_job_CandidateEducation.educationId
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG RsIterator -
> RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query: Query
from
> bit_job_CandidateEducation where [[bit_job_CandidateEducation.candidateId
IN
> [22, 21, 1]], id = bit_job_CandidateEducation.educationId], class
> descriptor: nl.bergland.codamo.job.Education]] initialized
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG RsIterator - hasNext() ->
false
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG PersistenceBrokerImpl -
> Creating RsIterator for class [nl.bergland.codamo.job.Education]
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG JdbcAccessImpl - executeQuery
:
> ReportQuery from class nl.bergland.codamo.job.Education
> bit_job_CandidateEducation.candidateId
> bit_job_CandidateEducation.educationId  where
> [[bit_job_CandidateEducation.candidateId IN [22, 21, 1]], id =
> bit_job_CandidateEducation.educationId]
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG
SqlQueryStatement$TableAlias -
> TableAlias(): using hints ? false
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> Result of getTableAlias(): null
> 2004-07-28 18:21:18,234 [PoolThread-9] DEBUG SqlGeneratorDefaultImpl -
> SQL:SELECT
>
bit_job_CandidateEducation.candidateId,bit_job_CandidateEducation.educationI
> d FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
> (bit_job_CandidateEducation.candidateId IN (?,?,?)) AND A0.id =
> bit_job_CandidateEducation.educationId
> 2004-07-28 18:21:18,250 [PoolThread-9] DEBUG JdbcAccessImpl -
executeQuery:
> com.mysql.jdbc.PreparedStatement@1ed620: SELECT
>
bit_job_CandidateEducation.candidateId,bit_job_CandidateEducation.educationI
> d FROM bit_job_Education A0,bit_job_CandidateEducation WHERE
> (bit_job_CandidateEducation.candidateId IN (22,21,1)) AND A0.id =
> bit_job_CandidateEducation.educationId
> 2004-07-28 18:21:18,250 [PoolThread-9] DEBUG ReportQueryRsIterator -
> RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
> ReportQuery from class nl.bergland.codamo.job.Education
> bit_job_CandidateEducation.candidateId
> bit_job_CandidateEducation.educationId  where
> [[bit_job_CandidateEducation.candidateId IN [22, 21, 1]], id =
> bit_job_CandidateEducation.educationId], class descriptor:
> nl.bergland.codamo.job.Education]] initialized
> 2004-07-28 18:21:18,250 [PoolThread-9] DEBUG ReportQueryRsIterator -
> hasNext() -> false
> 2004-07-28 18:21:18,250 [PoolThread-9] DEBUG TransactionImpl - lock object
> was called on tx org.apache.ojb.odmg.TransactionImpl@735f45, object is
> nl.bergland.codamo.job.Candidate@ba86efid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
>
> 2004-07-28 18:21:18,250 [PoolThread-9] DEBUG TransactionImpl - object is a
> proxy
> 2004-07-28 18:21:18,250 [PoolThread-9] DEBUG TransactionImpl - proceeding
> with lock on class: nl.bergland.codamo.job.Candidate object
> nl.bergland.codamo.job.Candidate@ba86efid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
>
> 2004-07-28 18:21:18,265 [PoolThread-9] DEBUG LockManagerDefaultImpl -
> LM.readLock(tx-192.168.2.112:1478a43:fe067f30ee:-7fff,
> nl.bergland.codamo.Person{1})
> 2004-07-28 18:21:18,296 [PoolThread-9] DEBUG TransactionImpl - registering
> lock on object at 1091031678296
> 2004-07-28 18:21:18,312 [PoolThread-9] DEBUG ObjectEnvelopeTable -
register:
> nl.bergland.codamo.Person{1}(org.apache.ojb.odmg.states.StateOldClean)
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - lock object
> was called on tx org.apache.ojb.odmg.TransactionImpl@735f45, object is
> nl.bergland.codamo.job.Candidate@11cccceid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
>
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - object is a
> proxy
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - proceeding
> with lock on class: nl.bergland.codamo.job.Candidate object
> nl.bergland.codamo.job.Candidate@11cccceid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
>
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG LockManagerDefaultImpl -
> LM.readLock(tx-192.168.2.112:1478a43:fe067f30ee:-7fff,
> nl.bergland.codamo.Person{21})
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - registering
> lock on object at 1091031678328
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG ObjectEnvelopeTable -
register:
> nl.bergland.codamo.Person{21}(org.apache.ojb.odmg.states.StateOldClean)
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - lock object
> was called on tx org.apache.ojb.odmg.TransactionImpl@735f45, object is
> nl.bergland.codamo.job.Candidate@1c9fe7eid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
>
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - object is a
> proxy
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - proceeding
> with lock on class: nl.bergland.codamo.job.Candidate object
> nl.bergland.codamo.job.Candidate@1c9fe7eid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
>
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG LockManagerDefaultImpl -
> LM.readLock(tx-192.168.2.112:1478a43:fe067f30ee:-7fff,
> nl.bergland.codamo.Person{22})
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG TransactionImpl - registering
> lock on object at 1091031678328
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG ObjectEnvelopeTable -
register:
> nl.bergland.codamo.Person{22}(org.apache.ojb.odmg.states.StateOldClean)
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
> loadCandidatesFromDb: Query executed...
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
> Found 3 results:
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
> Found candidate nl.bergland.codamo.job.Candidate@ba86efid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
> ;
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
> Found candidate nl.bergland.codamo.job.Candidate@11cccceid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
> ;
> 2004-07-28 18:21:18,328 [PoolThread-9] DEBUG BitCandidateReviewAction -
> Found candidate nl.bergland.codamo.job.Candidate@1c9fe7eid==0
> salutation==null
> title==null
> initials==null
> middleName==null
> lastName==null
> firstName==null
> birthDate==null
> nationality==null
> ;
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org