NullPointerException in SqlQueryStatement OJB 1.0.3

2005-12-12 Thread Andy Malakov
Hello All, When org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.TableAlias is used for abstract class (has extent classes declared, but not mapped to any table itself) it may initialized with tableName=null. This situation later produces a problem, because tableName is being used for

RE: Oracle OJB error

2005-12-12 Thread Ferrer, Eric
There is no Oracle error in the stack track or in the spy.log. -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Saturday, December 10, 2005 3:45 AM To: OJB Users List Subject: Re: Oracle OJB error hi eric, i'm looking for the sql exception with an oracle error,

Re: Oracle OJB error

2005-12-12 Thread Armin Waibel
Hi Eric, Ferrer, Eric wrote: There is no Oracle error in the stack track or in the spy.log. seems this is caused by oracle 10g driver Caused by: java.sql.SQLException: Attempt to set Escape Processing after SQL is already processed Please try to use Oracle9i platform settings in your

Re: NullPointerException in SqlQueryStatement OJB 1.0.3

2005-12-12 Thread Armin Waibel
Hi Andy, Andy Malakov wrote: Hello All, When org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.TableAlias is used for abstract class (has extent classes declared, but not mapped to any table itself) it may initialized with tableName=null. This situation later produces a problem,

Re: NullPointerException in SqlQueryStatement OJB 1.0.3

2005-12-12 Thread Andy Malakov
Hello Armin, Thanks for quick reply. Unfortunately problem remains in OJB_1_0_RELEASE. Please look at SqlQueryStatement [line 128]: m_root = createTableAlias(m_baseCld, hints=null, path=); When above line is called for abstract class descriptor (the one that has extent, but not mapped to a

Re: NullPointerException in SqlQueryStatement OJB 1.0.3

2005-12-12 Thread Armin Waibel
Hi Andy, Andy Malakov wrote: Hello Armin, Thanks for quick reply. Unfortunately problem remains in OJB_1_0_RELEASE. I will add a test for this bug, how can we reproduce the NPE, how does the query look like? regards, Armin Please look at SqlQueryStatement [line 128]: m_root =

New release for an Eclipse plugin producing files for OJB

2005-12-12 Thread Hale India
Hi Just a smal word to present our Eclipse plugin for database and Ojb. http://sourceforge.net/project/showfiles.php?group_id=106057 It is the second release news : Produce repository, mapping and Java files (New namer base on torque namer) Enable to create/edit tables and fields. Produce

Re: Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-11 Thread Ilkka Priha
http://cvs.apache.org/viewcvs.cgi/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryIF.java?rev=1.4.2.2only_with_tag=OJB_1_0_RELEASEview=markup -- Ilkka Rick Roman wrote: Sorry to be dense but can you send me the link to cvs for revision 1.4.2.2 of PersistenceBrokerFactoryIF?

Using composite foreign keys in 1:N relationship

2005-12-11 Thread Aleks
Hi, I'm new to OJB and have been looking at the tutorials and examples and so far all looks good apart from an example I found that works well but I am not sure how it would work in the case of composite keys. The example is the 1:N example between Product and Article tables.

Re: Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-11 Thread Armin Waibel
Hi Rick, Rick Roman wrote: Sorry to be dense but can you send me the link to cvs for revision 1.4.2.2 of PersistenceBrokerFactoryIF? I'm having trouble locating it. Think this will not work, because the changes will affect other classes too.

Re: Using composite foreign keys in 1:N relationship

2005-12-11 Thread Armin Waibel
Hi, Aleks wrote: Hi, I'm new to OJB and have been looking at the tutorials and examples and so far all looks good apart from an example I found that works well but I am not sure how it would work in the case of composite keys. The example is the 1:N example between Product and Article

Re: Oracle OJB error

2005-12-10 Thread Jakob Braeuchi
hi eric, i'm looking for the sql exception with an oracle error, something like ORA-. jakob Ferrer, Eric schrieb: Here it is Jakob, DEBUG - OJB: TableAlias(): using hints ? false,null,,swav,123,2005-12-09 14:42:51.649 DEBUG - OJB: SQL:SELECT

Re: Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-10 Thread Rick Roman
Hi Ilkka, shutdown() does not appear to be a method of PersistenceBrokerFactoryFactory.instance(). Is there a patch with this available? Ilkka Priha wrote: Hi Rick, Have you tried this one, it alone should do the job. PersistenceBrokerFactoryFactory.instance().shutdown(); -- Ilkka

Re: Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-10 Thread Ilkka Priha
Rick, It was introduced in revision 1.4.2.2 of PersistenceBrokerFactoryIF (25/07/05), so it's available only in the cvs version of OJB, but hopefully quite soon also as 1.0.4-rc. -- Ilkka /** * Shutdown method for OJB, kills all running processes within OJB - after * shutdown OJB can no

Re: Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-10 Thread Rick Roman
Sorry to be dense but can you send me the link to cvs for revision 1.4.2.2 of PersistenceBrokerFactoryIF? I'm having trouble locating it. Ilkka Priha wrote: Rick, It was introduced in revision 1.4.2.2 of PersistenceBrokerFactoryIF (25/07/05), so it's available only in the cvs version of

Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-09 Thread Rick Roman
I am using OBJ to access PostgreSQL via a JNDI datasource. My problem is that every time I reload my application context, I get a big jump in Tomcat Perm Gen memory. After a several reloads, tomcat eventually crashes with an out of memory error. I believe this has to do with my OBJ

Re: Oracle OJB error

2005-12-09 Thread Jakob Braeuchi
hi eric, the error is caused by stmt.setEscapeProcessing(true) in the paltform: public void afterStatementCreate(Statement stmt) throws PlatformException { try { stmt.setEscapeProcessing(true); } catch (SQLException e) { throw

RE: Oracle OJB error

2005-12-09 Thread Ferrer, Eric
Hi Jakob, OJB is the persistence layer used throughout the project. I can create a test connecting to Oracle directly and see what happens. I am currently creating a SQL Server instance and seeing if I get similar results from OJB. Could it be the OraclePlatform implementation in OJB that is

Re: Oracle OJB error

2005-12-09 Thread Jakob Braeuchi
hi eric, i do not have an oracle installation here so i can only guess. but afaik ojb only sets the escapeProcessing. btw could you please post the oracle sql exception ? jakob Ferrer, Eric schrieb: Hi Jakob, OJB is the persistence layer used throughout the project. I can create a test

RE: Oracle OJB error

2005-12-09 Thread Ferrer, Eric
Here it is Jakob, DEBUG - OJB: TableAlias(): using hints ? false,null,,swav,123,2005-12-09 14:42:51.649 DEBUG - OJB: SQL:SELECT A0.MODIFY_DTIME,A0.PARAMETER_NAME,A0.SYSTEM_ID,A0.DATA_TAG,A0.MODIFY_USE R,A0.CREATE_DTIME,A0.CREATE_USER,A0.PARAMETER_VALUE,A0.DESCRIPTION,A0.SY

Re: Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-09 Thread Rick Roman
Update: From other threads, I have tried using a contextDestroy listener to run: PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker(); broker.clearCache(); broker.close(); PersistenceBrokerFactory.releaseAllInstances();

Re: Tomcat 5, JNDI, Perm Gen Memory leak

2005-12-09 Thread Ilkka Priha
Hi Rick, Have you tried this one, it alone should do the job. PersistenceBrokerFactoryFactory.instance().shutdown(); -- Ilkka Rick Roman wrote: Update: From other threads, I have tried using a contextDestroy listener to run: PersistenceBroker broker =

OJB CLOB Support

2005-12-08 Thread Vamsi Atluri
Hello all, In our application we use OJBs extensively. However, we have a CLOB field that needs to be populated within the application. I was trying to find documentation about OJB's support for *LOB objects at this link: http://db.apache.org/ojb/docu/howtos/howto-use-lobs.html However, all I

Re: Class Hints

2005-12-08 Thread Jakob Braeuchi
hi chris, please post the sql with and without the hints. jakob Chris Worley schrieb: Actually I don't think this problem is directly related to class hints. In a previous thread Armin mentioned to me that there was a but that will be fixed in the next released previouse email from

Re: Class Hints

2005-12-08 Thread Chris Worley
Jakob, -- with hints and extents defined for CContactMech Integer partyId = (Integer) getParameter(partyId); Criteria crit = new Criteria(); crit.addEqualTo(partyId, partyId); crit.addPathClass(contactMech, CPhoneNumber.class); Criteria critAddress = new Criteria();

Re: Class Hints

2005-12-08 Thread Jakob Braeuchi
hi chris, adding a path class makes only sense when you hava a path in your query. ie: crit.addEqualTo(contactMech.something, on other thing); crit.addPathClass(contactMech, CPhoneNumber.class); jakob Chris Worley schrieb: Jakob, -- with hints and extents defined for CContactMech Integer

Re: Class Hints

2005-12-08 Thread Chris Worley
Jakob, Ok, I miss understood its purpose. I wanted and instance of PhoneNumber or PostalAddress, I guess it goes back to the bug Armin mentioned. I have modified my code to loop through the results and query for the appropriate table and set it in PartyContactMech. Thanks for the

Oracle OJB error

2005-12-08 Thread Ferrer, Eric
We recently started getting a weird error with OJB and we are trying to find out if its an Oracle specific issue or an OJB issue that would happen cross databases. We get from our logs OJB: Create new DBCP connection pool:[EMAIL PROTECTED] jcd-alias=SECURITY default-connection=false

Re: IllegalAccess When Setting Field

2005-12-07 Thread Chris Worley
After doing some testing. I am finding that sometimes I get the exception, sometimes it works and sometimes the contactMech is populated with an instance of CPhoneNumber (which is what i want) and sometimes it just populates with CContactMech. CPhoneNumber extends CContactMech. I have

Re: IllegalAccess When Setting Field

2005-12-07 Thread Chris Worley
I have now removed proxy=dynamic from all my class descriptors and I no longer get the exception. After doing some testing. I am finding that sometimes I get the exception, sometimes it works and sometimes the contactMech is populated with an instance of CPhoneNumber (which is what i

Re: IllegalAccess When Setting Field

2005-12-07 Thread Armin Waibel
Hi Chris, which version of OJB do you use? Normally OJB will generate a more detailed error log when field setting fails. Caused by: org.apache.ojb.broker.metadata.MetadataException: IllegalAccess error setting field:contactMech in object:net.enterprise.common.model.party.CPartyContactMech

Re: IllegalAccess When Setting Field

2005-12-07 Thread Chris Worley
Armin, Here is the complete output at the time the service is invoked. For this I have set all proxies back to dynamic in the class descriptors. If I comment out the reference to the contactMech the party reference gets populated just fine. I am not sure what the deail is with the

Re: IllegalAccess When Setting Field

2005-12-07 Thread Chris Worley
Armin, My ojb version is 1.0.3. -chris worley Armin, Here is the complete output at the time the service is invoked. For this I have set all proxies back to dynamic in the class descriptors. If I comment out the reference to the contactMech the party reference gets populated just fine.

Re: IllegalAccess When Setting Field

2005-12-07 Thread Armin Waibel
Hi, ok, now we have a more detailed error message: [PersistentField] ERROR: while set field: [try to set 'object value' in 'target object' target obj class: net.enterprise.common.model.party.CPartyContactMech target field name: contactMech target field type: class

Re: IllegalAccess When Setting Field

2005-12-07 Thread Chris Worley
Armin, I removed the dynamic proxy from the class descriptors and every thing works fine. I have not studied them enough to undertand how to handle them. -chris worley Hi, ok, now we have a more detailed error message: [PersistentField] ERROR: while set field: [try to set 'object value'

Re: IllegalAccess When Setting Field

2005-12-07 Thread Armin Waibel
Chris Worley wrote: Armin, I removed the dynamic proxy from the class descriptors and every thing works fine. I have not studied them enough to undertand how to handle them. In the upcoming 1.0.4 release it will be possible to use proxy handler classes based on cglib(enabled via

Class Hints

2005-12-07 Thread Chris Worley
I am having a problem with class hints. They do not seem to work all the time with my configuration. If the PartyContactMech object is stored in the same instance of the server process that I retreive it in PartyContactMech.contactMech is populated with an instance of CPhoneNumber or

Re: Class Hints

2005-12-07 Thread Chris Worley
Actually I don't think this problem is directly related to class hints. In a previous thread Armin mentioned to me that there was a but that will be fixed in the next released previouse email from Armin: In the next version of OJB this will be fixed (or try the OJB_1_0_RELEASE branch

IllegalAccess When Setting Field

2005-12-06 Thread Chris Worley
I get and IllegalAccess exception when ojb tries to populate a reference to another object. I have no problems storing the object. The exception is attached and below is my code and mapping. - Code Integer partyId = (Integer) getParameter(partyId); Criteria crit = new

Forgein Key Not Set

2005-12-05 Thread Chris Worley
I have a problem where the forgein key ids are not set in the object or db after the forgein object has been created. TABLE_A -A_ID TABLE_B -B_ID -A_ID In the mappings tableB has a reference descriptor for tableA TableA tableA = new TableA(); TableB tableB = new TableB();

Re: Forgein Key Not Set

2005-12-05 Thread Chris Worley
geez... sometimes when you stare at xml to long the its hard to find the simplest mistakes. I did not have the foreignkey tag in my reference descriptor. problem solved -chris worley I have a problem where the forgein key ids are not set in the object or db after the forgein object has

How to execute code before persisting an object

2005-12-05 Thread Christopher C. Worley
I would like to perform operations on an object before the object is persisted. One thing I would like to do is set a transactionDate field. I want the field to be set on the server side so all records can be set to the same date. What I mean by that is I do not want to set the date as the

Re: How to execute code before persisting an object

2005-12-05 Thread Thomas Dudziak
On 12/5/05, Christopher C. Worley [EMAIL PROTECTED] wrote: I would like to perform operations on an object before the object is persisted. One thing I would like to do is set a transactionDate field. I want the field to be set on the server side so all records can be set to the same date.

Re: How to execute code before persisting an object

2005-12-05 Thread Christopher C. Worley
Thomas, Thanks. The PersistenceBrokerAware interface will work. While a service request is handled by the server I want all dates such as transaction_date, inovoice_date, completed_date, ... to all be set to to the time the request was received by the server. -chris worley On 12/5/05,

Can OJB Be Built w/GCJ 3.3.x?

2005-12-01 Thread Craig A. Vanderborgh
Hello, We need to build OJB using gcj 3.3.2 for an embedded system. Is it possible? What experiences have people had using OJB w/gcj 3.3.x? We'd like to know... Thanks in advance, craig vanderborgh voxware incorporated -

OJB 1.0.3 Caching issues

2005-12-01 Thread Ravi
Hello ! We are using OJB 1.0.3 with following cache settings on Oracle database. object-cache class=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl attribute attribute-name=cacheExcludes attribute-value=/ attribute attribute-name=timeout attribute-value=900/

Re: OJB 1.0.3 Caching issues

2005-12-01 Thread Danilo Tommasina
Hi, I am not sure if it is the same problem, however we had something similar some time ago. The problem was caused by the cache timeout. Imagine this situation: CustomObject1 (not a persistent object) has a reference to an instance of ex. PersistentObject.class with primary key = 1, let us

Re: Can OJB Be Built w/GCJ 3.3.x?

2005-12-01 Thread Thomas Dudziak
On 12/1/05, Craig A. Vanderborgh [EMAIL PROTECTED] wrote: We need to build OJB using gcj 3.3.2 for an embedded system. Is it possible? What experiences have people had using OJB w/gcj 3.3.x? Never tried it, but I think with the newer gcj versions this should be doable. You should check

Persisting a HashMap of objects with composite primary keys

2005-12-01 Thread Laran Evans
How would I persist class A below? C and D have a composite primary key in the database. The primary key for C is innermostOneKey and referenceToOutermostKey. The primary key for D is innermostOneKey and referenceToOutermostKey. My understanding is that with ManageableHashMap, when loading from

Re: repository entries

2005-11-30 Thread Hans Novak
Armin Waibel schrieb: i want to change dynamicly the location of the database Server, what is describe in repository.xml you can find some suggestion about metadata handling here http://db.apache.org/ojb/docu/guides/metadata.html Hi, first, thanks for your answer. I have try some things

repository entries

2005-11-29 Thread Hans Novak
Hi, i want to change dynamicly the location of the database Server, what is describe in repository.xml Is it possible, to read the defaults from the repository.xml and then, if is neccesery change the value temporary to another location ? I dont want to overwrite the repository.xml file. My

Re: Problem with interface

2005-11-29 Thread Thomas Dudziak
On 11/28/05, Joose Vettenranta [EMAIL PROTECTED] wrote: I have like this: public class A implements Foo { private Integer id; ... getter/setter.. } public class B implements Foo { private Integer id; ... getter/setter.. } public interface Foo { public Integer

Re: Problem with interface

2005-11-29 Thread Joose Vettenranta
Thomas Dudziak kirjoitti 29.11.2005 kello 14:32: Can I fix this somehow or do I have to use global unique id as primary key? This depends on how you mapped these types. Please post your repository xml file. Well, I solved problem already.. I renamed current unique id (primary key) as

Re: repository entries

2005-11-29 Thread Armin Waibel
Hi Hans, Hans Novak wrote: Hi, i want to change dynamicly the location of the database Server, what is describe in repository.xml Is it possible, to read the defaults from the repository.xml and then, if is neccesery change the value temporary to another location ? I dont want to overwrite

ClassCastException with getObjectByIdentity()

2005-11-29 Thread Chris Worley
In the following code I get a ClassCastException when querying for the PartyGroup or Person. PartyGroup and Person both extend Party. Party.partyTypeId will determine if the party is a person or party group. If the party is one of the two then I want to get the party group or person

Re: ClassCastException with getObjectByIdentity()

2005-11-29 Thread Armin Waibel
Hi Chris, Chris Worley wrote: In the following code I get a ClassCastException when querying for the PartyGroup or Person. PartyGroup and Person both extend Party. Party.partyTypeId will determine if the party is a person or party group. If the party is one of the two then I want to get

Re: ClassCastException with getObjectByIdentity()

2005-11-29 Thread Chris Worley
I have found my problem. I was using the extent tag for in the descriptor for party referencing PartyGroup and Person. After removing the extent the correct instance is returned. -chris worley In the following code I get a ClassCastException when querying for the PartyGroup or Person.

Re: ClassCastException with getObjectByIdentity()

2005-11-29 Thread Chris Worley
Armin, Hi Chris, Chris Worley wrote: In the following code I get a ClassCastException when querying for the PartyGroup or Person. PartyGroup and Person both extend Party. Party.partyTypeId will determine if the party is a person or party group. If the party is one of the two then I

change the defaukt broker

2005-11-29 Thread Hans Novak
Hi, i have succsessful add a second broker with createPersistenceBroker and i can use it. But on runtime, i open the class later again and then i cant add it, because the broker alresay exists. And i cant switch to my broker, only to the default one. I can also not change my broker to the

Re: Old bug returns: UPDATE when accept-locks=false

2005-11-29 Thread Armin Waibel
Hi Steve, [EMAIL PROTECTED] wrote: What I am trying to accomplish is to set the CongDist class as read-only. I want to be able to make LocationImpl 's point at CongDists, but I never want to update the CONG_DIST table. I have ImplicitLocking=false and accept-locks=false, so I'm surprised to

Re: ClassCastException with getObjectByIdentity()

2005-11-29 Thread Armin Waibel
Chris Worley wrote: In the following code I get a ClassCastException when querying for the PartyGroup or Person. PartyGroup and Person both extend Party. Party.partyTypeId will determine if the party is a person or party group. If the party is one of the two then I want to get the party

Re: change the defaukt broker

2005-11-29 Thread Armin Waibel
Hi Hans, first you have to differ between connection metadata and object metadata. If you don't want to change persistence capable object metadata no need to use per thread changes mode. The default connection flag (jcd.setDefaultConnection(true)) can only be used by one JCD.

Problem with interface

2005-11-28 Thread Joose Vettenranta
Hi, I have like this: public class A implements Foo { private Integer id; ... getter/setter.. } public class B implements Foo { private Integer id; ... getter/setter.. } public interface Foo { public Integer getId(); public void setId(); } Both A and B has

Re: setPathOuterJoin() in 1.0.4

2005-11-26 Thread Jakob Braeuchi
hi steve, i know it's a long time since we first talked about this issue... the weather is getting colder now and i have time to fix this. i agree it would be better to use the path instead of the attribute. we'll have to define the behaviour of setPathOuterJoin(a.b). does it force an outer

problems OJB_HL_SEQ

2005-11-22 Thread Hans Novak
Hi, i'm a beginner with ojb. I hade in the past an Debian Sarge with MYSQL Sserver, what is working fine with my java app. Now we had change the server to an ubuntu system.The Java app has not been changegd, but i get errors like shown below. The interesting thing is thefieldname and this

Re: Old bug returns: UPDATE when accept-locks=false

2005-11-21 Thread Steve_Clark
What I am trying to accomplish is to set the CongDist class as read-only. I want to be able to make LocationImpl 's point at CongDists, but I never want to update the CONG_DIST table. I have ImplicitLocking=false and accept-locks=false, so I'm surprised to see and UPDATE being generated for

Re: Incorrect arguments to mysql_stmt_execute

2005-11-21 Thread Jakob Braeuchi
hi mirko, this looks like a known problem: http://forums.mysql.com/read.php?39,49989,49989#msg-49989 http://www.ubuntuforums.org/showthread.php?t=86294highlight=mysql_stmt_execute jakob Jakob Braeuchi schrieb: hi mirko, although i see a correct insert statement and a commit, the row is not

Re: Incorrect arguments to mysql_stmt_execute

2005-11-21 Thread Jakob Braeuchi
hi mirko, setting the property useServerPrepStmts to false solved the problem: ?useServerPrepStmts=false jdbc-connection-descriptor jcd-alias=default default-connection=true platform=MySQL jdbc-level=2.0

RE: MS Access

2005-11-21 Thread jean.chastain
Torque doesn't work with MS Access. That just means you have to set up your test data manually. -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 11:27 AM To: OJB Users List Subject: Re: MS Access hi tom, jean, do you have any

Re: MS Access

2005-11-21 Thread Thomas Dudziak
On 11/21/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Torque doesn't work with MS Access. That just means you have to set up your test data manually. You could add a feature request over at the DdlUtils JIRA (issues.apache.org/jira/browse/DDLUTILS) for adding support for MS Access. DdlUtils

Re: Incorrect arguments to mysql_stmt_execute

2005-11-21 Thread Mirko Froehlich
Hi Jakob, That's great news! Thanks for tracking this down. I'll give this workaround a shot at home later. -Mirko Jakob Braeuchi wrote: hi mirko, setting the property useServerPrepStmts to false solved the problem: ?useServerPrepStmts=false jdbc-connection-descriptor

Re: Incorrect arguments to mysql_stmt_execute

2005-11-21 Thread Mirko Froehlich
This workaround did indeed fix my problems as well. Thanks again! -Mirko Mirko Froehlich wrote: Hi Jakob, That's great news! Thanks for tracking this down. I'll give this workaround a shot at home later. -Mirko Jakob Braeuchi wrote: hi mirko, setting the property useServerPrepStmts

Re: setEndIndexAt

2005-11-20 Thread Jakob Braeuchi
hi mattieu, setStartIndexAt and setEndIndexAt do currently not affect the generated sql because this is not a standardized feature of sql and thus is handled differently by the dbms. some dbms provide a limit-clause. others use the rownumber, etc. jakob [EMAIL PROTECTED] schrieb: Hello

Re: Joining unrelated tables

2005-11-19 Thread Jakob Braeuchi
hi divakar, ojb does not support joining unrelated tables because the joins are always built base on relationships defined in the repository. you can use a QueryBySql which supports almost any sql-clause. jakob Sri Divakar schrieb: Hi, I am facing a problem of joining two unrelated

Criteria.addBetween

2005-11-19 Thread k jee
When I am trying to use criteria.addBetween(datefieldname,SQLdate1,SQLDate2) OJB is not creating the SQL with 2 values for between. here is what I see. Can some one please let me know what is wrong here. SystemOut O [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG:

Re: Criteria.addBetween

2005-11-19 Thread Jakob Braeuchi
hi krupa, what you see isan output of the query not the executed. please use p6spy to monitor the sql statement including all parameters. hth jakob k jee schrieb: When I am trying to use criteria.addBetween(datefieldname,SQLdate1,SQLDate2) OJB is not creating the SQL with 2 values for

Re: Criteria.addBetween

2005-11-19 Thread k jee
Hi Jakob, Thanks for your prompt reply. I was not able to get the p6spy work with websphere . Can you suggest any other way to see if the between is actually working. thanks, Krupa Jakob Braeuchi [EMAIL PROTECTED] wrote: hi krupa, what you see isan output of the query not the

OJB.properties

2005-11-18 Thread Tuna Ozkasap
Hi every one, I want to use OJB for different applications (like web applications in timcat) but OJB.properties is not configurable how do you overcame this problem, I mean how can I make the OJB.propertiesfile's absolute path configurable? -- Tuna Ozkasap Yazılım Mühendisi Trend-Tech Cyberpark

Re: OJB.properties

2005-11-18 Thread Alexandre Borgoltz
This should help: http://db.apache.org/ojb/docu/guides/ojb-properties.html Alexandre BORGOLTZ Head of Technology SmartJog SA Phone: +33 (0)1 4996 6324 Fax: +33 (0)1 4996 6405 Mobile: +33 (0)6 8882 1417 [EMAIL PROTECTED] Tuna Ozkasap wrote: Hi every one, I want to use OJB for different

Re: OJB.properties

2005-11-18 Thread Tuna Ozkasap
The link (which I have read before sending the first mail) does not describe how to change the absolute path of the properties file it only says that you can change the name of the file by changing the System property OJB.properties I also chacked out the code OJBConfiguration.java but I did not

AW: OJB.properties

2005-11-18 Thread Hiller, Frank RD-AS2
Im Tomcat I go this way: 1. get Cataline home: catalinaHome = System.getProperty(catalina.home); 2. Set a special congig directory: configDir = catalinaHome + /webapps/CommonConfigDir; 3. Set the path to OJB.properties: System.setProperty(OJB.properties, configDir + /OJB.properties); Frank

Re: OJB.properties

2005-11-18 Thread Tuna Ozkasap
Thank You, it worked, I had assumed wrong about OJB.properties system property. I thougt it can only change the file name. Thank you again All the best, On 11/18/05, Hiller, Frank RD-AS2 [EMAIL PROTECTED] wrote: Im Tomcat I go this way: 1. get Cataline home: catalinaHome =

Re: Caching of ojb and hsqldb

2005-11-17 Thread Armin Waibel
Hi Robert, think it could be a problem with the SET WRITE_DELAY {{TRUE | FALSE} | seconds | milliseconds MILLIS setting of hsql. http://hsqldb.org/doc/guide/ch04.html#N10D67 regards, Armin Robert Einsle wrote: Hy List, i have an strange problem using ojb 1.0.3 on Hsqldb 1.8.0. We develop

[Solved] Re: Caching of ojb and hsqldb

2005-11-17 Thread Robert Einsle
Hy Armin, yes, it works. Thanks a lot. \Robert Armin Waibel schrieb: Hi Robert, think it could be a problem with the SET WRITE_DELAY {{TRUE | FALSE} | seconds | milliseconds MILLIS setting of hsql. http://hsqldb.org/doc/guide/ch04.html#N10D67 regards, Armin Robert Einsle wrote: Hy

Joining unrelated tables

2005-11-17 Thread Sri Divakar
Hi, I am facing a problem of joining two unrelated tables using queryByCriteria (reportQueryByCriteria). For example: Table T1{sno integer, id integer, desc varchar} and Table T2{rollno integer, number integer, value varchar} are two tables with out any relation between

Old bug returns: UPDATE when accept-locks=false

2005-11-15 Thread Steve_Clark
I am seeing what looks like an old OJB bug resurfacing, and wonder if anybody can shed some light. I have an object with a reference to a read-only lookup table, and also a collection of entries from another read-only lookup table. Both lookups have accept-locks=false: class-descriptor

Mapping Multiple Joined Tables

2005-11-15 Thread Ryan Harris
I'm getting unexpected results from my application and can't figure out what I have configured improperly. I have mapped classes on muliple joined tables in the simple example below which is very much similar to the example in the documentation advanced-technique. I have an A class and a B

DBCP connection pool and validation query

2005-11-14 Thread Danilo Tommasina
Hi everybody, We have following problem.: We are using the DBCP connection factory, we've set a validation query, however we never see this query beeing executed. Now we set the testOnBorrow, testOnReturn and testWhileIdle to true, the query is still never logged (by p6spy). Manually killing

Re: type mismatch

2005-11-14 Thread Armin Waibel
Hi Tuna, please could you post the whole stack trace, then we can find the root exception. regards, Armin Tuna Ozkasap wrote: Hi Everyone, Here is my problem; when I create the PersistenceBroker instance by

Re: DBCP connection pool and validation query

2005-11-14 Thread Armin Waibel
Hi Danilo, Danilo Tommasina wrote: Hi everybody, We have following problem.: We are using the DBCP connection factory, we've set a validation query, however we never see this query beeing executed. Now we set the testOnBorrow, testOnReturn and testWhileIdle to true, the query is still never

Re: type mismatch

2005-11-14 Thread Tuna Ozkasap
I found the problem and I think everyone would be interested in this one, theproblem was caused from Locale setting. a Locale related method String.toLowerCase() caused the problem for example BIGINT should be bigint when its case is lowered, but in Turkish it is retruned to bıgınt so the

Re: PlatformInformixImpl

2005-11-11 Thread Thomas Franke
Hi Armin, Would it be possible to use INTEGER in Informix too? Ask this because I want to move #prepareNextValProcedureStatement implementation method to PlatformDefaultImpl. I could do that but I'll explain you why I did this decision. First of all the

NoSuchElementException

2005-11-11 Thread Thomas Franke
Hello there, if we call log = (Logbuch) broker.getObjectByQuery(query); we get a NoSuchElementException. At the moment because of a fresh database we know there aren't any records. We're using Informix Dynamik Server 9.4 and Informix JDBC.3.00.JC1 driver. I could imagine it is rather a jdbc

Re: NoSuchElementException

2005-11-11 Thread Armin Waibel
Hi Thomas, I setup a test against the latest version of OJB_1_0_RELEASE branch using maxDB and hsql with an empty table. public void testObjectByQuery_1() throws Exception { String dummy = nothing_to_find; Criteria criteria = new Criteria(); criteria.addEqualTo(name,

Re: NoSuchElementException

2005-11-11 Thread Thomas Franke
Hi Armin, I setup a test against the latest version of OJB_1_0_RELEASE branch using maxDB and hsql with an empty table. That's great, thanks. All tests pass without problems. So we have isolate your issue (not really ;-)): It could be a jdbc-driver problem or a bug in an older version of

Re: NoSuchElementException

2005-11-11 Thread Thomas Franke
Hi Armin, It could be a jdbc-driver problem It seems that it is really a driver problem. We changed the driver to the latest version and the exception changed too. ;) The exception comes directly from the jdbc driver. Here is the stack trace in full: 11.11.2005 18:06:41 [ERROR]

Re: NoSuchElementException

2005-11-11 Thread Thomas Franke
Thomas Franke wrote: org.apache.ojb.broker.PersistenceBrokerSQLException: SQLException during the execution of the query (for de.mhr.wis.DBAdapter.rawdata.analyses.Logbuch): Cannot write sorted rows. We got it. It seems with the latest driver we solved the problem. The exception above occurs

When to overwrite equals() and hashCode()

2005-11-10 Thread werner
Hi! I'm using OJB 1.0.3 with PB-API and it'S doing a great job. Now I'm looking for some information about the equals() and hashCode() methods: - In which cases should they be overwritten? - How can hashCode() be implemented? Can I use just the Primary Key for the hashcode, or does that cause

Re: When to overwrite equals() and hashCode()

2005-11-10 Thread Thomas Dudziak
On 11/10/05, werner [EMAIL PROTECTED] wrote: I'm using OJB 1.0.3 with PB-API and it'S doing a great job. Now I'm looking for some information about the equals() and hashCode() methods: - In which cases should they be overwritten? In general it is a good idea to overwrite these methods because

xdoclet 1.2.1 generating masses of foreign key references

2005-11-10 Thread Bernd Laengerich
Hi, another problem: given is an abstract base class A with many implementations A1Impl, A2Impl, A3Impl. The base class references a second class B. When running xdoclet, it generates an xml schema file with as many foreign key references as there are implementations plus the one from the

<    11   12   13   14   15   16   17   18   19   20   >