Yes, exactly what I do. But see, to B instances be stored in database, you
must put auto-update='true' in your collection descriptor.
In real, I use a collection class RemovalAwareCollection (or a specialized
RemovalAwareList that I've created) to auto-delete. So, if I
a.getCol().remove( 0 );
What your GMT? In my case, all date/time are stored in database with -3
hours, because I'm on GMT-3. I'm using SapDB.
I think that is this you getting, and it's a internationalization Java
feature...
Can someone else confirm this?
Edson Richter
- Original Message -
From: Mykola
Can you try to change from log.error to e.printStackTrace() so we can have
more info about line/stack trace?
The code you are using to obtain the broker is exatly same I'm using, so
it's right.
What about .xml and .dtd? You remembered to updated too?
Edson
- Original Message -
From:
I had this (exactly) stack trace when I made some reference (foreign key)
with two fields mapping for a table that has only one field in primary key.
I think OJB must check if fkfields[].length == pkfield[].lenght, and throw a
better explanatory exception. The code in PersistenceBrokerImpl should
Hi,
try to use JTA UserTransaction or container-managed tx
and do not use ODMG tx-declaration.
UserTransaction utx = ...
utx.begin()
db.deletePersistent(toBeDeleted); /* here it crashes */
utx.commit()
HTH
regards,
Armin
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL
Hello Armin,
I tried this alread. This will give me an:
org.odmg.TransactionNotInProgressException: No transaction in progress,
cannot delete persistent
at org.apache.ojb.odmg.DatabaseImpl.deletePersistent(Unknown Source)
at
I can't quite figure out how to shut off the connection logging, the
one that looks like:
[org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] INFO:
Create new connection
pool:[EMAIL PROTECTED]
jcd-alias=oraclesl
default-connection=false
dbms=Oracle
jdbc-level=2.0
Edson,
see this is very interesting because i do not use any special
collection class. I use a simple
vector. When i do the stuff you are describing below, my new B object
is not being created in
the database, EVEN with my auto-update set to true. If i change
anything on the A object, the
Hi,
I was out yesterday, so I just read this. This is an
excellent explanation. When I encountered the problem,
I very much suspected it was something like you were
describing. But I was not sure, and in particular, I
was not sure what the right fix might be.
Thanks!
Bonnie MacKellar
software
Rob,
I have had this problem to, and posted all the info that I could to try to
diagnose the issue, to no avail. I ended up just coding a work around to get
what I needed.
I noticed that when I ran a query to get the count of expected objects, the
count I got back was right, but the collection was
I've had this problem too.
The issue is that the result set is being closed prematurely because the
eager-release attribute in the connection descriptor was set to true;
if you can try setting this to false. I was able to do this without any
probs because I'nm using tomcat, the problem appeared
I do call persistanceBroker.abortTransaction(); when I catch an exception,
and I call
persistanceBroker.close(); in the finally of the method
I am not sure if I understand your suggestion about which transaction logic
to use.
I am not using EJBs, I am using websphere datasource, with DB2
I tried this alread. This will give me an:
sorry, overlooked that!
org.odmg.TransactionNotInProgressException: No external transaction
found
Seems OJB is not associated with JTA transaction.
Can you try
UserTransaction utx = ...
utx.begin()
odmg.currentTransaction();
Hi!
The persistence should occur automatically when auto-update=true, even using
Vectors.
Are you working with OJB Api, ODBC or JDO?
The samples I've shown uses OJB Api. And of course, I use transactions...
(or I store A and all instances of B, or don't store anything. This is a
must when
I've tried e.printStackTrace() , log.error, simple System.out - none of them
prints anything.
I've configured log4j.properties to DEBUG everything - the same result.
I found the problem - jcd-alias=default was missing in repository.xml.
OJB 0.9.7 doesn't require it, but OJB 1.0.rc3 does.
urk, that should definitely be handled in a nice way.
-Original Message-
From: Mykola Ostapchuk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 10:05 AM
To: [EMAIL PROTECTED]
Subject: Re: Migrating from OJB 0.9.7 to OJB 1.0.rc3
I've tried e.printStackTrace() , log.error, simple
Hi,
I can't instantiate query with the next line:
Query query = QueryFactory.newQuery(CountriesVO.class, criteria);
It generates error and method returns null.
The method worked well with OJB 0.9.7, now I'm using OJB 1.0.rc3.
Does anybody have any idea what can be wrong?
One more question: I
Thank you.
-Original Message-
From: Thomas Mahler [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 2:35 PM
To: OJB Users List
Subject: Re: FW: newbie question
I assume you are talking about Jakarta Slide?
Jakarta Slide is a CMS engine which provides it's own abstraction of
I solved the problem by using
Query query = new QueryByCriteria(CountriesVO.class, criteria);
I'm wandering why
Query query = QueryFactory.newQuery(CountriesVO.class,criteria);
doesn't work in OJB 1.0.rc3?..
Regards,
Mykola
- Original Message -
From: Mykola Ostapchuk [EMAIL PROTECTED]
Hi Edson,
After migration to OJB 1.0.rc3 I don't have this problem anymore.
Can anybody confirm it was a bug in OJB 0.9.7?
Regards,
Mykola Ostapchuk
What your GMT? In my case, all date/time are stored in database with -3
hours, because I'm on GMT-3. I'm using SapDB.
I think that is this
After version 0.97 (I believe) of OJB, WebSphere started to require full
server resert in order to get OJB to catch up on the reloaded classes. I
sent a note to IBM tech support and here's what they came up with. I hope
this information is usable to you guys.
Following is the update from our L3
Hi,
I've read somewhere in this ML that, since the latest releases, OJB uses
null values for FK when the referenced object is null. But it doesn't,
it uses the default 0 value instead (the FK is a int). Note that my FK
field descriptor is defined with the nullable attribute.
This is really
Where do the repository** files need to be located so that my compiled
classes can recognize and make use of them?
Thanks in advance,
~ Matthew
--
Met @ Uber [EMAIL PROTECTED]
Uberstats
-
To unsubscribe, e-mail: [EMAIL
In your classpath.
Cheers
Shane
-Original Message-
From: Met @ Uber [mailto:[EMAIL PROTECTED]
Sent: Thursday, 10 July 2003 12:57 p.m.
To: OJB User
Subject: Repository || File not found
Where do the repository** files need to be located so that my compiled
classes can recognize and
Does anyone see whats wrong with the following XML file? Also, what
tool on a Linux machine might I use to compare XML files to a DTD?
All the help is greatly appreciated.
=== repository_database.xml ===
jdbc-connection-descriptor
jcd-alias=default
default-connection=true
Met @ Uber wrote:
Does anyone see whats wrong with the following XML file? Also, what
tool on a Linux machine might I use to compare XML files to a DTD?
You seem to be missing a closing quote with the driver attribute:
jdbc-connection-descriptor
jcd-alias=default
26 matches
Mail list logo