Tomcat/Comnmons DBCP/Oracle RAC
Does anybody know if the commons pooling used in Tomcat will work with RAC 10g?
I've asked this question elsewhere but don't seem to be getting anybody who knows for sure.
My impression is that special coding would be required in the initialization of the datasource to use RAC and that commons DBCP does not do this.
Can anyone confirm or refute this?
I'm wanting to do this as well.
I've got a 10g RAC with two nodes. I only want fail-over. I don't want load balancing.
I'm using Tomcat 6.0.20 and DBCP for the DataSource.
Some of the stuff I've been finding in my searches has vaguely suggested that I would need to use an Oracle connection pool in order to get fail-over and DBCP can't be made to work. However, that suggestion is vague, and the references are old, and nobody seems to really know what they're talking about. Some people seem to know Tomcat/DBCP but not Oracle. Some people seem to know Oracle but not Tomcat/DBCP. Most people seem to be searching around in the dark like me. The search for information about this has been frustrating.
This is what I'm thinking:
url="jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=OFF)(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=flvr)))"
The flvr service is set up for both nodes. Will this fail over properly?
Unfortunately, I don't have a test RAC that would allow me to see
what happens when I kill the preferred host (host1).
Similar Messages
-
Updating Oracle BLOBs through Tomcat's DBCP
Hi, I've been using Tomcat's DBCP and I'm trying to cast my ResultSet to an OracleResultSet so I can use the getBLOB message. I've searched and realized I had to take part of it out of the wrapper, so I got the connection out of the wrapper using:
con = ds.getConnection().getMetaData().getConnection();which returned an OracleConnection. However, when I work through the rest of the code, it finally gets to:
BLOB filedata = ((OracleResultSet)oRS).getBLOB("filedata");and it dies with:
java.lang.ClassCastException: oracle.jdbc.driver.OracleResultSetImplIf I connect using JDBC without the DBCP datasource, this code works fine. I'm not sure why I can't cast it to something I can use. Can anyone provide some insight on this? I've searched and searched for solutions and tried so many things, but nothing has worked so far aside from just connecting using JDBC.
The ResultSet is not a DelegatingResultSet, which had tripped me up originally. Once I removed the wrapper from the connection, it seemed to give me all the correct types (OracleConnection, OracleStatement, & OracleResultSetImpl), but I can't seem to use the OracleResultSetImpl.
Here's my method:
public static int store(InputStream in) throws SQLException,IOException {
Connection con = null;
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/develop");
con = ds.getConnection().getMetaData().getConnection();
int id = 17;
String sql = "SELECT file_id,filedata FROM super_files WHERE file_id = "+id+" for update";
//sql = "SELECT file_id FROM super_files";
Statement stmt2 = con.createStatement();
System.out.println("stmt2 class: "+stmt2.getClass());
ResultSet oRS = stmt2.executeQuery(sql);
int key = 0;
if (oRS.next()) {
/* this next line is where it dies */
BLOB fileData = ((OracleResultSet)oRS).getBLOB("filedata");
int bufferSize = fileData.getBufferSize();
byte buffer[] = new byte[bufferSize];
OutputStream os = fileData.getBinaryOutputStream();
int bytesRead = 0;
while ((bytesRead = in.read(buffer)) != -1) {
os.write(buffer, 0, bytesRead);
in.close();
os.close();
oRS.close();
stmt2.close();
con.commit();
return key;
}Hi, I am having the same problem. Were you able to resolve it? Please let me know. I have searched thru the entire WWW but coulnd't find the solution.
-
Java application (tomcat) and Oracle RAC 10gR2
Hi, I have an Oracle RAC 10gR2 (10.2.0.3) on Suse Linux Enterprise Server (3 nodes).
I have several application running on tomcat 5.X and tomcat 6.X with java 1.5 and java 1.6. Sometimes, because of hardware fail, network problems,... one of the nodes fails, and then the other 2 nodes still working and my database is up. However, the most of applications lose the connection with the database, and I must to restart the tomcat. I want to have a system more reliable and robust, and I want to prepare the tomcat's and java application for prevent it. I have read the http://drdobbs.com/java/222700353?pgno=1 and http://db360.blogspot.com/2007/01/is-your-java-application-failoverproof.html. I've been tried the example of the first url, but I don't connect with my database. However, I've probe the sample on another oracle rac (10.2.0.4) and it works. In the samples, it use the ucp.jar (11g) and ons.jar (10g) and ojdbc6.jar (11g driver).
Anyone can help me how can I configure my application for I must not to restart the tomcats??
Thanks you very much!!.The best solution for your problem is ORACLE SUPPORT.. Please raise an SR and coordinate with them.. GoodLuck!
-
Load Balance Problem in Oracle RAC 10.2.0.4 (two nodes with CRS)
Hi all,
I have an Oracle RAC 10.2.0.4 with two nodes and I'm having problems with sessions load balance.
The problem is that all connections are going to the node which is enabled as 'master' in RAC, the node who has located .db resource in CRS.
If .db resource is located in node1 all connections are made in node1. In the same way, all connections are made in node2 when .db resource from CRS stack is located in node2.
The connections are made by a pool in Tomcat 6 using RAC service for made the connections.
Any idea?
Thanks in advance.
Here is an example of my net configuration:
listener.ora in node1:
LISTENER_RAC_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1_vip)(PORT = 1525)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1525)(IP = FIRST))
tnsnames in node1:
LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1_vip)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2_vip)(PORT = 1525))
NODE1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1_vip)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1_vip)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2_vip)(PORT = 1525))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
********************************************************It is my fault.
It was the connection service. I had one one with preferred option and one without it. Now is working well. -
In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?
The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.
-
Hi All
I am installing Oracle RAC 10g 10.2.0.1 on HP-UX B.11.31 U ia64 but can not complete
hosts file
#Public IPs
10.144.1.111 spgdb01
10.144.1.112 spgdb02
#Private IPs
10.144.2.2 spgdb01p
10.144.2.3 spgdb02p
#Virtual IPs
10.144.1.113 spgdb01v
10.144.1.114 spgdb02v
I do installation with runInstaller without error. It copy and link is ok. When I run root.sh then It cannot complete as following
Checking to see if Oracle CRS stack is already configured
Checking to see if any 9i GSD is up
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/oracle/product/10.2.0' is not owned by root
WARNING: directory '/oracle/product' is not owned by root
WARNING: directory '/oracle' is not owned by root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 0: spgdb01 spgdb01p spgdb01
node 1: spgdb02 spgdb02p spgdb02
Creating OCR keys for user 'root', privgrp 'sys'..
Operation successful.
Now formatting voting device: /ora/crs/votedisk01
waitpid(-1, 0x7fffdf50, WUNTRACED) .................................................................................................... [sleeping]
Now formatting voting device: /oracle/oradata1/crs/votedisk02
Now formatting voting device: /oracle/oradata2/crs/votedisk03
Format of 3 voting devices complete.
Startup will be queued to init within 30 seconds.
====================
I have waited for 10 mins but still not complete
Additionally, log from runInstaller, I got
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-04-28_12-13-31AM. Please wait ...-bash-4.2$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.
Private Interconnect : null
Private Interconnect : null
Private Interconnect : null
Private Interconnect : null
So, please help me fix this issue
Thank youI had this problem and resolved it by transporting the file to the installation server with the correct ftp datatype (binary).
On page 54 of the install guide (..Server\Oracle_Business_Intelligence\doc\doc\bi.1013\b31765.pdf) that comes with the installation files, there is an instruction to make sure that any ftp activity is done in binary.
This may not have occured with the license.xml file if you use a tool which offers the "feature" of automatic datatype recognition.
Hope this helps. -
Oracle Upgrade from Oracle RAC 9.2.0.6 to Oracle 10.2.0.4
Hi All,
Currently, we are running 4 node Oracle RAC environment with below mentioned configuration.
OS: Sun Solaris 5.9
Hardware: Sun E2900
Oracle Version: 9.2.0.6
Veritas Cluster Server: 4.1
We want to upgrade Oracle version to 10g, and currently analyzing the options to perform this. The current database size is 1TB appx and we want to spend minimum application shutdown time running on this database.
As part of upgrade, we also need to upgrade Veritas Cluster Server from 4.1 to 5.1 to support Oracle 10g. It would be great help,, if someone can pass some guideline to perform this task.
We are currently thinking about piecemeal approach, where we can upgrade each node individually and then put them back to cluster. There are some complexities involved, and its really high risk approach.
Thanks a lot in advance for help
Regards,
ManojOrcale 10g RAC requires you to install Oracle Clusterware. Oracle Supports running it along side a 3rd party clustering software. Not sure why you're so anxious to upgrade Veritas Clusterware when it will be trivial on the 10g db hosts.
-
Oracle rac templates 11g R2 buildcluster.sh error
Hi All,
am facing below error, while creating oracle rac templates. kindly let us know how to resolve below error.
===error=========================
Oracle RAC 11gR2 OneCommand (v1.2) for Oracle VM - (c) 2010-2011 Oracle Corporation
Cksum: [1170221909 255000 racovm.sh] at Sun Jan 5 04:15:14 EST 2014
Kernel: 2.6.18-194.0.0.0.3.el5xen (i686) [1 processor(s)] 1700 MB
2014-01-05 04:15:14:[printparams:Time :racnode1] Completed successfully in 4 seconds (0h:00m:04s)
2014-01-05 04:15:14:[setsshora:Start:racnode1] SSH Setup for the Oracle user(s)...
INFO (node:racnode1): Running as oracle: /u01/racovm/ssh/setssh-Linux.sh -s -x -c NO -h nodelist -p *** (setup on 2 node(s): racnode1 racnode2)
ERROR: Failed to create temporary file /tmp/setssh-cretmpQY3958 on localhost, can not proceed
Exiting...
ERROR (node:racnode1): Failed to configure passwordless SSH for the oracle user
2014-01-05 04:15:17:[setsshora:Time :racnode1] Completed with errors in 3 seconds (0h:00m:03s), status: 1
2014-01-05 04:15:17:[buildcluster:Time :racnode1] Completed with errors in 58 seconds (0h:00m:58s), status: 1
thanks,
Mike.Try this. It worked for me.
Please keep in mind that you will need wait till each step finishes successfully before move to next one
For Step1 and 2, you can skip node(s) on which you didn't execute root.sh yet.
Step 1: As root, run "$GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force" on all nodes, except the last one.
Step 2: As root, run "$GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode" on last node. This command will zero out OCR and VD disk also.
Step 3: As root, run $GRID_HOME/root.sh on all node one by one -
How to configure Oracle RAC for Wiki and Blog
Has anyone done Oracle RAC configuration for Oracle Wiki and Blogs?
Thanks,
FrankHi Andreas,
Thanks you for your help. I am trying to implement third party external LDAP authentication for APEX and Forms.
So I started with OID and SSO setup to create external Partner Applications. Some reason my oid and sso web login links are not working. I didn't find any errors. I need some help in finding the problem and direction, I already read docs on web but no proper direction. I appreciate your help.
Thanks -
Oracle RAC with ASM install failure
Hi Guy's
I've just rebuilt an Oracle RAC system, i've built this system many times and have the build documented. I usually follow the build doc to the tee and everything works fine. I have now been asked to rebuild the system to go into the production evironment. This is a two server standard RAC setup using ASM. We have a HP MSA500 shared storage setup. I've run the cluster verification tool and all the checks have come out fine. Whilst installing the clusterware i get a failed error message whilst it try's to confiure the Oracle Clusterware Configuration Assistant.
The error message i get is:
Command = C:\Windows\system 32\cmd\C Call E:\Oracle\Product\10.2.0\crs\install\crssetup.config.bat
PROT-1:Failed to intialize OCR Config
STEP 1 Checking status of CRS cluster
STEP 2 Creating directories (E:\Oracle\Product\10.2.0\Crs
STEP 3 Configuring OCR repository
ocr upgrade failed with (-1)
I've done this build many times and never seen this error. From what i've read on the internet it looks like it could be something up with my shared storage but i dont know what.
Any help would be greatly appreciated
Thanks
Leetry to apply ''dd' command against OCR & Voting disks to ensure that their headers are formatted 100% and contains no data from old installation:
dd if=/dev/zero of=YOUR_OCR_DISK bs=1024 count=10000
dd if=/dev/zero of=YOUR_VOTE_DISK bs=1024 count=10000 -
ASM instances on 2 node Oracle RAC 10g r2 on Red Hat 4 u1
Hi all
I'm experiencing a problem in configuring diskgroups under +ASM instances on a two node Oracle RAC.
I followed the official guide and also official documents from metalink site, but i'm stuck with the visibility of asm disks.
I created fake disks on nfs with Netapp certified storage binding them to block device with the usual trick "losetup /dev/loopX /nfs/disk1 " ,
run "oracleasm createdisk DISKX /dev/loopX" on one node and
"oracleasm scandisks" on the other one.
With "oracleasm listdisks" i can see the disks at OS level in both nodes , but , when i try to create and mount diskgroup in the ASM instances , on the instance on which i create the diskgroup all is well, but the other one doesn't see the disks at all, and diskgroup mount fails with :
ERROR: no PST quorum in group 1: required 2, found 0
Tue Sep 20 16:22:32 2005
NOTE: cache dismounting group 1/0x6F88595E (DG1)
NOTE: dbwr not being msg'd to dismount
ERROR: diskgroup DG1 was not mounted
any help would be appreciated
thanks a lot.
AntonelloI'm having this same problem. Did you ever find a solution?
-
How to create a wallet in oracle RAC environment
How to create a wallet in oracle RAC environment.
While running following command "alter system set encryption key identified by "thalesdata4";
I am getting error message "cannot auto create wallet" or "failed to open wallet.
Please suggest correct way to create a wallet in RAC environment.
Thanks
Sudhirhi,
please refer for detailed explanation
Master Note for SSL Configuration in Fusion Middleware 11g [ID 1218695.1]
regards -
OIM 9.1.0.2 - Weblogic JDBC Multi Data Sources for Oracle RAC
Does OIM OIM 9.1.0.2 BP07 support Weblogic JDBC Multi Data Sources (Services>JDBC>Multi Data Sources) for Oracle RAC instead of inserting the "Oracle RAC JDBC URL" on JDBC Data Sources for xlDS and xlXADS (Services>JDBC>Data Sources> xlDS|xlXADS > Connection Poll> URL) ?
If yes, is there are any other modifications that need to be made on OIM, or just changing the data sources?Yes, it's supported. You install against one instance directly of the Rac Server. Then you update the config.xml file and the jdbc resource in your weblogic server with the full rac address. It is documented for installation against RAC. http://docs.oracle.com/cd/E14049_01/doc.9101/e14047/database.htm#insertedID2
-Kevin -
Installing OIM 9.1.0.2 on Oracle RAC
Hello friends,
I have a question about installing Oracle Identity Manager, Oracle Identity Manager need to install 9.1.0.2 as a repository having an Oracle RAC database, my question is: when you run the script prepare_xl_db.sh Do I need to edit this file to prepare the Oracle database on RAC? or can be run without any parameter edit and prepare the Oracle database in RAC
ThanksCheck for Metalink Note: 788789.1
-
Hi all,
Need some help from all out there
In our Sun Cluster 3.1 Data Service for Oracle RAC 9.2.0.7 (Solaris 9) configuration, my team had encountered
ora-29701 *Unable to connect to Cluster Manager*
during the startup of the Oracle RAC database instances on the Oracle RAC Server resources.
We tried the attached workaround by Oracle. This workaround works well for the 1^st time but it doesnt work anymore when the server is rebooted.
Kindly help me to check whether anyone encounter the same problem as the above and able to resolve. Thanks.
Bug No. 4262155
Filed 25-MAR-2005 Updated 11-APR-2005
Product Oracle Server - Enterprise Edition Product Version 9.2.0.6.0
Platform Linux x86
Platform Version 2.4.21-9.0.1
Database Version 9.2.0.6.0
Affects Platforms Port-Specific
Severity Severe Loss of Service
Status Not a Bug. To Filer
Base Bug N/A
Fixed in Product Version No Data
Problem statement:
ORA-29701 DURING DATABASE CREATION AFTER APPLYING 9.2.0.6 PATCHSET
*** 03/25/05 07:32 am ***
TAR:
PROBLEM:
Customer applied 9.2.0.6 patchset over 9.2.0.4 patchset.
While creating the database, customer receives following error:
ORA-29701: unable to connect to Cluster Manager
However, if customer goes from 9.2.0.4 -> 9.2.0.5 -> 9.2.0.6, the problem does not occur.
DIAGNOSTIC ANALYSIS:
It seems that the problem is with libskgxn9.so shared library.
For 9.2.0.4 -> 9.2.0.5 -> 9.2.0.6, the install log shows the following:
installActions2005-03-22_03-44-42PM.log:,
[libskgxn9.so->%ORACLE_HOME%/lib/libskgxn9.so 7933 plats=1=>[46]langs=1=> en,fr,ar,bn,pt_BR,bg,fr_CA,ca,hr,cs,da,nl,ar_EG,en_GB,et,fi,de,el,iw,hu,is,in, it,ja,ko,es,lv,lt,ms,es_MX,no,pl,pt,ro,ru,zh_CN,sk,sl,es_ES,sv,th,zh_TW, tr,uk,vi]]
installActions2005-03-22_04-13-03PM.log:, [libcmdll.so ->%ORACLE_HOME%/lib/libskgxn9.so 64274 plats=1=>[46] langs=-554696704=>[en]]
For 9.2.0.4 -> 9.2.0.6, install log shows:
installActions2005-03-22_04-13-03PM.log:, [libcmdll.so ->%ORACLE_HOME%/lib/libskgxn9.so 64274 plats=1=>[46] langs=-554696704=>[en]] does not exist.
This means that while patching from 9.2.0.4 -> 9.2.0.5, Installer copies the libcmdll.so library into libskgxn9.so, while patching from 9.2.0.4 -> 9.2.0.6 does not.
ORACM is located in /app/oracle/ORACM which is different than ORACLE_HOME in customer's environment.
WORKAROUND:
Customer is using the following workaround:
cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk rac_on ioracle ipc_udp
RELATED BUGS:
Bug 4169291Check if following MOS note helps.
Series of ORA-7445 Errors After Applying 9.2.0.7.0 Patchset to 9.2.0.6.0 Database (Doc ID 373375.1)
Maybe you are looking for
-
"Procurement Wizard" window opens for a particular warehouse while saving Sales Order
Hello All, We have upgraded SAP B1 8.8 to SAP B1 9.0 My client is facing one of problem while saving Sales order using particular warehouse. Actually client is having 4 warehouses (A,B,C,D) in which if they use one particular warehouse "A" for saving
-
Help syncing my new ipod - error message - please help
Hi I am needing advice and help. I have a full library full of songs. I had always been able to sync my old ipod with all my library songs. I have just purchased a new ipod and tried to plug in the new ipod to load all my library songs on to my new i
-
Special (Polish) characters
I use XP Pro sp 1, but the same problem occurs in Poland on different machines with different configs. The application is a terminal emulation application(applet). It concerns an awt.Panel component that listens to keyed input. Usually (using the Mic
-
Reading problems with MS-8340S
When I use Nero CD Speed to check the CD Quality of my discs, no matter what kind of disc, it gives me a result of over 70.000.000 reading errors (this are damaged areas that are still readable). Similarily, the scandisc feature gives me 100% DAMAGED
-
My card has been charged fraudulently for making a SKYPE call. I have NEVER registered payment details with SKYPE. Further I dont seem to be able to access a secure email or contact details with SKYPE to report this fraud. This is outrageous. I have