Re: repository.xml in a jar

2004-03-29 Thread Stefan Schlösser
Hi, we have similar Problems when copying data from one db to another. You could use the same include mechanism ojb is using i.e. user.xml to point to a custom xml in the file system. You'd just have to include an empty file with your code. Otherwise you could also modify the ojb repository

Re: OJB with distributed tx and BMT

2004-03-29 Thread Francesco Russo
Hi Thomas, let's suppose I want to use OJB with distributed BMT. In such a scenario, I guess I should do something like: //* a generic SessionBean's method ... UserTransaction utx = sessionCtx.getUserTransaction(); utx.begin(); //* acquire transactional resources which will be enlisted in the

ERRATA CORRIGE - Re: OJB with distributed tx and BMT

2004-03-29 Thread Francesco Russo
Sorry for duplicating my post, but I made a mistake typing Container Managed Persistence instead of Container Managed Transaction! Hi Thomas, let's suppose I want to use OJB with distributed BMT. In such a scenario, I guess I should do something like: //* a generic SessionBean's method ...

Re: Loss of precsion with PersistenceBroker.store() and BigDecima l on Sybase.

2004-03-29 Thread Armin Waibel
Hi Stuart/Danilo I don't use Sybase ASA or Sybase ASE, so it's hard to decide which way to go. Can someone say what we should change in PlatformSybaseImpl (Sybase base class) PlatformSybaseASAImpl PlatformSybaseASEImpl classes to make OJB proper work with Sybase? Does Sybase support NUMERIC (is

Re: OJB with distributed tx and BMT

2004-03-29 Thread Armin Waibel
Hi Francesco, Francesco Russo wrote: Hi Thomas, let's suppose I want to use OJB with distributed BMT. In such a scenario, I guess I should do something like: //* a generic SessionBean's method ... UserTransaction utx = sessionCtx.getUserTransaction(); utx.begin(); //* acquire transactional

Re: [ann] new release 1.0.RC6

2004-03-29 Thread Armin Waibel
Hi Edson, [EMAIL PROTECTED] wrote: Hmmm, what about the 1:0..1 and proxies test for null is always false and the afterStore not being called for collections? Are they fixed too? Sorry I don't know. While refactoring the handling of the auto-xxx code I do my best, but I don't turn my attention

CreationDate-Column for each Table

2004-03-29 Thread Tino Schöllhorn
Hi, I have a (quite small) problem: I want that each table in my database has an attribute CreationDate which reflects the time when this row has been inserted. But I don't want to use any database-specific datatypes or functions. My current idea is really simple and uses the

Re: [ann] new release 1.0.RC6

2004-03-29 Thread Edson Carlos Ericksson Richter
Appear the afterStore stuff is in place, and operational (so, RemovalAwareXXX again working fine). Sorry if sometimes I'm so fast in reporting problems, but I tryied to keep our project tuned to latest OJB ever (maybe not best policy, but until today solved most our problems with bugs).

RE: [ann] new release 1.0.RC6

2004-03-29 Thread Glenn Barnard
Congratulations!!! I have a couple of questions... First, will it have a debuggable version? rc5 didn't (at least as far as I could see)? McCaffrey, John G. [EMAIL PROTECTED] and I have been working with OJB to get the primary key from a native sequence manager. John's using DB2 and I'm

Re: [ann] new release 1.0.RC6

2004-03-29 Thread Edson Carlos Ericksson Richter
If you can download sources, you could do a bin\build jar-debug that will generate the debugabble version. Richter Glenn Barnard wrote: Congratulations!!! I have a couple of questions... First, will it have a debuggable version? rc5 didn't (at least as far as I could see)? McCaffrey,

1:0..1 mappings and dynamic proxies (was Re: [ann] new release 1.0.RC6)

2004-03-29 Thread Edson Carlos Ericksson Richter
Still with problems when using a 1:0..1 mapping + proxy=dynamic. The problem is: when making a reference between two objects (X:Y) and there can be 0 or 1 object in Y side, Y must resturn NULL if it don't exists in database, and the object itself if there is 1 object in database. The rule is

RE: [ann] new release 1.0.RC6

2004-03-29 Thread McCaffrey, John G.
The problem that I ran into was that the version of PlatformDb2Impl from rc4 didn't have a query for getLastInsertIdentityQuery(), and the query for rc5 is values IDENTITY_VAL_LOCAL() fetch first row only which, when executed in my env generates the exception The SQL statement is not supported

auto-delete does not work anymore: rc6???

2004-03-29 Thread Andreas Bohnert
hello everbody, today I checked out the rc6 cvs version and did some validation tests on my application. I found out, that there is something going wrong, when I delete an object. I have an decomposed n-m relation: CONTACT INSTITUTION_CONTACT --- INSTITUTION when I delete an

Insert instead of update generated in RC6

2004-03-29 Thread Guido Beutler
Hello, I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with DB2 V8. Since update to RC6 OJB generates a insert for every stored object when using PB API. OJB seems not to check if the object exists at database. If the object already exist, a SQL Exception is thrown. (-803 which

Newbie at a standstill

2004-03-29 Thread raphael . x . mankin
I am trying to get OJB working and am getting absolutely nowhere, so I appeal to the list for some help. The environment is OJB rc5, Eclipse IDE, Sun JDK1.4.2, Oracle 9, NT4.0. The running of the code is controlled by JUnit. I can connect to the DB both with sqlplus and jdbc. I cannot actually

Re: Insert instead of update generated in RC6

2004-03-29 Thread Armin Waibel
Hi Guido, Guido Beutler wrote: Hello, I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with DB2 V8. Since update to RC6 OJB generates a insert for every stored object when using PB API. OJB seems not to check if the object exists at database. If the object already exist, a SQL

Re: Per-criteria pathClass [was ojb-user: Query casts] 2 of 2

2004-03-29 Thread Jakob Braeuchi
hi phil, thanks for the file. generating a patch in eclipse is quite easy (in most cases). seems you reformatted the code in some way, so the diff get's out of sync. i'll have a look at your changes when i return from my vacation, that's 19. april. jakob Phil Warrick wrote: Hi Jakob, I

Re: auto-delete does not work anymore: rc6???

2004-03-29 Thread Armin Waibel
Hi Andreas, I made a quick test. It works for me. Did you replace the repository.dtd? Can you post the source code snip? regards, Armin Andreas Bohnert wrote: hello everbody, today I checked out the rc6 cvs version and did some validation tests on my application. I found out, that there is

Re: 1:0..1 mappings and dynamic proxies (was Re: [ann] new release 1.0.RC6)

2004-03-29 Thread Jakob Braeuchi
hi edson, executing an additional count on each reference proxy is quite expensive. but i have to admit, i do not have a better solution right now :( jakob Edson Carlos Ericksson Richter wrote: Still with problems when using a 1:0..1 mapping + proxy=dynamic. The problem is: when making a

Re: Newbie at a standstill

2004-03-29 Thread Brian McCallister
Are you using the ant build? The ojb-blank project template does a property replace in the build -- the required database information is in the build.properties and is copied into the generated repository_database.xml that goes in build/ when compilation is run. -Brian On Mar 29, 2004, at

Re: Insert instead of update generated in RC6

2004-03-29 Thread Guido Beutler
Armin Waibel wrote: Hi Guido, Guido Beutler wrote: Hello, I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with DB2 V8. Since update to RC6 OJB generates a insert for every stored object when using PB API. OJB seems not to check if the object exists at database. If the

Re: 1:0..1 mappings and dynamic proxies (was Re: [ann] new release 1.0.RC6)

2004-03-29 Thread Edson Carlos Ericksson Richter
An un-elegant way to do same withou select count: try { String x = myXobject.getY().toString(); } catch(NullPointerException e) { ... do something because there is no Y... } The question is: what cost more? Doing a select count(*) over a indexed (primary key) field, with all network overhead,

Re: 1:0..1 mappings and dynamic proxies (was Re: [ann] new release 1.0.RC6)

2004-03-29 Thread Jakob Braeuchi
hi edson, maybe we have just discovered another configurable feature of ojb. check-existence-of-proxy = 'true' on the relationship-definition. jakob Edson Carlos Ericksson Richter wrote: An un-elegant way to do same withou select count: try { String x = myXobject.getY().toString(); }

Re: Insert instead of update generated in RC6

2004-03-29 Thread Armin Waibel
Hi again, all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and MaxDB. Maybe I forget to write a test for object update ;-). Does ist help? I can not see your Methods at the stack trace. Is it possible, that the cache is never checked? You can't see one of these methods in your

Re: Still Probleml with Mapping Inheritance Hierarchies

2004-03-29 Thread Edson Carlos Ericksson Richter
I can reproduce this problem with OJB 1.0rc6. Appear that when two or more tables with same PKs, with identical values for their PKs have the following behaviour: a) Get Identity for the first object. Get the object by Identity. Put it in the ChainingIterator b) Get Identity for second object.

java.lang.Long not found in OJB Repository

2004-03-29 Thread Mindy Pereira
Can anyone offer advice on what is causing the following error? ERROR 2004-03-29 15:56:21,753 :org.apache.ojb.broker.metadata.ClassNotPersistenc eCapableException: java.lang.Long not found in OJB Repository I use java.lang.Long's in other persisted beans which seem to be working properly and am

Re: java.lang.Long not found in OJB Repository

2004-03-29 Thread Armin Waibel
Hi, think somewhere in code you try to store a java.lang.Long object. If this wasn't the case, please post the whole stack trace. regards, Armin Mindy Pereira wrote: Can anyone offer advice on what is causing the following error? ERROR 2004-03-29 15:56:21,753

RE: java.lang.Long not found in OJB Repository

2004-03-29 Thread Mindy Pereira
That was it Thanks -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 4:05 PM To: OJB Users List Subject: Re: java.lang.Long not found in OJB Repository Hi, think somewhere in code you try to store a java.lang.Long object. If this wasn't the

Re: xdoclet not setting autoincrement

2004-03-29 Thread Laurie Harper
Thomas Dudziak wrote: On Fri, 26 Mar 2004, Laurie Harper wrote: Hi, just thought I should report this (I'd log it as a bug, but Scarab doesn't work for me :-( ): When settings the 'autoincrement' attribute of @ojb.field to 'native', the xdoclet module doesn't generate 'autoincrement' attributes

RE: Loss of precsion with PersistenceBroker.store() and BigDecima l on Sybase.

2004-03-29 Thread Stuart Heriot
Hi Armin, I suspect the change needs to cover both ASA and ASE. I'm actually surprised it doesn't occur on all database types given the documentation on java.sql.PreparedStatement (see below). The setObject call made by the default implementation is documented as setting scale specifically to

Re:unable to connect to hsqldb

2004-03-29 Thread [EMAIL PROTECTED]
hi, i can't connect to hsqldb, please save my family! I'm using hsqldb 1.7.1 and ojb 1.0. My db is Almayer, this is my jdbc-connection-descriptor: jdbc-connection-descriptor jcd-alias=default default-connection=true platform=Hsqldb jdbc-level=3.0

Re:unable to connect to hsqldb

2004-03-29 Thread [EMAIL PROTECTED]
hi, i can't connect to hsqldb. I'm using hsqldb 1.7.1 and ojb 1.0. My db is Almayer, this is my jdbc-connection-descriptor: jdbc-connection-descriptor jcd-alias=default default-connection=true platform=Hsqldb jdbc-level=3.0 driver=org.hsqldb.jdbcDriver