JDBC Connectivity Slows to a Halt
Not sure if this is the correct forum but this is the issue. We are running an in-house java application that runs in Tomcat on an HP-UX server. Also on the same server is the Oracle 10g DB that the app connects to. After a period of heavy user activity, 3-5 hours, the connection between the app and the DB seems to grind to a halt. I see no errors in the Listener log nor the alert log. The server is not having any memory or CPU usage issues. I can access the DB through SqlPlus without any problems, just connecting from Tomcat to the DB slows. After killing and restarting Tomcat, everything seems to run OK again. Any ideas or insights would be greatly appreciated.
A kind of stupid question, but are you sure you're really closing the JDBC connections correctly in your application?
Else, I'm sure that this isn't the correct user forum for this question. You might want to try a database forum, but you'll most probably get best responses in a Tomcat forum.
Regards,
Martin
Similar Messages
-
JDBC Connection Reset when using many processes on 64 bit system
Hi,
we've a annoying JDBC connection problem since we migrated our Java server to a 64 bit operating system. Here our environment.
Database Machine:
Oracle 10g
Linux 32 Bit (but same problem on 64 Bit)
Application Servers Machine:
JDBC driver 11.1.0.6
SUN Java 1.6.0_06 64bit
Linux 64 bit (SLES 10 SP2)
We have 6 different Java server processes (but with the same code) which all create some connections to the same database (running on a different Hardware). All 6 Java server processes starting at the same time (via scripts).
Everything was fine, until we migrated the application server machine from 32 bit Linux to 64 bit Linux. From this day on, the half (or one more or less) of our application server processes can't longer connect to the database. The application server processes which have the problem product the following stack trace:
java.sql.SQLRecoverableException: I/O Exception: Connection reset
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:281)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:118)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:224)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:296)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:611)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:455)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:494)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:199)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at com.aaaa.utils.db.DbConnectionPool.<init>(DbConnectionPool.java:130)
It looks like a network problem with the system but all other network stuff works without problems, between the two machines.
- We use the thin JDBC driver (no OCI)
- No firewalls are active on both systems
- Both systems are in the same subnet connected to the same switch
- The DNS configuration on both systems are ok (forward and reverse)
- We've found the same problem on different application-server/database-server pairs with 64 bit application server hardware - but not all of our 64 bit server systems have this problem.
- When running application server process and database on the same system (connecting via localhost) the problem does not longer appear.
- The same database machine connected from a 32 bit application server (with 6 different java processes starting at the same time) works without a problem.
We've tried a lot of things to isolate the problem - but with no success.
- Same problem with SUN Java 1.6.0_06 32 bit (on 64 bit Linux)
- Same problem with SUN Java 1.6.0_15 (32 and 64 bit)
- Played with some JDBC connection properties (oracle.jdbc.TcpNoDelay, oracle.jdbc.ReadTimeout, oracle.net.CONNECT_TIMEOUT, oracle.net.disableOob, oracle.jdbc.RetainV9LongBindBehavior, oracle.jdbc.StreamChunkSize) without a positive result.
- We've updated Linux network driver
- We've changed to an completeky other NIC
- We've tried an other Linux 64 distribution
- We've increased the PROCESSES parameter in the init.ora
- We've tried the JDBC driver 11.1.0.6
- We've tried the _g version of the JDBC driver, but the debugging output simply tell us "Connection Reset" without a hint why.
- We've tried a more complex JDBC connect string (
"jdbc:oracle:thin:@(DESCRIPTION=" +
"(ADDRESS_LIST=" +
"(ADDRESS=(PROTOCOL=TCP)" +
"(HOST=host)" + =
"(PORT=port)" +
")" +
")" +
"(CONNECT_DATA=" +
"(SERVICE_NAME=sid)" +
"(SERVER=DEDICATED)" +
")" +
Nothing of this things helped us to isolate the problem.
When we start our application server processes with a long pause (>1 min) between every process start. The problem does not occure. When we start only one application server with the same number of connections as the 6 different application server processes, everything works fine.
We have absolute no idea why
- this only occures on 64 bit Linux
- independent if it's a 32 bit or 64 bit JVM
- does not occure on all 64 bit application server machines / database machine pairs
- never occure on the same 64 bit app server hardware when using a 32 bit Linux
- using the Oracle JDBC 10g driver (10.xxx) there is no problem (but because of other issues, we need to use the JDBC 11g driver)
Does anybody has an idea what our problem is?
Thanks in advance,
greetingsI was recently struggling with this exact same problem. I opened a ticket with Oracle and this is what they told me.
java.security.SecureRandom is a standard API provided by sun. Among various methods offered by this class void
nextBytes(byte[])
is one. This method is used for generating random bytes. Oracle 11g JDBC drivers use this API to generate random number during
login. Users using Linux have been encountering SQLException("Io exception: Connection
reset").
The problem is two fold
1. The JVM tries to list all the files in the /tmp (or alternate tmp directory set by -Djava.io.tmpdir) when
SecureRandom.nextBytes(byte[]) is invoked. If the number of files is large the
method takes a long time
to respond and hence cause the server to timeout
2. The method void nextBytes(byte[]) uses /dev/random on Linux and on some machines which lack the random
number generating hardware the operation slows down to the extent of bringing the whole login process to
a halt. Ultimately the the user encounters SQLException("Io exception:
Connection reset")
Users upgrading to 11g can encounter this issue if the underlying OS is Linux which is running on a faulty hardware.
Cause
The cause of this has not yet been determined exactly. It could either be a problem in
your hardware or the fact
that for some reason the software cannot read from dev/random
Solution
Change the setup for your application, so you add the next parameter to the java command:
-Djava.security.egd=file:/dev/../dev/urandom
We made this change in our java.security file and it has gotten rid of the error. -
JBO-26061: Error while opening JDBC connection
Hi,
I have pasted this thread in Jdev forum for several days. But I still cannot solve this problem. The ADF application works fine in Jdev 11g's default server. After the login page, it can go to the correct jspx page. I create a new weblogic domain. Then, I deploy the ADF application to this domian. However, after the login page, it cannot go to the correct jspx page and just shows a blank page. I paste the log in this thread.
---------------------AdminServer.log------------part 3---------------------------------
HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, /
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; InfoPath.2)
Connection: Keep-Alive
Cookie: JSESSIONID=pqQvK1Qp41lvrWJng2g4KmmpttQMjYcX6s33BQJJkLgDSzXzJv6M!1351922251
]] Root cause of ServletException.
javax.faces.FacesException: oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'com.sunz.view.wfruntime.pagebean.DaiBanBusinessBean'
at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:67)
at oracle.adfinternal.view.faces.unified.taglib.layout.UnifiedToolbarTag.doStartTag(UnifiedToolbarTag.java:50)
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection
java.sql.SQLException: ORA-01005: null password given; logon denied
---------------------AdminServer-diagnostic.log-----------------------
2009-08-10T10:01:26.296+08:00 AdminServer ERROR] [ http://org.apache.beehive.netui.pageflow.internal.AdapterManager [tid: userId: <anonymous> ecid:
0000IC22UOc2ZNWzLwATOA1AVrxq000000,0 APP: consoleapp ServletContainerAdapter manager not initialized correctly.
According to Shay Shmeltzer's blog (http://radalcove.com/blog/?p=34) and step 25.3.1.3 of http://download.oracle.com/docs/cd/E12839_01/webcenter.1111/e10148/jpsdg_deploy.htm
, I add:
set EXTRA_JAVA_PROPERTIES=-Djps.app.credential.overwrite.allowed=true %EXTRA_JAVA_PROPERTIES%
to setDomainEnv.sh and restart the server as well as redeploy the application. However, after login, the page is still blank and it is very slow.oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection
The JDBC conneciton configured in JDeveloper is not available in WebLogic server. Configure a JDBC connection in WebLogic server. -
Weblogic 8.1 SP 3 JDBC Connections
Hi,
We have configured JDBC connection pool size with initial 1, increment 1 and max is 15. We are experiencing slow performance with app sometimes. Some select and update operations taking more than 60 secs which usually takes about 15 secs.
I monitered the app during slowness and there were 3 users using the app that time. And application lost the connection with exchange server. The number of active connections in weblogic console were 4 and 5 sometimes. But when I checked with SQL Server DBA he saw 8 connections coming from application. Is there any possibility that the connections established before were not cleaned causing for this slowness.
When we bounce weblogic server it starts working fine as normal.
Does anyone experienced similar problem? I appreciate if anyone can help me in this.
Thanks,
MaheshEven if it is a very naive question but I just cannot get it worked, what do you mean by using jdk 1.5 on client side?
I guess client side is completely out of WLS so the jdk to be used on the client side is not set in the environment.
However, the Exception Im getting is on the server side, when it tries to run the code automatically generated from Kapow Mashup Server 6.3. That code is embedded in a jar file, but it seems it makes a call to the java.lang.StringBuilder class which as said before, it is only available from jdk 1.5 onwards.
Should I contact Kapow Mashup Server support to see how the sample code is generated or I am missing something?
Regards. -
Servlets and multiple JDBC connections...
Hi Guru's
I want to perform multiple JDBC queries simultaneously from my servlet. Let's say I have a connection pool containing JDBC connections. Now what I want to do is to use each of this connections simultaneously to perform queries in parallel.
What is the best way to do this??? create multiple threads, one for each query, and then collate results when all threads are finished???
Has anyone does this before or know of any links or samples which I can look at??
your help much appreciated...
Many ThanksThanks but further questions....
But take care:
multithreading might only work parallel if there are
multiple processors - otherwise the thread fragments
will be processed one after the other until they are
finished.I agree. My server has multiple processors hence multi-threading.
Why do you need to perform the queries
simultaneously?
wouldn't it work too when you perform the queries one
after the other?To speed up performance. Sequential processing is too slow at the moment.
Hope you don't try doing so inside one single
database...yes inside a single databse.
Do you have any links to sample example etc..??? Importantly are you aware of any issues when one does this type of multi-threading from servlet. i.e does it clash with servlet's threading model etc...
I am aware of how servlets multithread requests and am quite familiar with them. Just wanted some examples on multithreading JDBC connections from servlets and how I can wait for all threads to finish before collecting results....also wanted to make sure that there are no other issues....
further help will be much appreciated..... -
Caused by java.sql.SQLException: No JDBC connection can be made
Hi,
I am using OSB11g (with soa db adapter ) to select data from DB2 Database. I am trying to just fetch like 100 records(very less).
I get this Exception once in 4-5 tests I do . I am not sure if I have to modify any configurations, in case its timing out .
I see something like *"To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml)."*
I don't see the tables when I try to perform SELECT operation in db adapter. In JDev worksheet I can see the tables and records when queried.
BEA-380002: Invoke JCA outbound service failed with connection error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/SampleOSBEMEA/WSDL/DBOut [ DBOut_ptt::DBOut(DBOutInput_msg,DBOutOutputCollection) ] - WSIF JCA Execute of operation 'DBOut' failed due to: Pure SQL Exception.
Pure SQL Execute of SELECT Column1, Column2 ..........Column216 from Table.
Caused by java.sql.SQLException: No JDBC connection can be made
because the transaction state is
Rolledback.
; nested exception is:
BINDING.JCA-11633
Pure SQL Exception.
Caused by java.sql.SQLException: No JDBC connection can be made
because the transaction state is
Rolledback.
The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead. This exception is considered retriable, likely due to a communication failure. Because the global transaction is rolling back the invoke must be retried in a new transaction, restarting from the place of the last transaction commit. To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml).
The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead. This exception is considered retriable, likely due to a communication failure. Because the global transaction is rolling back the invoke must be retried in a new transaction, restarting from the place of the last transaction commit. To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml).
at oracle.tip.adapter.db.exceptions.DBResourceException.createXARetriableException(DBResourceException.java:670)
at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:642)
at oracle.tip.adapter.db.exceptions.DBResourceException.pureSQLException(DBResourceException.java:711)
at oracle.tip.adapter.db.puresql.PureSQLInteraction.executePureSQL(PureSQLInteraction.java:625)
at oracle.tip.adapter.db.DBInteraction.executePureSQL(DBInteraction.java:1146)
at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:254)
at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:529)
... 63 more
Caused by: java.sql.SQLException: No JDBC connection can be made
because the transaction state is
Rolledback
at weblogic.jdbc.jts.Driver.newConnection(Driver.java:949)
at weblogic.jdbc.jts.Driver.createLocalConnection(Driver.java:327)
at weblogic.jdbc.jts.Driver.connect(Driver.java:173)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:327)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:291)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:558)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1433)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:302)
at oracle.tip.adapter.db.DBConnection.getTopLinkSQLConnection(DBConnection.java:333)
at oracle.tip.adapter.db.transaction.DBTransaction.beginInternal(DBTransaction.java:126)
at oracle.tip.adapter.db.puresql.PureSQLInteraction.executePureSQL(PureSQLInteraction.java:171)
... 66 more
Should I increase the time interval in weblogicra.xml (DEV/wls1034/middleware/Oracle_OSB1/lib/external/adapters/META-INF)
for <wls:connection-reserve-timeout-seconds>5</wls:connection-reserve-timeout-seconds>
Thanks
Edited by: soauser on Jul 6, 2011 10:02 AMLooks like either database is too slow or data-source is not functioning properly. Make sure to test data source and see if it is in running state and it has sufficient number of connections (you may increase max connections value). Actually transaction is getting rolled back because it could not get connection in specified time period (may be JTA/statement timeout).
Cross post in Weblogic JDBC forum as well for expert's advice -
WebLogic Server - JDBC
You may consider raising a case with support as well.
Regards,
Anuj -
JDBC Connection taking way too long
Hi,
I have an odd problem which has just started to happen. I am creating a very simple JDBC connection to the MS SQL Server database using the Microsoft JDBC driver. This has always worked for me in the past and has never caused any problems. Now, however, creating a connection to my database is taking about 20 seconds! This is usually a sub-second operation. I have tried to narrow down the cause, but everything I have tried has failed. Here are all the things I have tried so far:
1. Using a different JDBC driver (several, including the ODBC bridge)
2. Create a test app which just has my connection code and run this from different machines on the network under different JDKs
3. Re-installed by SQL Server database
4. Connected using IP address rather than machine name (in case it was a DNS issue of some sort)
5. Connected using different login accounts
6. Vertified connectivity using telnet (port 1433)
7. Verified connectivity via ODBC in an ASP page
If I telnet to the SQL Server service I can connection without any delay. I can also connect immediately using an ODBC connection via an ASP page, so I don't think it's a problem with my database. I just seems that connectivity from Java land of woefully slow. I have never had this problem before, it's only started happening recently. The only thing that has changed recently is that I signed up for a new ADSL provider, but I can't see how this could have any bearing as all the machines are internal and connected by a 100Mbps router!
Here's the code I am using to test...
long current = System.currentTimeMillis();
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://<server-ip>:1433;User=<usr>;Password=<pwd>", null);
System.out.println(System.currentTimeMillis() - current);
connection.close();This gives me times of about 20 seconds.
Help!You are right.. but the fact that:
a) I can telnet and connect instantly
b) The jdbc-odbc bridge connects immediately
.. tells me that the network is ok.. at least for native functions. The only consistency I can find is that native (windows) functions connect without any issue, but pure Java functions experience problems. It may well be an issue with my network, but it seems that the issue is isolated to the Java environment (guessing here).
I tested this theory by simply opening a socket connection from Java, but has not problems (connected immediately).
I tried switching on the debug messages in the DriverManager (DriverManager.setLogWriter(writer))... this didn't tell me anything.
... The ONLY thing I can think of trying is disconnecting from my ADSL router and trying a simple cross-over cable from one machine to the other.
Thanks for your help though. -
UI Shell template - jdbc connections
We are using UI shell for our app so we could open mutliple tabs in the application, each tab opens a bounded Task flow with "Always Begin new Transaction" and "No Share Data Control". We limit total no of tabs that a user can be open to 10.
The problem is because of "Always Begin new Transaction" the data Control (Frame) is holding a DB connection for each tab, so potentailly each user can user or an AM instance can hold up to 10 DB connections.
My question is , IS there away to release DB connection of Data Control (Frame) when the TAB is not active and DB connection for the TAB this currently active, so we can limit the no of DB connections for the app?
Thanks
RameshHi Ramesh
Your conclusions here on why your app is taking is taking out 10 connections is nearly right, but it's the isolated data control scope that causes this, not the Always Begin New Transaction option. Please consult the paper "ADF Task Flow Transaction Fundamentals" and the 3 relating demos on the ADF Architecture Square to get a solid understanding of this:
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfarchitect-1639592.html
Those options alone don't control that the connections will be pinned to a particular user session. You'll be familiar that ADF BC Application Module pool parameter control how the AMs activate/passivate, connect to the database and so on. One option to pay attention to is the jbo.doconnectionpooling option (which is false by default).
This poorly named options would be better named "Disconnect Application Module Upon Release". What it does when false:
* AM will attempt to hang onto JDBC connection when finished working with request
* JDBC connection can keep open prepared statements over check in/out from pool
* If AM is given to new user, rollback called to clear state + AM prepareSession()
* Faster performance for users assuming they get served same AM
* But limits scalability, connections are pinned to AM
What it does when true:
* AM will drop JDBC connections on completion of request
* Increases scalability, connections can be reused
* Forces activation/passivation for every request
* AM prepareSession() called every new request
* User performance is slower as prepared statements aren’t cached
As such you might want to consider setting this to true.
Regards,
CM. -
TxDataSource vs JDBC Connection
WLS Version: 7.0.
We have noticed the DB related activity is VERY SLOW when using the connections
from the TxDataSource compared to the direct JDBC Connections. And classes12.zip
is in our server class path. I have noticed some related postings but I did not
find any solution. Is there anything wrong with our config.
This is our TxDataSource configuration.
<JDBCConnectionPool
CapacityIncrement="2"
DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="10"
LoginDelaySeconds="1"
MaxCapacity="10"
Name="oraclePool"
Password="XXXXX"
Properties="user=XXXXXX"
RefreshMinutes="10"
ShrinkPeriodMinutes="15"
ShrinkingEnabled="true"
Targets="softfaceserver"
TestConnectionsOnRelease="false"
TestConnectionsOnReserve="false"
TestTableName="dual"
URL="jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:oracle"
/>
<JDBCTxDataSource
JNDIName="jdbc/softfaceDB"
Name="Softface-DataSource"
PoolName="oraclePool"
Targets="softfaceserver"
EnableTwoPhaseCommit="true"
/>Keshore wrote:
WLS Version: 7.0.
We have noticed the DB related activity is VERY SLOW when using the connections
from the TxDataSource compared to the direct JDBC Connections. And classes12.zip
is in our server class path. I have noticed some related postings but I did not
find any solution. Is there anything wrong with our config.Hi, there's nothing wrong with the config. Where/how are you using JDBC connections?
Are they in external client programs or are they in serverside code? Are you running
UserTransactions, such as in transactional EJBs etc?
Joe
>
This is our TxDataSource configuration.
<JDBCConnectionPool
CapacityIncrement="2"
DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="10"
LoginDelaySeconds="1"
MaxCapacity="10"
Name="oraclePool"
Password="XXXXX"
Properties="user=XXXXXX"
RefreshMinutes="10"
ShrinkPeriodMinutes="15"
ShrinkingEnabled="true"
Targets="softfaceserver"
TestConnectionsOnRelease="false"
TestConnectionsOnReserve="false"
TestTableName="dual"
URL="jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:oracle"
/>
<JDBCTxDataSource
JNDIName="jdbc/softfaceDB"
Name="Softface-DataSource"
PoolName="oraclePool"
Targets="softfaceserver"
EnableTwoPhaseCommit="true"
/> -
Error while creating a report that uses Oracle OCI JDBC connectivity
Please let me know why my CR and LF characters are removed from my forum posting *****
Hi,
I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip". I have successfully created a JDBC OCI connection.
The connection parameters are given below:
URL: jdbc:oracle:oci8:@xe
Database: xe
username: <userName>
password: <password>
I have tested the above connection in Data source Explorer and it works fine!!!
But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here? Any help is highly appreciated.
com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks
Karthik
Edited by: KARTHIK1 on Oct 14, 2009 9:38 PMHi Ted,
Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI. It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
1) Can you please let me know if there is a way to do this?
2) Will it allow data sources using native database driver?
3) If so, can I use JRC to create these reports from a desktop java program?
Thanks & Regards
Karthik
Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM -
Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2
Hello,
I am experiencing an issue with pinging a JDBC connection Pool.
I installed the following without any warnings or errors:
Operating System: Oracle Enterprise Linux 5
Oracle XE 11gR2 (11.2.0.2.0) database
Glassfish 3.1.2.2
I will refer to the steps I did after the installations
1) In the .profile file of the OS I add the following:
JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
GLASSFISH_DIR=/u01/glassfish3
GLASSFISH_HOME=/u01/glassfish3/glassfish
DERBY_HOME=$GLASSFISH_DIR/javadb
OPEN_MQ_HOME=$GLASSFISH_DIR/mq
PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
export GLASSFISH_HOME
export DERBY_HOME
export OPEN_MQ_HOME
export PATH
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib
3) I login to the Glassfish admin console and created a new JDBC Connection Pool.
Pool Name: ds_orasys
Resource Type: javax.sql.DataSource
Datasource Classname: oracle.jdbc.pool.OracleDataSource
User: [myschema]
Password: [myschema password]
URL: jdbc:oracle:thin:@localhost:1521:xe
When I ping the connection pool I get the following message in the server log:
[#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]
[#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]
I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.
I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log
Can anybody help me out or point me to the right direction.
Thank you in advanceThe error is in the URL. It was in front of my eyes and I couldn't see the error. I skipped the ':' before the '@' when I created the pool. It is working fine now.
-
JDBC Connection pool recovery after DB server restart
I am finding that Kodo is throwing the following exception after I restart
my database server (mysql). I am doing the database server restart while my
application server is idle, so it is not during a transaction.
Communication link failure: java.net.SocketException [code=0;state=08S01]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
This is presumably due to the JDBC connection pooling. Is there a
configuration setting that allows Kodo to detect such failures and reconnect
to the database server without exposing this problem to the application
code? For example, WebLogic Server's JDBC connection pool has a setting that
enables testing a connection and recovering from such failures before
allocating it from the pool.
BenThis is presumably due to the JDBC connection pooling. Is there a
configuration setting that allows Kodo to detect such failures and reconnect
to the database server without exposing this problem to the application
code?Not right now. You can log an enhancement request with our bug database:
http://bugzilla.solarmetric.com/ -
JDBC connection pool failures when used by JMS stores
We are using WebLogic 6.1 sp2. We defined a separate connection pool for use by
a JMS Store.
<JDBCConnectionPool Name="sybaseJMSPool"
Targets="cluster00"
InitialCapacity="2"
MaxCapacity="10"
DriverName="com.sybase.jdbc2.jdbc.SybDriver"
Properties="[email protected]@;[email protected]@;charset=utf8"
URL="jdbc:sybase:Tds:@jms.db.host@/@jms.db.name@"/>
(note that the @xxx@ string are replaced by actual values).
We are using Sybase Jconnect 5.5 to a Sybase ASE 12.5 database.
We deployed this configuration on a number of environments (testing, staging,
..). The actual hardware and network configuration is different for the different
system, but the WebLogic domain stays the same regarding this issue.
On the test system we frequently get the following exceptions:
<Aug 13, 2002 1:56:04 PM CEST> <Alert> <JMS> <www00-test> <node00>
<ExecuteThread: '6' for queue: 'JMS.TimerClientPool'> <> <> <040048>
<JMSServer "JMSServer00", store failure while writing message for topic
OrderChangeTopic, java.io.IOException: JMS JDBC store, connection pool =
<sybaseJMSPool>, prefix = <JMS00>: write failed
java.sql.SQLException: JZ006: Caught IOException:
com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
closed.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
(ErrorMessage.java:715)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
(SybStatement.java:1625)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
(SybPreparedStatement.java:91)
at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
(P6LogPreparedStatement.java:179)
at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
.>
java.io.IOException: JMS JDBC store, connection pool = <sybaseJMSPool>, prefix
= <JMS00>: write failed
java.sql.SQLException: JZ006: Caught IOException:
com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
closed.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
(ErrorMessage.java:715)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
(SybStatement.java:1625)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
(SybPreparedStatement.java:91)
at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
(P6LogPreparedStatement.java:179)
at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
at weblogic.jms.store.JDBCIOStream.throwIOException
(JDBCIOStream.java:1213)
at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1256)
at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Before that this message appeared:
<Aug 13, 2002 11:31:16 AM CEST> <Error> <ConnectionManager> <www00-test>
<node00> <ExecuteThread: '26' for queue: 'default'> <> <> <000000>
<Closing: 'weblogic.rjvm.t3.T3JVMConnection@795af6' because of: 'Server
received a message over an uninitialized connection: 'JVMMessage from: 'null'
to: '-4555218188801970213S:192.168.13.1:[7001,7001,7002,7002,7001,7002,-
1]:ADIS:node00' cmd: 'CMD_REQUEST', QOS: '101', responseId: '1',
invokableId: '287', flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev
offset: '34'''>
This problem did not occur on another system which was used during a 2 day stress
testing session.
It seems that the problem occurs after a period in which no user request where
made. The user requests trigger EJB's that start sending JMS messages.
When the problem occurs, the JMS messaging systems seems to lock up as no messages
are received anymore by the different listeners (MDBs).
Undeploying and redeploying the JBDC connection pool solves the problem. This
solution is unacceptable in case of a production system.
A similarly defined connection pool, which is used by the EJBs to make database
connection, does not manifest this problem.
<JDBCConnectionPool Name="sybasePool"
Targets="cluster00"
InitialCapacity="10"
CapacityIncrement="5"
MaxCapacity="50"
PreparedStatementCacheSize="150"
DriverName="com.sybase.jdbc2.jdbc.SybDriver"
Properties="[email protected]@;[email protected]@;JCONNECT_VERSION=6;charset=utf8"
URL="jdbc:sybase:Tds:@db.host@/@db.name@"/>
The JDBC connection pool is used as follows by the JDBC store
<JMSJDBCStore ConnectionPool="sybaseJMSPool" Name="JDBCStore00" PrefixName="JMS00"/>
<JMSServer Name="JMSServer00" Store="JDBCStore00" Targets="node00">
<JMSTopic JNDIName="ADIS.JMSError" JNDINameReplicated="false" Name="ErrorTopic"/>
<JMSTopic JNDIName="ADIS.Status"
Name="StatusTopic" RedeliveryDelayOverride="300000"/>
<JMSTopic JNDIName="ADIS.OrderChange" JNDINameReplicated="false"
Name="OrderChangeTopic" RedeliveryLimit="3"/>
</JMSServer>
Turning on the "Test Reserved Connection" with a appropriate test table does not
help.
Some sources on the internet tell us that JZ0C0 errors in the Jconnect driver
can be related to network problems. Nevertheless the connection pool should be
able to cope with this.
Can you provide any solution for this ? Or give us hints what can cause the problem
Zhenhao Qi wrote:
thanks! Joe.
The SQL statement itself can no longer be simplified, the long excuation time is due to the database size and complicated Select criteria. I can easily reproduce the problem by using this SQL. I tried "BEA's Oracle driver (Type 4): Version 8.1.7,9.0.1,9.2.0". the question can be dissect into 2 pieces:
1) why the jdbc connection (using oracle.jdbc.OracleDriver) won't return anything if the SQL execution time > 5min, that is probably the Oracle's problem
2) why the occupied connection pool won't release even I set "Statementtimeout=600", this is Weblogic's problem.
ZhenhaoHi. Yes, (1) is oracle's problem. (2) may also be. The JDBC spec has very few
allowances for one thread to interrupt a second thread's JDBC call. If we
transmit your timeout request by calling setQueryTimeout() on the oracle
statement, and if you have a weblogic-controlled transaction we call
Statement.cancel() on any ongoing statement, we end up relying on whether
the Oracle driver implements and responds to those calls.
Are you doing weblogic-controlled transactions? Are you/can you
call Statement.setQueryTimeout() on your statements, or are these
generated JDBC queries?
If you can duplicate the problem using the weblogic.jdbc.oracle.OracleDriver
we have some other debug avenues. This would be good even if you really
want to use the thin driver, because we will do the same JDBC calls to
either driver, and the debug would prove (if) we set up a query timeout
and if we call cancel(). If we do, then we can know that it is the Oracle
driver failing in these regards.
Joe -
JDBC Connection pools and clusters (is max connection for entire cluster?)
Hi,
Quick question.
When using JDBC connection pools in WAS 6.40 (SP13) in a clustered environment. Are the max connections the number
a)Each application server can use
b)The entire cluster can use
Would believe a), but I'd like it confirmed from someoneelseHi Dagfinn,
your assumption is correct. Therefore, in a cluster environment you'd need to make sure the DB can open <i>Number of nodes X max connections</i>. -
Issues with JDBC Connection Pooling
Hi all,
I'm experiencing some unexpected behaviour when trying to use JDBC Connection Pooling with my BC4J applications.
The configuraiton is -
Web Application using BC4J in local mode
Using Default Connection Stagegy
Stateless Release Mode
Retrieving Application Modules using Configuration.createRootApplicationModule( am , cf );
Returning Application Modules using Configuration.releaseRootApplicationModule( am, false );
Three application modules
AppModuleA - connects to DatabaseConnection1
AppModuleB - connects to DatabaseConnection2
AppModuleC - connects to DatabaseConnection2
My requirement is to -
Use App Module Pooling and have individual pool for each Application Module
Use JDBC Pooling and have individual pool for each Database connection
Note: All configuration was achieved in design mode (i.e. right clicking AppModule->Configurations...)
1. Initial approach -
In the configuration for each Application Module I specified the connection type as 'JDBC Datasource' and specified to approriate datasource.
Tried setting doConnecitonPooling to 'true' as well as 'false'
In the data-sources.xml I specified all the appropriate info including min-connections and max-connections.
I would expect, with the above config that BC4J would use OC4J's built in JDBC connection pooling.
2. Second approach -
In the configuration for each Application Module I specified the connection type as JDBC URL.
In the configuration I specified doConnectionPooling = 'true' as well as the max connection, max available and min available
What I experienced in both cases was that the max connections seem to be ignored as the number of connection as reported by the database (v$session) was exceeded by more than 10.
In addition to this once the load was removed the number of JDBC connecitons did not drop (I would have expected it to drop to max available connections)
My questions are -
1. When specifying to use a 'JDBC Datasource' style of connection, is it in fact OC4J that is then responsible for pooling JDBC connections? And in this case should BC4J's doConnectionPooling parameter be set to true or false?
2. Are there any known issues with the use of the JDBC Conneciton Pool as stated by the above to approaches?Thanks for the additional info. Please see my comments. below.
Sorry should have been more specififc -
1. Is each application pool using a different JDBC user? You mentioned DatabaseConnection1 and DatabaseConnection2
above; are these connections to different schemas / users? If so, BC4J will create a separate connection pool for each
JDBC user. Each connection pool will have its own maximum pool size.
Each 'DatabaseConnection' refers to a different database, actually hosted on a seperate physical server, different
schema and different user.BC4J will maintain a separate connection pool for each permutation of JDBC URL / schema. If each user is connecting
to a different DB instance then I would expect no greater than 10 DB sessions. However, if a DB instance is hosting
more than user then I would expect greater than 10 DB sessions (though still no more than 10 DB sessions per user).
2. Are all the v$session sessions related to the JDBC clients? There should be at least one additional database
session which will be related to the session that is querying v$session.
When querying the v$session table I specifically look for connections from the user in quesiton and from the machine
name in question and in doing so eliminate the database system's connections, as well as the query tools'
connection. One area I'm not sure about is the connection BC4J uses to write to its temporary tables. I am using
Stateless release mode and have not explicetly stated to save to the database but I'm wondering if it still does if so
and how does it come into the equation with max connections?BC4J's internal connections are also pooled and the limits apply as mentioned above. So, if you have specified
internal connection info for a schema which is different than the users above I would expect the additional conns.
One helpful diagnostic tool, albeit programmatic, might be to print the information about the connection pools after
your test client(s) have finished. This may be accomplished as follows:
// get a reference to the BC4J connection pool manager
import oracle.jbo.server.ConnectionPoolManagerFactory;
import oracle.jbo.server.ConnectionPoolManagerImpl;
import oracle.jbo.pool.ResourcePool;
import java.io.PrintWriter;
import java.util.Enumeration;
// get the ConnectionPoolManager. assume that it is an instance of the supplied manager
ConnectionPoolManagerImpl mgr = (ConnectionPoolManagerImpl)ConnectionPoolManagerFactory.getConnectionPoolManager();
Enumeration keys = mgr.getResourcePoolKeys();
PrintWriter pw = new PrintWriter(System.out, true);
while (keys.hasMoreElements())
Object key = keys.nextElement();
ResourcePool pool = (ResourcePool)mgr.getResourcePool(key);
System.out.println("Dumping pool statistics for pool: " + key);
pool.dumpPoolStatistics(pw);
}
Maybe you are looking for
-
Hi, Due to my brother locking me out of my ipod touch I had to wait an hour to log in again. Unfortunately when I did this, I, again put in the wrong password twice more, each time locking me out for a further 60 minutes. On my 3rd attempt to log i
-
Mouse pointer moves but system freezes
I had this problem for the past 2 months. What would happen, was that anything I tried to do by clicking mouse pointer would not work. Pointer would move, but that was it. If I hit ctrl/alt/del, then cancel, it would recover and work fine for a whil
-
Folders and images not in alphabetical order
hello. any idea why all of a sudden all my images and folders are not in alphabetical order. everytime you re-name or add a file to photoshop it detects and goes in order. now ive got to search to see where that file is. thanks. phil.
-
Hi there, My phaser 6125 is printing in grey rather than black. I've tried the following: - replace the cartridge - run all the admin tests through the menu, refresh the drum etc etc - cleaned the housing for the cartridge - cleaned the housing once
-
Import Live Video into LabVIEW
I am an electrical engineering working on my senior project at Western New England College. I am working with a small team building a quadrotor UAV and part of my task is to add some image processing to the craft. I have the algorithm to do the proce