RE: Connection timeout
Alessandro, It's the same problem, although I connect to numerous database I do get page locks in MSSQL but once the process finishes blocking everything runs smoothly. However there are time I perform a database query and the process just seems to hang, latterly my debugger is stuck on the call to the database. There is no large resultset expect, the table is properly index just some time of connectivity issue. When this happens I want to set a time out setting and attempt to have the code/driver/or database cancel the transaction. -Original Message- From: Alessandro Colantoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 28, 2007 2:02 AM To: OJB Users List Subject: Re: Connection timeout Hi Eric, I fixed the issue. I had a typical deadlock, with two transaction working on the same objects, where each one was waiting the other one finishing his job. Anyway I'm working with just one database. I don't think we're talking about the same problem, anyway try telling something more about your problem, sure you will be helped. greetings Alessandro On 2/27/07, Ferrer, Eric [EMAIL PROTECTED] wrote: Alessandro, Did you code around your stall or did you fix the issue causing the stall. Sometimes I swear I notice connectivity issues between 3 of the external database I talk to. Sometimes the problem self fixes as connectivity improves but other times we have a dead process that is waiting on its transaction to complete and is literally stalled on the query execution remotely. Thanks -Eric -Original Message- From: Alessandro Colantoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 4:29 AM To: OJB Users List Subject: Re: Connection timeout Hi Armin, thanks the same. I asked that because in an application I made a mistake that got in a stall :-( Of course I solved the problem, but I thought that a mistake can occur, and some resource can keep blocked. So I thought that if I could set some timeout, at rollback the resource will be available again , and the problem could be solved later (for example during the night) without affecting the user. My application is in test phase, and I'm sure that now stall are impossible, but you know... Anyway thanks again for the excellent support you do. Greetings Alessandro On 2/6/07, Armin Waibel [EMAIL PROTECTED] wrote: Hi Alessandro, Alessandro Colantoni wrote: Hi all. I'm using ojb1.4 with persistence broker. I would know if there is any way to set a timeout for the broker, so if it doesn't end his job in the timeout limit a rollback is done and an exception thrown. Sorry no. OJB expects that all PB instances/PB-tx are closed/handled by the user. regards, Armin Thanks in advance for the help. Alessandro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection timeout
Alessandro, Did you code around your stall or did you fix the issue causing the stall. Sometimes I swear I notice connectivity issues between 3 of the external database I talk to. Sometimes the problem self fixes as connectivity improves but other times we have a dead process that is waiting on its transaction to complete and is literally stalled on the query execution remotely. Thanks -Eric -Original Message- From: Alessandro Colantoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 4:29 AM To: OJB Users List Subject: Re: Connection timeout Hi Armin, thanks the same. I asked that because in an application I made a mistake that got in a stall :-( Of course I solved the problem, but I thought that a mistake can occur, and some resource can keep blocked. So I thought that if I could set some timeout, at rollback the resource will be available again , and the problem could be solved later (for example during the night) without affecting the user. My application is in test phase, and I'm sure that now stall are impossible, but you know... Anyway thanks again for the excellent support you do. Greetings Alessandro On 2/6/07, Armin Waibel [EMAIL PROTECTED] wrote: Hi Alessandro, Alessandro Colantoni wrote: Hi all. I'm using ojb1.4 with persistence broker. I would know if there is any way to set a timeout for the broker, so if it doesn't end his job in the timeout limit a rollback is done and an exception thrown. Sorry no. OJB expects that all PB instances/PB-tx are closed/handled by the user. regards, Armin Thanks in advance for the help. Alessandro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SQL Hints
Is it possible to hint to OJB on persisted calls to use the WITH (NO LOCK) attributes on tables? When ever we are in a multiple transaction and selecting data from large tables we sometimes slow things down and for performance reasons sometimes have to create views. Thanks -Eric
RE: Driver Specific Parameters
Armin, Thanks for the info. Do you know what the jdbc. Argument is to allow the setting of transaction isolation levels are for MSSQLServer Driver or any other drivers? Also, when I open up these XML files in ALTOVE XMLSpy it complains because there is no parent element wrapping the repository_database.xml contents ever thought of adding one? Last question(s) a) Ever add support for Native SQL Calls? b) Ever add support for DBCP initialSize of pooled connections? Thanks -Eric -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 8:01 AM To: OJB Users List Subject: Re: Driver Specific Parameters Luis Colorado wrote: Armin, Well, it's interesting you mention that, because I tried to use custom attributes, but it didn't work. Now I'm becoming aware that you are suggesting adding the jdbc. prefix to the attribute name. My original, and failed, attempt looked something like: attribute attribute-name=zeroDateTimeBehavior attribute-value=convertToNull/ So I guess I will try later your suggestion: attribute attribute-name=jdbc.zeroDateTimeBehavior attribute-value=convertToNull/ Perhaps I missed it, but I never saw the jdbc. prefix in the documentation... did you? Please see the link in my previous post (repository guide). You can find a note in the 1.0.4 release notes too (New features: OJB-14): http://db.apache.org/ojb/release-notes.txt And it's commented in the repository-database.xml example file: http://db.apache.org/ojb/repository_database.xml.txt regards, Armin Thanks! Luis -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Mon 2/12/2007 10:07 PM To: OJB Users List Subject: Re: Driver Specific Parameters In the end, I discovered that the right place to put it at the end of the dbalias as shown below: jdbc-connection-descriptor jcd-alias=essential default-connection=yes platform=MySQL jdbc-level=3.0 driver=org.gjt.mm.mysql.Driver protocol=jdbc subprotocol=mysql dbalias=//localhost/essential?zeroDateTimeBehavior=convertToNull username=xx password=y since OJB 1.0.4: Another option is to use custom attributes to specify jdbc-driver parameter (if supported by the jdbc-driver): http://db.apache.org/ojb/docu/guides/repository.html#Custom+attributes-N 10329 the example above would look like (don't know if mysql support this too) attribute attribute-name=jdbc.zeroDateTimeBehavior attribute-value=convertToNull/ regards, Armin I hope this helps. Luis -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 4:02 PM To: OJB Users List Subject: Driver Specific Parameters Since we are using OJB and DBCP for connection pooling, with the introduction of JDBC 4.0 a lot of drivers have additional parameters that we can set for performance tuning. What are the options for setting this in OJB's repository_database.xml or other properties file? Thanks -Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Driver Specific Parameters
Since we are using OJB and DBCP for connection pooling, with the introduction of JDBC 4.0 a lot of drivers have additional parameters that we can set for performance tuning. What are the options for setting this in OJB's repository_database.xml or other properties file? Thanks -Eric
RE: Driver Specific Parameters
Thanks Luis, Moving forward I will try this out. With all these layers its difficult to know where stuff should go and if they are visible at all unless x component supports it. I know OJB is working to support the initialSize of a connection pool object and with JDBC 4.0 lots of new stuff to play with. We are trying to evaluate drivers at the moment and its amazing how many more options are available per driver. I am unfortunately forced to use SQL Server 2005 and jTDS does not support the snapshot isolation level. -Eric -Original Message- From: Luis Colorado [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 3:29 PM To: OJB Users List Subject: RE: Driver Specific Parameters Eric, I'm not sure if this answers your question, but I was doing some similar research to set up a parameter for jetspeed-1, which also uses OJB. When I upgraded from MySQL version 4 to version 5, I discovered that I had to set up a parameter to handle timestamps equal to zero, and I was looking for a bit for the right place to put this parameter. The parameter was zeroDateTimeBehavior=convertToNull. In the end, I discovered that the right place to put it at the end of the dbalias as shown below: jdbc-connection-descriptor jcd-alias=essential default-connection=yes platform=MySQL jdbc-level=3.0 driver=org.gjt.mm.mysql.Driver protocol=jdbc subprotocol=mysql dbalias=//localhost/essential?zeroDateTimeBehavior=convertToNull username=xx password=y I hope this helps. Luis -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 4:02 PM To: OJB Users List Subject:Driver Specific Parameters Since we are using OJB and DBCP for connection pooling, with the introduction of JDBC 4.0 a lot of drivers have additional parameters that we can set for performance tuning. What are the options for setting this in OJB's repository_database.xml or other properties file? Thanks -Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performance Issue on lookup on a table
Armin, Its nice to know that you are thinking about the web, but my issues dont revolve around the web at this point. When I do a persistable query, if I get a collection, I set the max to what ever configurable param, display 20 records or more per page, and I already have another struts/jsf solution to handle the user interaction from paging x pages with out going back to the database. In fact I dont think we need this since on the pages we access for these types of queries, I believe its all in a collection or cached result set. What I want is for the select top query to be native supported since in most case we simply expect 1 record from a database table or a 1:n relationship (i.e. 1 customer can have numerous contact). The table in question is populated monthly, outside of my controll and our lookups should only return 1 record always due to the referential integrity constraint. Actually we set our persistable object with the keys that are only indexed as for performance reason. At first I thought we was doing a full table scan. Now I know better. Hopefully there can be some short term solution to prevent the disclosing of our data model layer. Does this behavior we are talking about occur on any other RDMS function calls we perform? I know its SQL Server and I had no choice, but I think i get page locks when I do logical persisted calls to update a set of tables per our business work flow processes (5 table prior to commit). Lets keep this discussion going, perhaps there are some other Object Relational Bridge tools we can bench off for this solution? Hibernate? EJB3? POJO ? -Eric From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Mon 2/5/2007 7:38 PM To: OJB Users List Subject: Re: Performance Issue on lookup on a table Hi Roger, Janssen, Roger wrote: Hi, Hearing that the pagination might be implemented using native SQL limiting syntax puts a smile on my face. It might be a bit more complex though then suggested by Armin. All beginnings are difficult ;-) The limit support can't substitute the real native based pagination. My thought was to combine current OJB-pagination with new limit support and fetch-size - e.g set limit to 300, Query.setStartAtIndex(150), Query.setEndAtIndex(300) to get results 150...300 and fetch-size=30 set to web-page result number size. This isn't perfect, but I think this will be much more effective on large result sets as current behavior (without limit). We do not only want to limit the amount of records, but also want to be able to define an offset, aka request a specific page. Since every RDBMS has its own logic, it is not straightforward. A re-write of the quey might even be necessary, instead of just adding a limit-clause: MSSQL: SELECT * FROM ( SELECT TOP n * FROM ( SELECT TOP z columns -- (z=n+skip) FROM tablename ORDER BY key ASC ) AS FOO ORDER BY key DESC -- ('FOO' may be anything) ) AS BAR ORDER BY key ASC-- ('BAR' may be anything) MYSQL: SELECT columns FROM tablename ORDER BY key ASC LIMIT n OFFSET skip ORACLE: SELECT * FROM ( SELECT ROW_NUMBER() OVER (ORDER BY key ASC) AS rn, columns FROM tablename ) WHERE rn skip AND rn = (n+skip) (I think the oracle example can be simplified though.) And of course, there are many other platforms as well. You are right, native pagination support will be much more complex to implement than limit support (your examples point out the problem). But isn't it in most cases a simple sql-string split to integrate the paging query string? [ I got this info from http://troels.arvin.dk/db/rdbms/#select-limit-offset ] Excellent link! And to complicate it even more, if the platform will not be supported by OJB, I think it would be nice if OJB falls back on it's current implementation. But the buildup of the resultsets is of course completey different using native pagination and the current OJB implementation, can they co-exist? In the current implementation OJB simply use a RsIterator wrapper class to simulate paging. Thus if native paging is supported by OJB it has to use the default RsIterator and as fall back OJB can use the current wrapper class. Give me time to think more about it (seems it could be possible to implement native paging without changing too many classes and internal interfaces - I could be fatally wrong ;-)). By the way, it seems that someone started with paging support some time ago (see Platform class methods) but never implement it. regards, Armin Roger Janssen iBanx -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: zaterdag 3 februari 2007 3:05 To: OJB Users List Subject: Re: Performance Issue on lookup on a table Hi Eric, Ferrer, Eric wrote: Thanks for the reply, Can the OJB developers reply with their thoughts on this. I would have figured the load by persistence object calls we make and we do
RE: Performance Issue on lookup on a table
Thanks for the reply, Can the OJB developers reply with their thoughts on this. I would have figured the load by persistence object calls we make and we do them when we only want 1 record a lot would do the same job as the SQL select statement. For a while I thought maybe our driver was an issue. This may be major for us since we auto generate a lot of our OR mapping using Velocity so as to not expose the data model. From what you just told me we have to analyze table growth and convert our Persistence Load Query to SQL calls. -Eric -Original Message- From: Janssen, Roger [mailto:[EMAIL PROTECTED] Sent: Friday, February 02, 2007 1:29 AM To: OJB Users List Subject: RE: Performance Issue on lookup on a table Hi, We have the same problem. This is because OJB does not (yet?) implement paging based on RDBMS native paging/limiting syntax. A query, hitting the complete resultset is executed and cursors are used to fetch the requested page. Large resultsets, will take a lot of time. We have been experiencing more and more problems over the last few years with this. I am wating for the OJB 1.1 release (For over 2 years now!) and hoping that it will implemented this feature. Right now, I have to expose the datamodel within my application code, bypassing our domain model and OJB as OR mapper, and that really hurts. Greetings, Roger Janssen iBanx -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: vrijdag 2 februari 2007 3:54 To: OJB Users List Subject: RE: Performance Issue on lookup on a table Just to add it appears to work when passing a straight SQL query versus using the persistable method. -Eric -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: Thursday, February 01, 2007 4:57 PM To: OJB Users List Subject: RE: Performance Issue on lookup on a table Sorry Accidently hit send. What I was saying the query generate looks like this SELECT TOP 1 A0.SERIAL_NUMBER,A0.AD_ID,A0.LIC_NUM,A0.RECEIVED_DTIME,A0.LIC_ST,A0.LIC_ TYPE FROM MY_LIC_TLB A0 WHERE ((A0.LIC_NUM = '1236713' ) AND A0.LIC_ST = 'DD' ) AND A0.LIC_TYPE = 'NORMAL' When I run it in the sql management tool it comes back in less than 20 seconds, however via ojb it varies between 5 and 7 minutes. The table has 3 gigs of data. Any ideas what can be the difference? We do lots of similar calls and this is the first one we ever experienced this with. Thanks -Eric -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: Thursday, February 01, 2007 4:52 PM To: OJB Users List Subject: Performance Issue on lookup on a table I am experience an issue with an OJB query using a persistable object. Basically its taking 7 minutes to return on the call getObjectByQuery. When I run the query - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed.You should not copy, disclose or distribute this communication without the authority of iBanx bv. iBanx bv is neither liable for the proper and complete transmission of the information has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Performance Issue on lookup on a table
I am experience an issue with an OJB query using a persistable object. Basically its taking 7 minutes to return on the call getObjectByQuery. When I run the query - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performance Issue on lookup on a table
Sorry Accidently hit send. What I was saying the query generate looks like this SELECT TOP 1 A0.SERIAL_NUMBER,A0.AD_ID,A0.LIC_NUM,A0.RECEIVED_DTIME,A0.LIC_ST,A0.LIC_ TYPE FROM MY_LIC_TLB A0 WHERE ((A0.LIC_NUM = '1236713' ) AND A0.LIC_ST = 'DD' ) AND A0.LIC_TYPE = 'NORMAL' When I run it in the sql management tool it comes back in less than 20 seconds, however via ojb it varies between 5 and 7 minutes. The table has 3 gigs of data. Any ideas what can be the difference? We do lots of similar calls and this is the first one we ever experienced this with. Thanks -Eric -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: Thursday, February 01, 2007 4:52 PM To: OJB Users List Subject: Performance Issue on lookup on a table I am experience an issue with an OJB query using a persistable object. Basically its taking 7 minutes to return on the call getObjectByQuery. When I run the query - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performance Issue on lookup on a table
Just to add it appears to work when passing a straight SQL query versus using the persistable method. -Eric -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: Thursday, February 01, 2007 4:57 PM To: OJB Users List Subject: RE: Performance Issue on lookup on a table Sorry Accidently hit send. What I was saying the query generate looks like this SELECT TOP 1 A0.SERIAL_NUMBER,A0.AD_ID,A0.LIC_NUM,A0.RECEIVED_DTIME,A0.LIC_ST,A0.LIC_ TYPE FROM MY_LIC_TLB A0 WHERE ((A0.LIC_NUM = '1236713' ) AND A0.LIC_ST = 'DD' ) AND A0.LIC_TYPE = 'NORMAL' When I run it in the sql management tool it comes back in less than 20 seconds, however via ojb it varies between 5 and 7 minutes. The table has 3 gigs of data. Any ideas what can be the difference? We do lots of similar calls and this is the first one we ever experienced this with. Thanks -Eric -Original Message- From: Ferrer, Eric [mailto:[EMAIL PROTECTED] Sent: Thursday, February 01, 2007 4:52 PM To: OJB Users List Subject: Performance Issue on lookup on a table I am experience an issue with an OJB query using a persistable object. Basically its taking 7 minutes to return on the call getObjectByQuery. When I run the query - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Borrow broker from pool failed. in production server
Marwane, Growing the pool is not a good thing always. Say you have 300 Oracle licenses, depending on the license, that may include connection pooled objects under the same user account. So there is a section in your code that may not have a finally block so the connection does not get closed. If your DBA does not have orphan settings enabled. When you hit your maxActive count and need another connection, there wont be one available and thus, you will grow you connection pool maxActive limit. What will happen is you hit your database max connection limit and will see some nasty error like ORCL: 9000 No More Available Connections don't quote on that I cant reproduce a more meanifull error at this point and time. So even if you are going to grow make sure you have evictionThreads running. DBCP has an initialSize argument which I believe the OJB Community is planning to support. Once this is available, using a Database Profiler, you should be able to start your application up and via the profiler see new connections per your initialSize. As you need additional resources, say maxActive is 30, you will see the connection increase to handle the load. You should then be able to see eviction thread run to clean up unused/idle connections. I performed a similar test, and found over 45 object calls that did not have a finally block to close connections and release them back to the pool. Last point, the more connections you have the more memory footprint for your application will be. Someone else chim in but I believe each connection takes up to 2MB of memory or that is just what I can see from the Database Profiler. -Eric -Original Message- From: Marwane [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 3:56 AM To: OJB Users List Subject: Re: Borrow broker from pool failed. in production server hi; The problem is resolved using : connection-pool maxActive=1000 whenExhaustedAction=2/ so it s strange the message gived by ojb tel us about the broker pool problem but the solution was the growing the connection pool ! thx for all. On 10/27/06, Armin Waibel [EMAIL PROTECTED] wrote: Marwane wrote: thx. if i don't defin the connection-pool clause in the repository.xml what is the default behavor about the connection managment in ojb ? I think by default 30 connections (docs says 21) managed by the pool (if you specify one of the pooling ConnectionFactory implementations in OJB.properties file). The other properties please see docs http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10284 http://db.apache.org/ojb/docu/guides/connection.html regards, Armin On 10/27/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, Marwane wrote: thx for your reply. so we use only the maxActive declared in OJB.properties. in the repository.xml we dont use the connection-pool elements. Keep in mind that OJB use two different pools by default. An PB-pool (settings in OJB.properties file) and a connection-pool (setting within the connection-pool element in repository file). we use maxActif in 1000 the problem persist. It seems that the error is caused by the broker-pool and not by the connection-pool. Normally the connection is associated with the PB when PB-tx starts or a query is performed - thus always after the PB is requested from the PB-pool. If the suggestions from Eric and Dennis doesn't solve your problem I suppose you have a PB leak in your code. regards, Armin regards. On 10/26/06, Dennis Bekkering [EMAIL PROTECTED] wrote: when i have a quick look it seems to be about the broker pool and not the connection pool. Check your OJB.properties and set maxActive to the same value as maxActive of the connection pool settings in repository_database.xml. I am not sure about it but your problem happened to me once this way and it was solved by doing as i suggest. regards, Dennis 2006/10/26, Marwane [EMAIL PROTECTED]: hi we have a web application on production used about 500 users. we use default value of ojb parameters (maxActif: 100 ). we are getting frequently the message indicating that we can't borrow connection from pool. even if we use maxActif in 1000 the problem persist. we need your help and give us some leads. stack trace : org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, user=db2bmce, password=* at java.lang.Throwable.init(Throwable.java:195) at java.lang.Exception.init(Exception.java:41) at java.lang.RuntimeException.init(RuntimeException.java:43) at org.apache.commons.lang.exception.NestableRuntimeException .init( NestableRuntimeException.java:86) at org.apache.ojb.broker.OJBRuntimeException.init(Unknown Source) at
RE: Borrow broker from pool failed. in production server
Well with SQL Server 2005 I use the profiler that comes with the studio, don't know about your database/database tools. You want to have your maxActive settings the same in repository_database.xml and ojb.properties. Then you want to enable eviction threads in your ojb.properties file. Just read the instructions and make the appropriate changes. -Original Message- From: Marwane [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 10:28 AM To: OJB Users List Subject: Re: Borrow broker from pool failed. in production server thx for your helpful and constructif reply . i will profile the connections, but it will be gretful if you can give me more detail about using DBCP and evictionThreads with example configuration (ojb.prperties, repository.xml) and how to profile the connections with wich tools ? thx On 11/8/06, Ferrer, Eric [EMAIL PROTECTED] wrote: Marwane, Growing the pool is not a good thing always. Say you have 300 Oracle licenses, depending on the license, that may include connection pooled objects under the same user account. So there is a section in your code that may not have a finally block so the connection does not get closed. If your DBA does not have orphan settings enabled. When you hit your maxActive count and need another connection, there wont be one available and thus, you will grow you connection pool maxActive limit. What will happen is you hit your database max connection limit and will see some nasty error like ORCL: 9000 No More Available Connections don't quote on that I cant reproduce a more meanifull error at this point and time. So even if you are going to grow make sure you have evictionThreads running. DBCP has an initialSize argument which I believe the OJB Community is planning to support. Once this is available, using a Database Profiler, you should be able to start your application up and via the profiler see new connections per your initialSize. As you need additional resources, say maxActive is 30, you will see the connection increase to handle the load. You should then be able to see eviction thread run to clean up unused/idle connections. I performed a similar test, and found over 45 object calls that did not have a finally block to close connections and release them back to the pool. Last point, the more connections you have the more memory footprint for your application will be. Someone else chim in but I believe each connection takes up to 2MB of memory or that is just what I can see from the Database Profiler. -Eric -Original Message- From: Marwane [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 3:56 AM To: OJB Users List Subject: Re: Borrow broker from pool failed. in production server hi; The problem is resolved using : connection-pool maxActive=1000 whenExhaustedAction=2/ so it s strange the message gived by ojb tel us about the broker pool problem but the solution was the growing the connection pool ! thx for all. On 10/27/06, Armin Waibel [EMAIL PROTECTED] wrote: Marwane wrote: thx. if i don't defin the connection-pool clause in the repository.xml what is the default behavor about the connection managment in ojb ? I think by default 30 connections (docs says 21) managed by the pool (if you specify one of the pooling ConnectionFactory implementations in OJB.properties file). The other properties please see docs http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10284 http://db.apache.org/ojb/docu/guides/connection.html regards, Armin On 10/27/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, Marwane wrote: thx for your reply. so we use only the maxActive declared in OJB.properties. in the repository.xml we dont use the connection-pool elements. Keep in mind that OJB use two different pools by default. An PB-pool (settings in OJB.properties file) and a connection-pool (setting within the connection-pool element in repository file). we use maxActif in 1000 the problem persist. It seems that the error is caused by the broker-pool and not by the connection-pool. Normally the connection is associated with the PB when PB-tx starts or a query is performed - thus always after the PB is requested from the PB-pool. If the suggestions from Eric and Dennis doesn't solve your problem I suppose you have a PB leak in your code. regards, Armin regards. On 10/26/06, Dennis Bekkering [EMAIL PROTECTED] wrote: when i have a quick look it seems to be about the broker pool and not the connection pool. Check your OJB.properties and set maxActive to the same value as maxActive of the connection pool settings in repository_database.xml. I am not sure about it but your problem happened to me once this way and it was solved by doing as i suggest. regards, Dennis
RE: Borrow broker from pool failed. in production server
One thing to consider. Take a look at the database and find out how many licenses you have. When I was an OJB/DBCP noob I had set the maxActive higher than the number of available connections in the database. - Eric -Original Message- From: Dennis Bekkering [mailto:[EMAIL PROTECTED] Sent: Thursday, October 26, 2006 3:11 PM To: OJB Users List Subject: Re: Borrow broker from pool failed. in production server when i have a quick look it seems to be about the broker pool and not the connection pool. Check your OJB.properties and set maxActive to the same value as maxActive of the connection pool settings in repository_database.xml. I am not sure about it but your problem happened to me once this way and it was solved by doing as i suggest. regards, Dennis 2006/10/26, Marwane [EMAIL PROTECTED]: hi we have a web application on production used about 500 users. we use default value of ojb parameters (maxActif: 100 ). we are getting frequently the message indicating that we can't borrow connection from pool. even if we use maxActif in 1000 the problem persist. we need your help and give us some leads. stack trace : org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, user=db2bmce, password=* at java.lang.Throwable.init(Throwable.java:195) at java.lang.Exception.init(Exception.java:41) at java.lang.RuntimeException.init(RuntimeException.java:43) at org.apache.commons.lang.exception.NestableRuntimeException.init( NestableRuntimeException.java:86) at org.apache.ojb.broker.OJBRuntimeException.init(Unknown Source) at org.apache.ojb.broker.PBFactoryException.init(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPer sistenceBroker(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersi stenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker( Unknown Source) at ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.getBroke r( OJBPersistenceService.java:156) at ma.co.omnidata.framework.services.dao.ojb.OJBPersistenceService.newSessi on( OJBPersistenceService.java:250) at ma.co.omnidata.framework.services.transaction.impl.TransactionManagerImp l.getTransaction (TransactionManagerImpl.java:39) at ma.co.omnidata.framework.services.businessInterface.OMNIFacade.invokeSer vice (OMNIFacade.java:55) at ma.co.omnidata.framework.services.ihm.struts.core.OMNIBaseAction.invokeB usiness (OMNIBaseAction.java:120) at com.rmawatanya.convergence.application.technique.habilitation.ihm.action .HabLogonAction.doExecute (HabLogonAction.java:47) at com.rmawatanya.convergence.application.technique.habilitation.ihm.action .HabLogonAction.execute (HabLogonAction.java:35) at org.apache.struts.action.RequestProcessor.processActionPerform( RequestProcessor.java:421) at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:226) at org.apache.struts.action.ActionServlet.process(ActionServlet.java :1164) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:851) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:1246) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest( ServletWrapper.java:380) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest( CacheServletWrapper.java:80) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java :1724) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready( WCChannelLink.java:79) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio n( HttpInboundLink.java:422) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio n( HttpInboundLink.java:319) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready( HttpInboundLink.java:288) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscr iminaters (NewConnectionInitialReadCallback.java:207) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete (NewConnectionInitialReadCallback.java:109) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete( WorkQueueManager.java:537) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO( WorkQueueManager.java:593) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun( WorkQueueManager.java:946) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run( WorkQueueManager.java:1038) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1446) Caused by: java.util.NoSuchElementException at java.lang.Throwable.init(Throwable.java:180)
RE: OJB-DBCP initial connection pool setting support
Armin, I was just following up on this questions regarding being able to set the initial size of the pool on DBCP via the OJB.properties. If this can not be done in the current release, is there a plan to make it available or is there a work around? Could this be accomplished by switching from DBCP to JBOSS? I have never used JBOSS connection pooling with OJB and would like to know if this has been tested and if there are any examples on how to configure OJB with JBOSS? Thank you -Eric -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 1:30 PM To: OJB Users List Subject: Re: OJB-DBCP initial connection pool setting support Hi Eric, Ferrer, Eric wrote: Hi, DBCP supports an initialSize property for initializing connections on startup, does OJB support this parameter? A DBCP property 'initialSize' is not supported. Could you point me at the DBCP doc-section describe this property? regards, Armin Thanks -Eric Disclaimer: This email may contain confidential and privileged material for the sole use of the intended recipient(s) and only for those purposes previously or herein authorized by the sender. Any review, use, distribution or disclosure by others, or use by the recipient for unauthorized purposes, is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Disclaimer: This email may contain confidential and privileged material for the sole use of the intended recipient(s) and only for those purposes previously or herein authorized by the sender. Any review, use, distribution or disclosure by others, or use by the recipient for unauthorized purposes, is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OJB-DBCP initial connection pool setting support
Sure Armin, http://jakarta.apache.org/commons/dbcp/configuration.html parameter initialSize added since 1.2 version of jar. I am trying to setup a case where x connections are in the pool per number of users, setup the maxActive to expected load, setup some eviction threads and test that after peak usage increase our connection pools to maxActive threshold, that when eviction threads run, we come back down to our original pool settings. I may have to use JBoss to accomplish this, but my code base supports Tomcat and Jboss in production using DBCP and I would like to keep this the same. Thanks -Eric -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 1:30 PM To: OJB Users List Subject: Re: OJB-DBCP initial connection pool setting support Hi Eric, Ferrer, Eric wrote: Hi, DBCP supports an initialSize property for initializing connections on startup, does OJB support this parameter? A DBCP property 'initialSize' is not supported. Could you point me at the DBCP doc-section describe this property? regards, Armin Thanks -Eric Disclaimer: This email may contain confidential and privileged material for the sole use of the intended recipient(s) and only for those purposes previously or herein authorized by the sender. Any review, use, distribution or disclosure by others, or use by the recipient for unauthorized purposes, is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Disclaimer: This email may contain confidential and privileged material for the sole use of the intended recipient(s) and only for those purposes previously or herein authorized by the sender. Any review, use, distribution or disclosure by others, or use by the recipient for unauthorized purposes, is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OJB-DBCP initial connection pool setting support
Hi, DBCP supports an initialSize property for initializing connections on startup, does OJB support this parameter? Thanks -Eric Disclaimer: This email may contain confidential and privileged material for the sole use of the intended recipient(s) and only for those purposes previously or herein authorized by the sender. Any review, use, distribution or disclosure by others, or use by the recipient for unauthorized purposes, is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
Table Locking Question
I have this process that collects data from an external resource and then loads the data into several database tables. It appears that under heavy load, I am unable to access data from those tables unless they are views with NOLOCK defined. I am using SQL Server 2005 database where the help documentation states that the default hint for select statements is defined with HINT of NOLOCK. Could OJB be causing the lock? I assume it is because I can access the table data via the application once the insert statements finishes execution and a call to release the connection back to the pool has been executed Config Information: ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFacto ryDBCPImpl ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManag erImpl LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl LockTimeout=6 ImplicitLocking=true LockAssociations=WRITE Thanks -Eric
RE: Oracle 10g compliance
I am not running 1.0.4, heck I just inherit this code I am working with now, and they had renamed the jar file to just say ojb.jar but I know its not 1.0.4 (file data on jar is early March 2005). Everything seems stable so far, been running our junit tasks and building against our Oracle database. Wish I could tell you more, but the product we designed was switch to a SQL Server production install and we have been off Oracle for a couple of months now. !-- ORACLE DEV-- !-- -- jdbc-connection-descriptor jcd-alias=APPLICATION default-connection=true platform=Oracle9i jdbc-level=3.0 driver=com.p6spy.engine.spy.P6SpyDriver dbalias=thin:@XX.Y.XX.Y::UnitDB protocol=jdbc subprotocol=oracle username=johnny password=dbms eager-release=false batch-mode=false useAutoCommit=1 ignoreAutoCommitExceptions=false connection-pool maxActive=256 validationQuery=SELECT 1 FROM DUAL testOnBorrow=true/ /jdbc-connection-descriptor ! -Original Message- From: Bruno CROS [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 21, 2006 1:12 AM To: OJB Users List Subject: Oracle 10g compliance Hi all, Apparently, 1.0.4 does not support Oracle 10g platform (torque does but not the OJB runtime) So, i go on with oracle 9i settings. Does anyone report experience (good or bad) of that ? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OJB, JBOSS and Hibernate
I currently have OJB configured to run on Tomcat using apache's connection pooling. We are going to be switching environments to use JBOSS as our application server. JBOSS appears to be really focused on integrating with Hibernate and I had some concerns of forth coming issues with OJB and JBOSS. Has anyone implement OJB as their persistence layer on JBOSS and are their any gotchas? Thanks Eric
OJB locking on tables and views
I wanted to know if when OJB generates the sql to get back requested data, how does OJB handle the locking of records?
RE: Oracle OJB error
Hi Armin, I made the changes you suggest.. the debug statements show OJB: Create new DBCP connection pool:[EMAIL PROTECTED] jcd-alias=APPLICATION default-connection=true dbms=Oracle9i jdbc-level=3.0 driver= oracle.jdbc.driver.OracleDriver protocol=jdbc sub-protocol=oracle db-alias=thin:@XX.X.XX.XX:X:VPSu user=application password=* eager-release=false ConnectionPoolDescriptor={whenExhaustedAction=0, validationQuery=SELECT 1 FROM DUAL, maxIdle=-1, maxActive=256, maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false, minEvictableIdleTimeMillis=60, testOnReturn=false, logAbandoned=false, removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, testOnBorrow=true} batchMode=false useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE ignoreAutoCommitExceptions=false sequenceDescriptor=null But the Platform dependend error Caused by: java.sql.SQLException: Attempt to set Escape Processing after SQL is already processed still occurred. -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Monday, December 12, 2005 10:17 AM To: OJB Users List Subject: Re: Oracle OJB error 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 jdbc-connection-descriptor. Set platform=Oracle9i instead of platform=Oracle. 'Oracle9i' setting is for 9i and higher. regards, Armin -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, 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 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 STEM_PARAMETER_ID,A0.MODIFY_USER_DB FROM SYSTEM_PARAMETER A0 WHERE A0.SYSTEM_ID = ?,null,,swav,123,2005-12-09 14:42:51.649 13984 2005-12-09 14:42:51,649 ERROR - OJB: Platform dependend failure,null,,swav,123,2005-12-09 14:42:51.649 org.apache.ojb.broker.platforms.PlatformException: Could not set escape processing at org.apache.ojb.broker.platforms.PlatformOracleImpl.afterStatementCreate( PlatformOracleImpl.java:63) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:333) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:223) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt (StatementsForClassImpl.java:167) at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement( StatementManager.java:637) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccess Impl.java:276) at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObje ct.java:74) at org.apache.ojb.broker.accesslayer.RsIterator.init(RsIterator.java:183) at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIter atorFactoryImpl.java:58) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery( PersistenceBrokerImpl.java:1780) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Pe rsistenceBrokerImpl.java:1321) at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que ryReferenceBroker.java:104) at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que ryReferenceBroker.java:203) at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que ryReferenceBroker.java:223) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Pe rsistenceBrokerImpl.java:1205) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQu ery(DelegatingPersistenceBroker.java:331) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQu ery(DelegatingPersistenceBroker.java:331) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.loadByExa mple(OJBDataConnection.java:608) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.loadByExa mple(OJBDataConnection.java:595) at com.transcore.placid.lookup.AppLookupData.popSysParams(AppLookupData.jav a:2154) at com.transcore.placid.lookup.AppLookupData.populate(AppLookupData.java:38 8) at com.transcore.placid.lookup.AppLookupData.init
RE: Oracle OJB error
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, 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 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 STEM_PARAMETER_ID,A0.MODIFY_USER_DB FROM SYSTEM_PARAMETER A0 WHERE A0.SYSTEM_ID = ?,null,,swav,123,2005-12-09 14:42:51.649 13984 2005-12-09 14:42:51,649 ERROR - OJB: Platform dependend failure,null,,swav,123,2005-12-09 14:42:51.649 org.apache.ojb.broker.platforms.PlatformException: Could not set escape processing at org.apache.ojb.broker.platforms.PlatformOracleImpl.afterStatementCreate( PlatformOracleImpl.java:63) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:333) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:223) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt (StatementsForClassImpl.java:167) at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement( StatementManager.java:637) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccess Impl.java:276) at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObje ct.java:74) at org.apache.ojb.broker.accesslayer.RsIterator.init(RsIterator.java:183) at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIter atorFactoryImpl.java:58) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery( PersistenceBrokerImpl.java:1780) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Pe rsistenceBrokerImpl.java:1321) at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que ryReferenceBroker.java:104) at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que ryReferenceBroker.java:203) at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que ryReferenceBroker.java:223) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Pe rsistenceBrokerImpl.java:1205) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQu ery(DelegatingPersistenceBroker.java:331) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQu ery(DelegatingPersistenceBroker.java:331) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.loadByExa mple(OJBDataConnection.java:608) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.loadByExa mple(OJBDataConnection.java:595) at com.transcore.placid.lookup.AppLookupData.popSysParams(AppLookupData.jav a:2154) at com.transcore.placid.lookup.AppLookupData.populate(AppLookupData.java:38 8) at com.transcore.placid.lookup.AppLookupData.init(AppLookupData.java:358) at com.transcore.placid.lookup.AppLookupData.getSubInstance(AppLookupData.j ava:323) at com.transcore.placid.util.file.FileSupport.getImageServerUrl(FileSupport .java:110) at com.transcore.placid.util.file.FileSupport.imageBeansPathToUrl(FileSuppo rt.java:81) at com.transcore.placid.util.file.FileSupport.pathToUrl(FileSupport.java:55 ) at com.transcore.bland.ui.queue.plate.PlateTypeSelectDelegate.loadFrontImag ePaths(PlateTypeSelectDelegate.java:151) at com.transcore.bland.ui.queue.plate.PlateTypeSelectDelegate.load(PlateTyp eSelectDelegate.java:103) at com.transcore.bland.ui.queue.plate.PlateTypeSelectDelegate.next(PlateTyp eSelectDelegate.java:74) at com.transcore.bland.ui.queue.plate.PlateTypeSelectDelegateTester.test_ne xt(PlateTypeSelectDelegateTester.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208
RE: Oracle OJB error
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 doing something Oracle does not want it to do? Thanks -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Friday, December 09, 2005 1:29 PM To: OJB Users List Subject: Re: Oracle OJB error 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 new PlatformException(Could not set escape processing, e); } } have you tried stmt.setEscapeProcessing(true) on a prepared statement without using ojb ? jakob Ferrer, Eric schrieb: 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 dbms=Oracle jdbc-level=3.0 driver=oracle.jdbc.driver.OracleDriver protocol=jdbc sub-protocol=oracle db-alias=thin:@XX.X.XX.XX::VPSu user=security password=* eager-release=false ConnectionPoolDescriptor={whenExhaustedAction=0, validationQuery=SELECT 1 FROM DUAL, maxIdle=-1, maxActive=256, maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false, minEvictableIdleTimeMillis=60, testOnReturn=false, logAbandoned=false, removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, testOnBorrow=true} batchMode=false useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE ignoreAutoCommitExceptions=false sequenceDescriptor=null ] 38359 2005-12-08 16:27:48,455 DEBUG - OJB: SQL:INSERT INTO LOG (LOG_ID,LOG_DTIME,LOG_LEVEL,MESSAGE,SESSION_ID,LOG_USER,MODULE,SOURCE,EX CEPTION,CREATE_USER,CREATE_DTIME,MODIFY_USER,MODIFY_DTIME,MODIFY_USER_DB ,DATA_TAG) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ,null,,swav,112233,2005-12-08 16:27:48.455 38468 2005-12-08 16:27:48,564 ERROR - OJB: Platform dependend failure,null,,swav,112233,2005-12-08 16:27:48.564 org.apache.ojb.broker.platforms.PlatformException: Could not set escape processing at org.apache.ojb.broker.platforms.PlatformOracleImpl.afterStatementCreate( PlatformOracleImpl.java:63) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:333) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:223) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt (StatementsForClassImpl.java:167) at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement( StatementManager.java:637) at org.apache.ojb.broker.util.BrokerHelper.doesExist(BrokerHelper.java:628) at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker Impl.java:679) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP ersistenceBroker.java:174) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP ersistenceBroker.java:174) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.save(OJBD ataConnection.java:825) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.save(OJBD ataConnection.java:798) at com.transcore.premise.measure.logger.db.DbLoggerDelegate.commit(DbLogger Delegate.java:162) at com.transcore.premise.measure.logger.db.DbLoggerDelegate$DbLogWriteTask. run(DbLoggerDelegate.java:45) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382) Any thoughts what could be causing this error? The application continues to run, but this error continues to repeat itself - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Oracle OJB error
: Attempt to set Escape Processing after SQL is already processed at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:12 5) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:16 2) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:22 7) at oracle.jdbc.driver.OracleSql.setEscapeProcessing(OracleSql.java:343) at oracle.jdbc.driver.OraclePreparedStatement.setEscapeProcessing(OraclePre paredStatement.java:3190) at com.p6spy.engine.spy.P6Statement.setEscapeProcessing(P6Statement.java:18 1) at org.apache.commons.dbcp.DelegatingPreparedStatement.setEscapeProcessing( DelegatingPreparedStatement.java:213) at org.apache.commons.dbcp.DelegatingPreparedStatement.setEscapeProcessing( DelegatingPreparedStatement.java:213) at org.apache.ojb.broker.platforms.PlatformOracleImpl.afterStatementCreate( PlatformOracleImpl.java:59) ... 44 more -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Friday, December 09, 2005 1:54 PM To: OJB Users List Subject: Re: Oracle OJB error 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 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 doing something Oracle does not want it to do? Thanks -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Friday, December 09, 2005 1:29 PM To: OJB Users List Subject: Re: Oracle OJB error 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 new PlatformException(Could not set escape processing, e); } } have you tried stmt.setEscapeProcessing(true) on a prepared statement without using ojb ? jakob Ferrer, Eric schrieb: 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 dbms=Oracle jdbc-level=3.0 driver=oracle.jdbc.driver.OracleDriver protocol=jdbc sub-protocol=oracle db-alias=thin:@XX.X.XX.XX::VPSu user=security password=* eager-release=false ConnectionPoolDescriptor={whenExhaustedAction=0, validationQuery=SELECT 1 FROM DUAL, maxIdle=-1, maxActive=256, maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false, minEvictableIdleTimeMillis=60, testOnReturn=false, logAbandoned=false, removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, testOnBorrow=true} batchMode=false useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE ignoreAutoCommitExceptions=false sequenceDescriptor=null ] 38359 2005-12-08 16:27:48,455 DEBUG - OJB: SQL:INSERT INTO LOG (LOG_ID,LOG_DTIME,LOG_LEVEL,MESSAGE,SESSION_ID,LOG_USER,MODULE,SOURCE,EX CEPTION,CREATE_USER,CREATE_DTIME,MODIFY_USER,MODIFY_DTIME,MODIFY_USER_DB ,DATA_TAG) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ,null,,swav,112233,2005-12-08 16:27:48.455 38468 2005-12-08 16:27:48,564 ERROR - OJB: Platform dependend failure,null,,swav,112233,2005-12-08 16:27:48.564 org.apache.ojb.broker.platforms.PlatformException: Could not set escape processing at org.apache.ojb.broker.platforms.PlatformOracleImpl.afterStatementCreate( PlatformOracleImpl.java:63) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:333) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:223) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt (StatementsForClassImpl.java:167) at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement( StatementManager.java:637) at org.apache.ojb.broker.util.BrokerHelper.doesExist(BrokerHelper.java:628) at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker Impl.java:679) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP ersistenceBroker.java:174) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP ersistenceBroker.java:174
Oracle OJB error
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 dbms=Oracle jdbc-level=3.0 driver=oracle.jdbc.driver.OracleDriver protocol=jdbc sub-protocol=oracle db-alias=thin:@XX.X.XX.XX::VPSu user=security password=* eager-release=false ConnectionPoolDescriptor={whenExhaustedAction=0, validationQuery=SELECT 1 FROM DUAL, maxIdle=-1, maxActive=256, maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false, minEvictableIdleTimeMillis=60, testOnReturn=false, logAbandoned=false, removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, testOnBorrow=true} batchMode=false useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE ignoreAutoCommitExceptions=false sequenceDescriptor=null ] 38359 2005-12-08 16:27:48,455 DEBUG - OJB: SQL:INSERT INTO LOG (LOG_ID,LOG_DTIME,LOG_LEVEL,MESSAGE,SESSION_ID,LOG_USER,MODULE,SOURCE,EX CEPTION,CREATE_USER,CREATE_DTIME,MODIFY_USER,MODIFY_DTIME,MODIFY_USER_DB ,DATA_TAG) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ,null,,swav,112233,2005-12-08 16:27:48.455 38468 2005-12-08 16:27:48,564 ERROR - OJB: Platform dependend failure,null,,swav,112233,2005-12-08 16:27:48.564 org.apache.ojb.broker.platforms.PlatformException: Could not set escape processing at org.apache.ojb.broker.platforms.PlatformOracleImpl.afterStatementCreate( PlatformOracleImpl.java:63) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:333) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen t(StatementsForClassImpl.java:223) at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt (StatementsForClassImpl.java:167) at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement( StatementManager.java:637) at org.apache.ojb.broker.util.BrokerHelper.doesExist(BrokerHelper.java:628) at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBroker Impl.java:679) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP ersistenceBroker.java:174) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingP ersistenceBroker.java:174) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.save(OJBD ataConnection.java:825) at com.transcore.nucleus.persist.connection.ojb.OJBDataConnection.save(OJBD ataConnection.java:798) at com.transcore.premise.measure.logger.db.DbLoggerDelegate.commit(DbLogger Delegate.java:162) at com.transcore.premise.measure.logger.db.DbLoggerDelegate$DbLogWriteTask. run(DbLoggerDelegate.java:45) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382) Any thoughts what could be causing this error? The application continues to run, but this error continues to repeat itself