Re: Read connection repository file at runtime

2006-08-07 Thread Steve Vangasse
Thanks Armin. Sorry for taking so long to reply. I've solved it programatically for now. I would say the best solution would be the customizable class to read xml metadata interface that you suggested. Steve Vangasse www.boardshop.co.uk - Original Message - From: Armin Waibel [EMAIL

java.util.NoSuchElementException after stesstest

2006-08-03 Thread Dennis Bekkering
Hello, After and while running a stresstest with a tool i get the following error. My code stops at PersistenceBrokerFactory.defaultPersistenceBroker(). I know it is imposible to see what is happening from the trace and that it happens in apache - commons code but maybe somebody has seen this

Re: java.util.NoSuchElementException after stesstest

2006-08-03 Thread Armin Waibel
Hi Dennis, Dennis Bekkering wrote: Hello, After and while running a stresstest with a tool i get the following error. My code stops at PersistenceBrokerFactory.defaultPersistenceBroker(). I know it is imposible to see what is happening from the trace and that it happens in apache - commons

Re: java.util.NoSuchElementException after stesstest

2006-08-03 Thread Dennis Bekkering
Hello Armin, If you run stress tests on OJB please make sure that the maximal active PB instances setting and the maximal active connections setting in ConnectionFactory (see repository file connection-pool http://db.apache.org/ojb/docu/guides/repository.html#connection-pool-N10251 ) is

Re: java.util.NoSuchElementException after stesstest

2006-08-03 Thread Armin Waibel
Dennis Bekkering wrote: Hello Armin, If you run stress tests on OJB please make sure that the maximal active PB instances setting and the maximal active connections setting in ConnectionFactory (see repository file connection-pool

Re: java.util.NoSuchElementException after stesstest

2006-08-03 Thread Dennis Bekkering
Armin, You are right. I run a test with latest from SVN (OJB_1_0_RELEASE branch) with whenExhaustedAction=2 and it works as expected. Wrong OJB.properties file in your classpath? regards, Armin I actually dont use OJB.properties but repository-database.xml for pool settings. The

Re: java.util.NoSuchElementException after stesstest

2006-08-03 Thread Armin Waibel
Dennis Bekkering wrote: Armin, You are right. I run a test with latest from SVN (OJB_1_0_RELEASE branch) with whenExhaustedAction=2 and it works as expected. Wrong OJB.properties file in your classpath? regards, Armin I actually dont use OJB.properties but repository-database.xml for pool

Re: java.util.NoSuchElementException after stesstest

2006-08-03 Thread Dennis Bekkering
Within the connection-pool element you set the size of the connection-pool, in the OJB.properties file you set the size of the PB-pool (this is not the same). Thus you need both settings. It's obvious that the PB-pool size should always greater or equals to the connection-pool size. regards,

[Announce] Clepsydra 0.8

2006-08-03 Thread Jean-Yves Sironneau
I just wanted to let you know that the first release of Clepsydra a GPL licensed web application for managing and sharing a collection of documents (pictures centric) is out. This can be a sample of OJB usage (good or bad) as it's using OJB and ojb-xdoclet module for persistence. This is for me

Re: Finding Broker/Connection leak

2006-08-02 Thread Tino Schöllhorn
Dear Armin, thanks for your reply. I will try to integrate the finalize()-code in our PB. Is there somewhere a document of the history of changes of OJB 1.0.1 to the current released version? I'm asking because we are thinking of moving to the current version and I want to estimate the

Re: Finding Broker/Connection leak

2006-08-02 Thread Armin Waibel
Tino Schöllhorn wrote: Dear Armin, thanks for your reply. I will try to integrate the finalize()-code in our PB. Is there somewhere a document of the history of changes of OJB 1.0.1 to the current released version? I'm asking because we are thinking of moving to the current version and I

addLike questions

2006-08-01 Thread reda benzair
Hello everyone, I have a problem with like. my DataBase =Oracle Ojb= 1.0.3 I would like search on my table all file name start with number and i use *SQL LIKE* it works, but when I used the *AddLike(filename,'[0-9]%')* or *crit.addSql(AO.MDL_FILENAME LIKE '[0-9]%')*; do not work. What is

[Fwd: Info: Geänderte Mail-Adresse / C hanged email-Address]

2006-08-01 Thread Edson Carlos Ericksson Richter
Please, guys, kick off this guy from the list! Regards, Richter Mensagem original Assunto:Info: Geänderte Mail-Adresse / Changed email-Address Data: Tue, 1 Aug 2006 15:15:05 +0200 De: [EMAIL PROTECTED] Para: Edson Carlos Ericksson Richter [EMAIL PROTECTED]

Re: Finding Broker/Connection leak

2006-08-01 Thread Armin Waibel
Hi Tino, Tino Schöllhorn wrote: Hi, I have a situation where we are running out of PersistenceBrokers (using 1.0.1). We have a web application which so far runs fine - but somehow some requests are causing the application not to close its PB. We can see this when we are monitoring the used

Re: [Fwd: Info: Geänderte Mail-Adresse / Changed email-Address]

2006-08-01 Thread Armin Waibel
Hi, Edson Carlos Ericksson Richter wrote: Please, guys, kick off this guy from the list! I post to his new address a request to unsubscribe [EMAIL PROTECTED] from all apache lists. If this doesn't help I will ask the db-PMC/infrastructure-team to ban the address. regards, Armin

Re: o suitable Driver for jdbc

2006-07-31 Thread Armin Waibel
Hi Sergio, Sergio del Amo Caballero wrote: Hi Armin, Sorry for the delay answering but it is being difficult for me to go in internet during the summer. I tried downloading 5.x driver but still i am getting the same error. This is the error i am getting after using ant build setup-db -debug

Re: ORA-00932 inconsistent datatypes with CLOB

2006-07-31 Thread Armin Waibel
Hi Steve, [EMAIL PROTECTED] wrote: ... As an aside, it sure would be nice to be able to add new Platform implementations without having to put them into org.apache.ojb.broker.platforms. A simple solution would be something like this (in PlatformFactory): I agree with you. A more

Re: Ability to access primary key prior to Store of Object

2006-07-31 Thread Armin Waibel
Hi Gary, Gary Bartlett wrote: Greetings I am working on upgrading an application that was built using OJB 0.94 to release 1.0.4. I am running into some difficulties getting a primary key assigned for a newly created persistent object before the object is actually stored into the database.

OJB with JBossCache?

2006-07-31 Thread Steve_Clark
Are people using OJB with JBossCache? Or is the usual practice when deploying in JBoss to ignore that cache and add OSCache or JCS? Any preferences between the latter two? thanks, -steve Steve Clark ECOS Development Group [EMAIL PROTECTED] (970)226-9291

Finding Broker/Connection leak

2006-07-31 Thread Tino Schöllhorn
Hi, I have a situation where we are running out of PersistenceBrokers (using 1.0.1). We have a web application which so far runs fine - but somehow some requests are causing the application not to close its PB. We can see this when we are monitoring the used connections of mysql which are

Re: Finding Broker/Connection leak

2006-07-31 Thread Tino Schöllhorn
An additional question: How could I monitor the PB-Pool and the Connection-Pools of OJB? Tino Tino Schöllhorn wrote: Hi, I have a situation where we are running out of PersistenceBrokers (using 1.0.1). We have a web application which so far runs fine - but somehow some requests are causing

OJB hang

2006-07-31 Thread Feng Qiang
Hello everyone, I am using ojb 1.0.4 in weblogic 8.1.5 on HP unix, I use ojb to retrieve data from a database view. However, when record is few, the retrieve is OK. But if the record is bigger, ojb will hang. My retrieval is like this: ReportQueryByCriteria query =

Re: Ability to access primary key prior to Store of Object

2006-07-30 Thread Vasily Ivanov
Hi Gary, Have a look here: http://db.apache.org/ojb/docu/guides/basic-technique.html#Link+references Cheers, Vasily On 7/30/06, Gary Bartlett [EMAIL PROTECTED] wrote: Greetings I am working on upgrading an application that was built using OJB 0.94 to release 1.0.4. I am running into some

Re: o suitable Driver for jdbc

2006-07-29 Thread Sergio del Amo Caballero
Armin Waibel wrote: Hi Sergio, I never used the 3.x driver, but the 5.x driver works without any problems. Seems to be a classpath issue, if you run the ant task in debug mode (ant build -debug) do you get any other warnings or more detailed error message? regards, Armin Hi Armin, Sorry

Ability to access primary key prior to Store of Object

2006-07-29 Thread Gary Bartlett
Greetings I am working on upgrading an application that was built using OJB 0.94 to release 1.0.4. I am running into some difficulties getting a primary key assigned for a newly created persistent object before the object is actually stored into the database. Under 0.94 it seemed I could just

Re: ORA-00932 inconsistent datatypes with CLOB

2006-07-28 Thread Dennis Bekkering
Hello Steve, What does your criteria code look like? I have the same problem when applying like operation on a CLOB. I therefore changed the fieldtype to varchar2(4000). Cheers, Dennis

Re: ORA-00932 inconsistent datatypes with CLOB

2006-07-28 Thread Armin Waibel
Hi Steve, do you use a modified version of JdbcAccessImpl? The stack trace show line 327 in method 'executeQuery' as causer but this doesn't match with 1.0.4 version of this class (SNV: 365259) ... at

Re: ORA-00932 inconsistent datatypes with CLOB

2006-07-28 Thread Steve_Clark
I guess I had modified JdbcAccessImpl to add some print statements. I have solved the problem. Here's what was happening: I had code like this: crit.addGreaterThan(contains(clob_column, 'someval'), 0), because I needed to get SQL like this: contains(clob_column, 'someval') 0. When OJB

Re: in-direction table problem

2006-07-27 Thread Thomas Dudziak
On 7/26/06, Christopher Cheng [EMAIL PROTECTED] wrote: I have a problem with the indirection table mapping. class-descriptor class=com.example.Project table=Project collection-descriptor name=members element-class-ref=com.example.Member

ORA-00932 inconsistent datatypes with CLOB

2006-07-27 Thread Steve_Clark
I am using OJB 1.0.4, Persistence Broker, Oracle 10g, Oracle Text. I have a query which is using the Oracle Text contains() function to search in a CLOB. It is throwing ORA-00932: inconsistent datatypes: expected - got CLOB. If I replace the ?'s with appropriate values and do

Criteria.addSql() vs. attributes (not columns)

2006-07-26 Thread Steve_Clark
I am using PB in 1.0.4. I'm trying to call the Oracle Text contains() function in my query, so I want to end up with something like this: select ... from table1 A0, table2 A1 where ... and contains(A1.description, 'something', 1); The only way I can see to get there is by using addSql(), but

in-direction table problem

2006-07-26 Thread Christopher Cheng
I have a problem with the indirection table mapping. class-descriptor class=com.example.Project table=Project collection-descriptor name=members element-class-ref=com.example.Member orderby=memberId auto-retrieve=true

Re: mysql pool problem (again)

2006-07-25 Thread Armin Waibel
Hi Dennis, Dennis Bekkering wrote: Hello Tom, Hmm, I'm not too sure why you need this behavior, but I think you should definitely ask the DBCP guys over at the commons-user mailing list. I checked OJB.properties and I am using ConnectionFactoryPooledImpl.class . I kill the connections with

Re: mysql pool problem (again)

2006-07-25 Thread Dennis Bekkering
Hello Armin, I'm confused. How does this happen. OJB always use ConnectionFactory#lookupConnection to lookup connections and doesn't differ between transactional and non-transactional connections, thus the validation query is always performed. The only difference is the lifetime of the

Unique keys and OJB having trouble

2006-07-25 Thread Wright, Jim \(NIH/CIT\) [C]
I'm trying to update a row in a table which has a primary key, 4 unique keys (unique constraint) and a few more data fields. I have naturally one primary key specified for the table in my repository_user.xml file. When I store the row, I get a Unique restraint violation for the unique constraint

Re: mysql pool problem (again)

2006-07-24 Thread Dennis Bekkering
Hello Tom, Hmm, I'm not too sure why you need this behavior, but I think you should definitely ask the DBCP guys over at the commons-user mailing list. I checked OJB.properties and I am using ConnectionFactoryPooledImpl.class . I kill the connections with the mysql administrator tool,

Re: mysql pool problem (again)

2006-07-24 Thread Thomas Dudziak
On 7/24/06, Dennis Bekkering [EMAIL PROTECTED] wrote: I checked OJB.properties and I am using ConnectionFactoryPooledImpl.class . I kill the connections with the mysql administrator tool, simulating timed out connections. I discovered that the validation query is not called on non transactional

o suitable Driver for jdbc

2006-07-21 Thread Sergio del Amo Caballero
Hello, I wanted to use OJB for a web application. So, i went to the ojb site and follewed the getting started tutorial. Unfortunately i got stacked with a mysql driver issue. I try not to write here because i guess this is a common problem but i googled and try to look for the solution into

OJB and MsSQL problem inserting collection

2006-07-21 Thread Federico Scanu
Hi , i'm having a problem inserting object that contains a collection of other objects. I'm using OJB and a DB MsSQL Server 2000. The problem is that when i take look to the table content i can't see the right id of the container of this collection of contents, all containerOID are set to

mysql pool problem (again)

2006-07-21 Thread Dennis Bekkering
Hello all, I am experiecing problems with mysql regarding connection time outs again. This problem cannot be resolved by the pool settings provided or jdbc driver settings such as autoReconnect (wich should not be used anyhow). Here is a more detailed explaination about the problem (from tss). I

Jill Seaman is out of the office.

2006-07-21 Thread Jill Seaman
I will be out of the office starting 07/21/2006 and will not return until 07/31/2006. I will respond to your message when I return.

Can't generate primary key values for given Identity

2006-07-21 Thread ABOU LINA
Hi, i have an object that have two primary key. whene i try to make a search query using pk values as condition i got the message : Can't generate primary key values for given Identity i use ojb 1.0.3 thx in advance look in his mapping file : class-descriptor class

Re: mysql pool problem (again)

2006-07-21 Thread Thomas Dudziak
On 7/21/06, Dennis Bekkering [EMAIL PROTECTED] wrote: I am experiecing problems with mysql regarding connection time outs again. This problem cannot be resolved by the pool settings provided or jdbc driver settings such as autoReconnect (wich should not be used anyhow). Here is a more detailed

Re: Can't generate primary key values for given Identity

2006-07-21 Thread Armin Waibel
Hi, ABOU LINA wrote: Hi, i have an object that have two primary key. whene i try to make a search query using pk values as condition i got the message : Can't generate primary key values for given Identity Could you please post the source code (of your query) and the the stack trace of the

Re: o suitable Driver for jdbc

2006-07-21 Thread Armin Waibel
Hi Sergio, Sergio del Amo Caballero wrote: Hello, I wanted to use OJB for a web application. So, i went to the ojb site and follewed the getting started tutorial. Unfortunately i got stacked with a mysql driver issue. I try not to write here because i guess this is a common problem but i

Re: OJB and MsSQL problem inserting collection

2006-07-21 Thread Armin Waibel
Hi, Federico Scanu wrote: Hi , i'm having a problem inserting object that contains a collection of other objects. I'm using OJB and a DB MsSQL Server 2000. The problem is that when i take look to the table content i can't see the right id of the container of this collection of contents, all

ERROR: Error while iterate ResultSet for query , Error setting field

2006-07-18 Thread ABOU LINA
Hi, i got this error using db-ojb-1.0.rc5.jar. thx in advance. in the mapping file : class =stat.module.diffusion.donnees.BenefDirect table =diff.BENEF field-descriptor id=1 name=code column=CODE jdbc-type=INTEGER primarykey=true / - in the table database

Re: ERROR: Error while iterate ResultSet for query , Error setting field

2006-07-18 Thread Thomas Dudziak
On 7/18/06, ABOU LINA [EMAIL PROTECTED] wrote: Hi, i got this error using db-ojb-1.0.rc5.jar. thx in advance. [PersistentField] ERROR: while set field: object class[ stat.module.diffusion.donnees.BenefDirect target field: code target field type: class java.lang.Integer object value class:

Re: Inheritance and foreign keys

2006-07-13 Thread Vincent Frison
Le mercredi 2006 juillet 12 18:22, Vincent Frison a écrit : Hi all, I have a class A referencing another class B. My code (and database) works fine for a long time but now I have to do some major changes to my app: class A must reference class B OR class C. These two classes should share the

Re: Inheritance and foreign keys

2006-07-13 Thread Vincent Frison
Le jeudi 2006 juillet 13 18:12, Thomas Dudziak a écrit : Hi Vincent, the main problem that you have is that you cannot define a foreign key that references TableA OR TableB. That's my problem. It doesn't seem very exotic.. Basically if you want to have database foreign keys (and if your OJB

Inheritance and foreign keys

2006-07-12 Thread Vincent Frison
Hi all, I have a class A referencing another class B. My code (and database) works fine for a long time but now I have to do some major changes to my app: class A must reference class B OR class C. These two classes should share the same interface (or inherit from the same abstract class) but

Re: ODMG in 1.0.4

2006-07-07 Thread Armin Waibel
Hi Jose, I reviewed your example and now I'm confused. You define the relation between A and B as 1:n, but in metadata descriptor you set the PK of B as FK in 1:n relation collection-descriptor name=items element-class-ref=pruojb.B auto-retrieve=true auto-update=false auto-delete=false

Re: ODMG in 1.0.4

2006-07-07 Thread Jose Maria
Armin Waibel escribió: Hi Jose, I reviewed your example and now I'm confused. You define the relation between A and B as 1:n, but in metadata descriptor you set the PK of B as FK in 1:n relation collection-descriptor name=items element-class-ref=pruojb.B auto-retrieve=true

Re: ODMG in 1.0.4

2006-07-07 Thread Armin Waibel
Jose Maria wrote: If this doesn't solve your problem, please let me know (then I will try to reproduce your problem with a test-case). I've done that. Setting auto-update/delete to 'none'. But it still fails. I setup a local test case using the classes and mapping from your first post. When

Re: ODMG in 1.0.4

2006-07-07 Thread Jose Maria
Armin Waibel escribió: Jose Maria wrote: If this doesn't solve your problem, please let me know (then I will try to reproduce your problem with a test-case). I've done that. Setting auto-update/delete to 'none'. But it still fails. I setup a local test case using the classes and mapping

Re: Bug : duplicate objects in resultset [new patch]

2006-07-07 Thread Jakob Braeuchi
hi roger, thanks for the new patch. i'll check it asap. i googled a little bit for ORDER BY item should be in the SELECT DISTINCT list and i found some posts about the same problem in sql-server and oracle. http://www.codecomments.com/archive352-2005-12-731772.html

Re: Xdoclet proxy values

2006-07-06 Thread Bruno CROS
Done On 7/6/06, Thomas Dudziak [EMAIL PROTECTED] wrote: On 7/5/06, Bruno CROS [EMAIL PROTECTED] wrote: I noticed that the proxy keyword can't accept dynamic value. dynamic is an accepted value in repository file and seems to be different of true. On my setup, dynamic values works fine

ODMG in 1.0.4

2006-07-06 Thread Jose Maria
Hi. I've recently updated from OJB 1.0.3 to 1.0.4 and I'm having with the ODMG API. What worked in 1.0.3 now doesn't. It seems to be a change in the states classes, but I'm not sure. In short, the problem could be explained with a simple example. We have two classes A and B, related 0:N. If I

Re: ODMG in 1.0.4

2006-07-06 Thread Armin Waibel
Hi Jose, since version 1.0.2 the mandatory auto-update/delete settings are 'none' snip release-notes 1.0.2 - odmg-api: ** All relations (1:1, 1:n and m:n) need auto-update/delete setting 'none' to proper work.** /snip In 1.0.4 we introduce cascading delete for auto-delete, please see

Re: Read connection repository file at runtime

2006-07-06 Thread Armin Waibel
Hi Steve, Steve Vangasse wrote: I'm trying to load a connection repository xml file at runtime using MetadataManager.readConnectionRepository method. The problem is that the xml file is inside a jar. Passing readConnectionRepository the file name causes it to look inside the filesystem

Re: ODMG in 1.0.4

2006-07-06 Thread Jose Maria
Armin Waibel escribió: Hi Jose, since version 1.0.2 the mandatory auto-update/delete settings are 'none' snip release-notes 1.0.2 - odmg-api: ** All relations (1:1, 1:n and m:n) need auto-update/delete setting 'none' to proper work.** /snip In 1.0.4 we introduce cascading delete for

Re: OJB/Oracle/BLOBs + Consider using Oracle9i as OJB platform error

2006-07-06 Thread Vasily Ivanov
I've just solved this problem by changing platform=Oracle to platform=Oracle9i in our jdbc-connection-descriptors It even works with Oracle 9 thin driver, no need to upgrade to 10g driver. Thanks, Vasily On 7/7/06, Vasily Ivanov [EMAIL PROTECTED] wrote: Hi all, We are using OJB 1.0.3 with

Xdoclet proxy values

2006-07-05 Thread Bruno CROS
Hi all, I noticed that the proxy keyword can't accept dynamic value. dynamic is an accepted value in repository file and seems to be different of true. On my setup, dynamic values works fine with CGLib proxies and, proxy=true seems to not... Does someone can confirm this? if it's a

Re: Xdoclet proxy values

2006-07-05 Thread Konstantin Priblouda
--- Bruno CROS [EMAIL PROTECTED] wrote: Hi all, I noticed that the proxy keyword can't accept dynamic value. dynamic is an accepted value in repository file and seems to be different of true. On my setup, dynamic values works fine with CGLib proxies and, proxy=true seems to

Configurable SQL Statement generation

2006-07-05 Thread Guido Beutler
Hi, I would like to generate to generate SQL select statements for DB2 in a managed environment (JBoss). All Select Statements should be extended by for read only. I found that it is possible to hardcode this at org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement at buildStatement()

Configurable SQL Statement generation

2006-07-05 Thread Guido Beutler
Hi, I would like to generate to generate SQL select statements for DB2 in a managed environment (JBoss). All Select Statements should be extended by for read only. I found that it is possible to hardcode this at org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement at

Re: Xdoclet proxy values

2006-07-05 Thread Thomas Dudziak
On 7/5/06, Bruno CROS [EMAIL PROTECTED] wrote: I noticed that the proxy keyword can't accept dynamic value. dynamic is an accepted value in repository file and seems to be different of true. On my setup, dynamic values works fine with CGLib proxies and, proxy=true seems to not... Does

Read connection repository file at runtime

2006-07-02 Thread Steve Vangasse
I'm trying to load a connection repository xml file at runtime using MetadataManager.readConnectionRepository method. The problem is that the xml file is inside a jar. Passing readConnectionRepository the file name causes it to look inside the filesystem relative to the application (in this

obj persis broker error / axis

2006-06-30 Thread Enrico Silterra
I am implementing a soap service to access some data maintained by another servlet within tomcat. OJB is configured into that servlet and works fine. I am trying to add ojb into my soap service - so this is all happening within the axis servlet. I have placed the OJB.properties file in the

Re: obj persis broker error / axis

2006-06-30 Thread Thomas Dudziak
On 6/30/06, Enrico Silterra [EMAIL PROTECTED] wrote: I am implementing a soap service to access some data maintained by another servlet within tomcat. OJB is configured into that servlet and works fine. I am trying to add ojb into my soap service - so this is all happening within the axis

OJB, MySQL and Query Cache

2006-06-28 Thread Tino Schöllhorn
Hi, probable this isn't the correct forum - but nevertheless I hope that some can help me out. We are using OJB 1.0.1 (we're waiting for a new release to change to) and MySQL 5.0.18. Everything is working fine and OJB works like a charm. Now our sites are getting more traffic and we wanted

Re: OJB, MySQL and Query Cache

2006-06-28 Thread Tino Schöllhorn
Hi, I solved it, so no need to answer ;-) Be aware when changing the mysql-connector to the 3.1.x line. This driver changes the standard behaviour of the server side cached statements. This in turn disables the query cache. If you change to this connector and want to use the query cache use

Re: Why do queries for Identity retrieve all columns?

2006-06-27 Thread Steve_Clark
Ok, I guess I was living in the past - OJB used to do these as two separate queries (get PKs, then retrieve matched objects). Didn't realize that it was now working as you describe (good news). I have rewritten my code to use a subquery and thus get the best of both worlds - I can apply

Why do queries for Identity retrieve all columns?

2006-06-26 Thread Steve_Clark
I have always wondered about this, but now I am encountering a serious performance problem which results from this policy. When executing a Query, OJB generates two different rounds of SQL. The first round is used just to determine the Identity of any matching objects. These Identities are

Re: Why do queries for Identity retrieve all columns?

2006-06-26 Thread Armin Waibel
Hi Steve, which version of OJB do you use? Do you use Identity xyz = broker.serviceIdentity().buildIdentity(Article.class, new Integer(7)); Collection col = broker.getObjectByIdentity(xyz) or a QueryByIdentity object? regards, Armin [EMAIL PROTECTED] wrote: I have always wondered about

Re: Why do queries for Identity retrieve all columns?

2006-06-26 Thread Steve_Clark
Armin, I'm using 1.0.4. I am not doing a QueryByIdentity. I am doing a QueryByCriteria. So when I do: QueryByCriteria query = QueryFactory.newQuery(Article.class, criteria, true); broker.getCollectionByQuery(query); my expectation would be that the SQL generated would be:

Re: Why do queries for Identity retrieve all columns?

2006-06-26 Thread Armin Waibel
[EMAIL PROTECTED] wrote: Armin, I'm using 1.0.4. I am not doing a QueryByIdentity. I am doing a QueryByCriteria. So when I do: QueryByCriteria query = QueryFactory.newQuery(Article.class, criteria, true); broker.getCollectionByQuery(query); my expectation would be that

hashCode for Query-Objects

2006-06-24 Thread Tino Schöllhorn
Hi, I have to put OJB-Query-Objects as key in a Map. Now I wonder how I would compute the hashCode of those objects. A first idea was to use the generated SQL-Code for such a Query as the key. How would I get the SQL-Code which gets generated for a Query-Object? But any other ideas how to

Re: ArrayIndexOutOfBoundsException

2006-06-24 Thread Jay Sissom
Thanks for your help. I'm glad this update will be in 1.0.5. Jay On 6/23/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi Eric, Westfall, Eric Curtis wrote: Here is a JIRA issue which describes the problem and the fix along with the fixed version of PersistenceBrokerAbstractImpl attached.

Re: Is It Possible Add Joins To QueryByCriteria?

2006-06-23 Thread Danilo Tommasina
Heya, I found a way to inject that new feature in OJB, however it required a bit of hacking using reflection to remove access restriction to a private method in SqlQueryStatement class :( I'll probably do a custom build of OJB with that one method set to 'protected' instead of 'private', to

Re: Bug : duplicate objects in resultset : Modify RsIterator class?

2006-06-23 Thread Jakob Braeuchi
hi roger, i ran this new testcase in QueryTest: /** * test OrderBy joined column. Read all Projects */ public void testOrderByJoined2() { Criteria crit = new Criteria(); QueryByCriteria q = QueryFactory.newQuery(Project.class, crit, true);

RE: Bug : duplicate objects in resultset : Modify RsIterator class?

2006-06-22 Thread Janssen, Roger
Hi, If that is the case (I do not get this result with the OJB testsuite and my patch and testcase, or don't you guys use hsql anymore for the tests?), then probably some modification has to be made to RsIterator class. The next and hasNext methods must make sure that you do NOT get a duplicate

Re: ArrayIndexOutOfBoundsException

2006-06-22 Thread Armin Waibel
Hi Jay, Jay Sissom wrote: Hello, I am using OJB 1.0.4 and Spring 1.2.8. A spring interceptor is handling transactions for me. All my OJB code is written using the Spring PersistenceBrokerDaoSupport class. I have a long running process that does quite a bit of data manipulation. It is a

Re: ArrayIndexOutOfBoundsException

2006-06-22 Thread Jay Sissom
Unfortunately, I don't have a simple, repeatable test case right now. This happens on a long running process and is related to the GC. We took the code in CVS mentioned in your email and tried it, but it didn't solve the problem. We added some synchronizing to it and that did solve it. This

RE: ArrayIndexOutOfBoundsException

2006-06-22 Thread Westfall, Eric Curtis
Here is a JIRA issue which describes the problem and the fix along with the fixed version of PersistenceBrokerAbstractImpl attached. http://issues.apache.org/jira/browse/OJB-114 It seems like if there was a way to get rid of the use of the finalize() method in this context that would be a

Is It Possible Add Joins To QueryByCriteria?

2006-06-21 Thread Danilo Tommasina
Hello, We are having following problem: Table TEMP { attr1, attr2, attr3 } Table A { attr1 (...) } Table B { attr1 (...) } Table C { attr1 (...) } There are no foreign key contraints between TEMP and the A,B,C tables however 'attr1' in all tables refer to the same 'logical

RE: Is It Possible Add Joins To QueryByCriteria?

2006-06-21 Thread Charles Anthony
Hi, I'm afraid the answer is simply no. Joins in OJB queries can only be done by using the references defined in the metadata. My suggestion would be to dynamically add/remove the class metadata for A/B/C at runtime (or indeed permanently) with references to TEMP. The TEMP entity should not be

Re: Is It Possible Add Joins To QueryByCriteria?

2006-06-21 Thread Danilo Tommasina
Hi, I was fearing that this was the answer. Currently I am going trough the OJB code to find out if it is possible to inject a join somewhere in the statement building process. If that does not work I'll try out the dynamic metadata changes. *sigh* thanks anyways. Danilo Hi, I'm afraid the

Re: Bug : duplicate objects in resultset : Why add orderby columns to resultset?

2006-06-21 Thread Jakob Braeuchi
hi all, this is what hsql says when the orderby column is not in the select :( Caused by: java.sql.SQLException: ORDER BY item should be in the SELECT DISTINCT list: [EMAIL PROTECTED] in statement [SELECT DISTINCT A0.ID,A0.TITLE,A0.DESCRIPTION FROM PROJECT A0 INNER JOIN PERSON_PROJECT A1 ON

ArrayIndexOutOfBoundsException

2006-06-21 Thread Jay Sissom
Hello, I am using OJB 1.0.4 and Spring 1.2.8. A spring interceptor is handling transactions for me. All my OJB code is written using the Spring PersistenceBrokerDaoSupport class. I have a long running process that does quite a bit of data manipulation. It is a single threaded app that starts

oracle id in m:n tables

2006-06-19 Thread Dennis Bekkering
Hello All, When i add a record to a collection that is of type many 2 many the following sql is executed INSERT INTO m2m_196 (ruleValueListId,ruleValueId) VALUES (?,?) , the id field is not specified in the query but the table has such a field and therefore oracle complains about the fact that

RE: Bug : duplicate objects in resultset

2006-06-19 Thread Janssen, Roger
Hi, You're solution only seems to filter out the duplicates based on hashmap logic, this of course only works when the method hashCode() has properly been implemented. [And... does this suggested solution support the paging (pagination) implementation?] But more critical since the resultset

Re: oracle id in m:n tables

2006-06-19 Thread Thomas Dudziak
On 6/19/06, Dennis Bekkering [EMAIL PROTECTED] wrote: When i add a record to a collection that is of type many 2 many the following sql is executed INSERT INTO m2m_196 (ruleValueListId,ruleValueId) VALUES (?,?) , the id field is not specified in the query but the table has such a field and

Re: oracle id in m:n tables

2006-06-19 Thread Dennis Bekkering
Thanks for the link Tom, that information was exactly what i was looking for. 2006/6/19, Thomas Dudziak [EMAIL PROTECTED]: On 6/19/06, Dennis Bekkering [EMAIL PROTECTED] wrote: When i add a record to a collection that is of type many 2 many the following sql is executed INSERT INTO

RE: Bug : duplicate objects in resultset : Why add orderby columns to resultset?

2006-06-19 Thread Janssen, Roger
Hi, I found the following in OJB code: For Version 1.0.4: In class SqlSelectStatement in method protected String buildStatement(): orderByFields = query.getOrderBy(); columnList = ensureColumns(orderByFields, columnList, stmt); For Version 1.0 RC6 (which we are still using...

RE: Bug : duplicate objects in resultset : Why add orderby columns to resultset?

2006-06-19 Thread Janssen, Roger
Hi, Diving deeper into the OJB code I see that the ensureColumns method in fact does two things: (1) add the columns to the returnable set of columns in the resultset (2) adds the columns to a list of columns to be used in force a join (2) is okay for orderby's, but (1) is not. If for orderby's

Re: Bug : duplicate objects in resultset : Why add orderby columns to resultset?

2006-06-19 Thread Thomas Dudziak
On 6/19/06, Janssen, Roger [EMAIL PROTECTED] wrote: Diving deeper into the OJB code I see that the ensureColumns method in fact does two things: (1) add the columns to the returnable set of columns in the resultset (2) adds the columns to a list of columns to be used in force a join (2) is

RE: Bug : duplicate objects in resultset : Why add orderby column s to resultset?

2006-06-19 Thread Charles Anthony
-Original Message- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: 19 June 2006 22:26 Subject: Re: Bug : duplicate objects in resultset : Why add orderby columns to resultset? On 6/19/06, Janssen, Roger [EMAIL PROTECTED] wrote: Diving deeper into the OJB code I see that

How to do this in OJB

2006-06-18 Thread k jee
Hi All, I need some advice on how to achieve the following with ojb. Select T1.FLD1,T1.FLD2, T2.FLD2,T2.FLD3,T3.FLD1,T3.FLD2,T3.FLD4 from table1 T1, table2 T2, Table3 T3,Table4 T4 where (T4.key1=XYZ) and(T3.somefield in (A,B)) and ( (T4.FLD3 = T1.FLD3) and (T4.FLD3 =T2.FLD3) and

Re: How to do this in OJB

2006-06-18 Thread Tino Schöllhorn
Hi, I think you could do a ReportQuery where you can specify an SQL. Just look in the tutorials and the JavaDocs. Tino k jee wrote: Hi All, I need some advice on how to achieve the following with ojb. Select T1.FLD1,T1.FLD2, T2.FLD2,T2.FLD3,T3.FLD1,T3.FLD2,T3.FLD4 from table1 T1,

<    4   5   6   7   8   9   10   11   12   13   >