Use listener to connect to database

i want to use a listener to connect to an oracle database in tomcat 4, in my application web.xml y type:
<listener>
<listener-class>
ResourceManagerListener2
</listener-class>
</listener>
the class ResourceManagerListener2 which is in my web-inf/classes:
import javax.servlet.*;
import javax.servlet.http.*;
import oracle.jdbc.pool.*;
public class ResourceManagerListener2 implements
     ServletContextListener {
     private OracleConnectionCacheImpl ds = null;
     public void contextInitialized(ServletContextEvent sce) {
          ServletContext application = sce.getServletContext( );
          String jdbcURL = application.getInitParameter("jdbcURL");
          String user = application.getInitParameter("user");
          String password = application.getInitParameter("password");
          String maxLimit = application.getInitParameter("maxLimit");
          try {
          ds = new OracleConnectionCacheImpl( );
          ds.setURL(jdbcURL);
          ds.setMaxLimit(Integer.parseInt(maxLimit));
          ds.setUser("principal");
          ds.setPassword("fanta");
          catch (Exception e) {
          application.log("Failed to create data source: " +
          e.getMessage( ));
          application.setAttribute("appDataSource", ds);
     public void contextDestroyed(ServletContextEvent sce) {
          ServletContext application = sce.getServletContext( );
          application.removeAttribute("appDataSource");
          // Close the connections in the DataSource
          try {
               ds.close( );
          catch (java.sql.SQLException e) {}
          ds = null;
and then i use a servlet to get the connection but i get an error and i don't know if the listener is working ok, the error appears in the line Connection connection = ds.getConnection(); with an exception of pointer null..... if someone can help me pleasee...
this is my servlet:
import java.io.*;
import java.sql.*;
import javax.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ConnectionServlet extends HttpServlet {
public void doGet(
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html");
Statement statement = null;
ResultSet resultSet = null;
String userName = null;
try {
ServletContext application = getServletContext( );
DataSource ds = (DataSource) application.getAttribute("appDataSource");
Connection connection = ds.getConnection();
// Test the connection
statement = connection.createStatement( );
resultSet = statement.executeQuery(
"select rv_domain from principal.cg_ref_codes where rownum = 1");
if (resultSet.next( ))
userName = resultSet.getString(1);
catch (SQLException e) {
out.println("DedicatedConnection.doGet( ) SQLException: " +
e.getMessage( ) + "<p>");
finally {
if (resultSet != null)
try { resultSet.close( ); } catch (SQLException ignore) { }
if (statement != null)
try { statement.close( ); } catch (SQLException ignore) { }
out.println("Hello " + userName + "!<p>");
public void doPost(
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
doGet(request, response);
thanks.

You must be joking . Please re-post that monstrosity and format it using the 'code' button above the posting window. Who on Earth can read that?
- Saish

Similar Messages

  • What protocol do i use to direct connect my DATABASE? instead of TCP/IP

    I read there's a protocol (or commmand or something) to directly connect my DATABASE (in a stand alone computer).
    how do i do that?
    because Since I have no network card installed in my computer and since i have a DHCP ADSL connection (thru usb modem), i cannot connect my DATABASE (ORACLE 9.2) and Developer 6I (both in my computer). WINDOWS XP (SP2).
    is there something to fix that?
    also when i start my LISTENER as soon as i connect thru sqlplus or make 1 test with TNSPING it crashes. :(
    is that because I dont have a fixed IP?
    i 've tried using 127.0.0.1 my Internet's IP, my host, LOCALHOST, and nothing fixes it.
    HELP

    Hi,
    Try using IPC. for example something like this:
    tnsnames.ora
    TESTDB =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = testdb)
    Listener.ora would have something like this:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    you may also have to change your init.ora if there are references to MTS/SHARED SERVER stuff.
    cheers,
    john

  • How to use datasources to connect to database ?

    I have the following Problem
    I have two identical databases, one is the development database, the other one the production database.
    Now I need to find a way, how I can deploy an bc4j-application in local mode that way, that if the application is deployed to server 1 it connects to database 1 and if deployed to server 2 it connects to database 2.
    JDBC connection strings do not work as the connection is deployed with the application. So the application always connects to the same database.
    I thought datasources might be the solution. So I tried to define a datasource MyDS in the data-sources.xml file and specified it in the Configuration Wizard as the connection to use.
    But unfortunately this does not work and i do not know why:
    If I try to connect using the tester and using this datasource I get the following exception:
    Level #3: javax.naming.noInitialContextException
    Can anyone help me, what this means? How can I get around this using the BC4J Framework? Is there any "HowTo" Document which describes using datasources with BC4J?

    Frank,
    I've sorted this stuff out to some extent. Have a look at this thread:
    re:? How: multiple myAppWar.ear to use OC4J's data-sources.xml pooling?
    If this isn't all you need, then search on data-source.xml
    and read other threads also I may have posted helps on
    other threads so if you search on data-source.xml and my handle (curt504) it brings up all the threads that I posted to.
    Not to say I've solved all your problems, but I solved mine anyway. :)
    Good luck,
    curt

  • How to use JDBC to connect informix database

    Dear all,
    I want my client application to connect informix database by using JDBC. The JDBC driver has been installed successfully in the client computer (Win2000). The informix 5.0 resides the a Unix server named "dbserver". The following is my java program.
    ========================
    import java.sql.*;
    import java.awt.event.*;
    public class Application1 {
    public static void main(String[] args) {
    Connection conn;
    try
    Class.forName("com.informix.jdbc.IfxDriver");
    catch (Exception e)
    System.out.println("Error "+e.getmessage());
    e.printStackTrace();
    return;
    System.out.println("It is ok");
    try
    conn = DriverManager.getConnection("jdbc:informix-sqli://dbserver:1526:INFORMIXSERVER=dbserver;username=test;password=******");
    catch (SQLException e)
    System.out.println("ERROR ."+e.getMessage());
    e.printStackTrace();
    return;
    System.out.println("All is fine");
    ===========================
    However, the error appears mentioning "Attempt to connect to database server (dbserver) failed." I don't know what the problem is because my informix database server is exactly "dbserver".
    Kindly need help from you guys. Thanks in advance.
    Kevin

    Hi,
    Plz try this (instead of 'username' use 'user') ...
    DriverManager.getConnection("jdbc:informix-sqli://dbserer:1526:INFORMIXSERVER=dbserver;user=test;password=*****");
    or this (pass the username and password as params)....
    DriverManager.getConnection( "jdbc:informix-sqli://dbserer:1526:INFORMIXSERVER=dbserver" , "test" , "*****" );
    Hope this helps
    ssa.
    >
    I want my client application to connect informix
    database by using JDBC. The JDBC driver has been
    installed successfully in the client computer
    (Win2000). The informix 5.0 resides the a Unix server
    named "dbserver". The following is my java program.
    ========================
    import java.sql.*;
    import java.awt.event.*;
    public class Application1 {
    public static void main(String[] args) {
    Connection conn;
    try
    Class.forName("com.informix.jdbc.IfxDriver");
    catch (Exception e)
    System.out.println("Error "+e.getmessage());
    e.printStackTrace();
    return;
    System.out.println("It is ok");
    try
    conn =
    onn =
    DriverManager.getConnection("jdbc:informix-sqli://dbser
    er:1526:INFORMIXSERVER=dbserver;username=test;password=
    catch (SQLException e)
    System.out.println("ERROR ."+e.getMessage());
    e.printStackTrace();
    return;
    System.out.println("All is fine");
    ===========================
    However, the error appears mentioning "Attempt to
    connect to database server (dbserver) failed." I don't
    know what the problem is because my informix database
    server is exactly "dbserver".
    Kindly need help from you guys. Thanks in advance.
    Kevin

  • Using SSO to connect to database from J2EE

    I have an SSO enabled J2EE application and an SSO enabled database and I can connect to both of these applicatins using the single sign-on account.
    What I want to know is
    How do you get a J2EE application to connect to the database with the already connected SSO credentials?
    I am using Oracle 10g for both the app server and database
    Any help will be gratefully received.

    Hello,
    Also we have a simple how-to about database proxy authentication in the OC4J 10.1.3 How-tos page (see How-To Configure and Use Proxy-authentication with Data Sources ).
    Regards
    Tugdual Grall

  • Using JDBC to connect all database

    i want to create a DB layer through which i should be able to connect to the database specified at run time.how do i understand for databases like Mysql which OS-specific Driver to load at runtime.i want to make the Db layer platform independant and it should be able to talk to multiple databases.Is there a way to know at run time which drivers are available in the system.

    i want to create a DB layer through which i should be
    able to connect to the database specified at run
    time.Fine. JDBC, reflection and some configuration settings should get you most of the way there.
    how do i understand for databases like Mysql
    which OS-specific Driver to load at runtime.Each RDBMS you want to support will have to have its driver available for use in the CLASSPATH.
    i want
    to make the Db layer platform independant and it
    should be able to talk to multiple databases.Is there
    a way to know at run time which drivers are available
    in the system.That will be problematic. Not all RDBMS vendors are even totally ANSI SQL compliant. DDL is normally highly vendor specific, as are triggers, stored procedures, views. et. al. So, I would forewarn you that this will be a difficult task. Are you really sure that your requirements are valid?
    - Saish

  • Error during multiple connection to database.

    Hi all,
    We use software which connects to database and runs business process. Today I’ve noticed that user cant connect to database via this software from several hosts. I got error code ORA-20000. I think user has some limitation(in profile) to run software from several hosts(IP addresses) at the one time. Can i change this parameter?
    Regards,
    rustam

    rustam_tj wrote:
    Hi all,
    We use software which connects to database and runs business process. Today I’ve noticed that user cant connect to database via this software from several hosts. I got error code ORA-20000. I think user has some limitation(in profile) to run software from several hosts(IP addresses) at the one time. Can i change this parameter?
    Regards,
    rustamngtndp02:stevense> oerr ora 20000
    20000, 00000, "%s"
    // *Cause:  The stored procedure 'raise_application_error'
    // was called which causes this error to be generated.
    // *Action: Correct the problem as described in the error message or contact
    // the application administrator or DBA for more information.
    So the error is raised by the application, not the rdbms. Was there any text associated with the message giving any indication what it was for? Do you have access to the PL/SQL that raised the error to see what kind of event could trigger it?
    You think the user has a limitation in their profile, and you want to know if you can change it. Have you looked at a profile to see if there are any properties that support your thesis?

  • Cant connect my database using net service_name

    Good Morning to all;
    I trying to connect my database using net service_name , but i am getting error.
    I have tnsnames.ora entry and listener.ora entry.
    Please help me to crack this error.
    SQL> select name from v$database;
    NAME
    ORCLTEST
    SQL> grant connect ,resource to u1 identified by u1;
    Grant succeeded.
    SQL> grant sysdba to u1;
    Grant succeeded.
    SQL> show parameter pass;
    NAME TYPE VALUE
    remote_login_passwordfile string EXCLUSIVE
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    From DBS Directory :
    [oracle@linuxserver dbs]$ orapwd file=orapworcltest password=asdf1234 entries=3
    export ORACLE_SID=orcltest
    [oracle@linuxserver ~]$ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 19:24:22 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR when trying to connect
    SQL> conn u1/u1@ORCLMYTEST
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    SQL> conn u1/asdf1234@ORCLMYTEST
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    Thanks in advance ..

    Can i connect my database using username/password@netservice_name ?
    Yes, you should. Please post the result of "lsnrctl stat LISTENER_ORCL".
    *[oracle@linuxserver admin]$ lsnrctl stat LISTENER_ORCL*
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-MAR-2013 19:58:18
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxserver)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTener_ORcl
    Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date 09-MAR-2013 11:10:14
    Uptime 0 days 8 hr. 48 min. 3 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_orcl.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linuxserver)(PORT=1521)))
    Services Summary...
    Service "MYDB.PROD.ORCLPROD.COM" has 1 instance(s).
    Instance "orclprod", status UNKNOWN, has 1 handler(s) for this service...
    Service "MYDB.TEST.ORCLTEST.COM" has 1 instance(s).
    Instance "orcltest", status UNKNOWN, has 1 handler(s) for this service...
    Service "asdf" has 1 instance(s).
    Instance "asdf", status READY, has 1 handler(s) for this service...
    Service "asdfXDB" has 1 instance(s).
    Instance "asdf", status READY, has 1 handler(s) for this service...
    Service "asdf_XPT" has 1 instance(s).
    Instance "asdf", status READY, has 1 handler(s) for this service...
    Service "orclprod" has 1 instance(s).
    Instance "orclprod", status READY, has 1 handler(s) for this service...
    Service "orclprodXDB" has 1 instance(s).
    Instance "orclprod", status READY, has 1 handler(s) for this service...
    Service "orclprod_XPT" has 1 instance(s).
    Instance "orclprod", status READY, has 1 handler(s) for this service...
    Service "orcltest" has 1 instance(s).
    Instance "orcltest", status READY, has 1 handler(s) for this service...
    Service "orcltestXDB" has 1 instance(s).
    Instance "orcltest", status READY, has 1 handler(s) for this service...
    Service "orcltest_XPT" has 1 instance(s).
    Instance "orcltest", status READY, has 1 handler(s) for this service...
    The command completed successfully

  • Unable to connect to Database using Grid Control

    Hi,
    I am attempting to connect to my Oracle Linux Machine which has 2 databases FROM my 10g Grid control which is on a Windows XP 32 bit.
    Although I can login to the actual linux box with the host and database credentials ; I cant use the same to login to the database using Grid control.
    I have tried testing the connection using Grid Control >> Preferences >> Preferred Credentials >> Host ; but its just not recognizing the credentials as correct.
    When I attempt to startup the database using the host and DB credentials : ERROR MESSAGE : <servername> : <servername> comes up.
    My agent on linux box is up. My Listener is running fine.
    On my Grid control .. i have the DB, OMS, and Agent running as well.
    Any inputs on this issue, I'd appreciate very much.

    Thanks for your reply.
    Under Hosts on the Main Grid Console Home Page >> "server3.sam" Status shows UP. This server houses my 2 databases. But when I click on Databases >> it shows Instance DOWN.
    Status          
    Failed
    Details          Failed to connect to database instance: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach).
    I have verified that my lsnrctl status is good on the linux box. My target agent is up and running on it as well.
    So I try to start the STARTUP button >> I enter the HOST Credentials of the Linux box and the Database credentials which I use "SYS" (in upper case - just in case that mattered) and choose SYSDBA ;
    Error Message
    server3.sam: server3.sam
    I created a new dba account and try to login ... dont seem to work ; I tried using SYSTEM account and even altering my sys and system passwords .. all turn out negative.
    And the ANSWER to your question ---> Grid Control >> Preferences >> Preferred Credentials >> Database Instance >> corresponding to my database name ; I enter my sysdba username / password AND the host username / password of my Linux box >> TEST >> which also turns out negative.
    This entry is auto filled in since I "checked" the box "Save as Preferred Credential"; initially when I tried to start the DB using the STARTUP button.
    By the way, my Win XP doesnt really have a password set under User accounts.
    Any suggestions please ?

  • Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver

    Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
    Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
    Checks performed:
    RMS Application code location and directory contents:
    [oracle@test-rms-app application]$ pwd
    /binary_files/STAGING_DIR/rms/application
    [oracle@test-rms-app application]$ ls -ltr
    total 144
    -rw-r--r-- 1 oracle oinstall   272 Dec 7  2010 version.properties
    -rw-r--r-- 1 oracle oinstall   405 Jan 16 2011 expected-object-counts.properties
    -rw-r--r-- 1 oracle oinstall   892 May 13 2011 ant.install.properties.sample
    -rw-r--r-- 1 oracle oinstall 64004 Jun  6  2011 build.xml
    drwxr-xr-x 9 oracle oinstall  4096 Jun 16 2011 rms13
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 installer-resources
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 antinstall
    drwxr-xr-x 2 oracle oinstall  4096 Jun 16 2011 ant-ext
    drwxr-xr-x 5 oracle oinstall  4096 Jun 16 2011 ant
    -rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
    -rwxr-xr-x 1 oracle oinstall  4249 Dec 18 10:01 install.sh
    drwxr-xr-x 4 oracle oinstall  4096 Dec 18 10:06 common
    -rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
    -rw-r--r-- 1 oracle oinstall   689 Dec 19 10:37 ant.install.log
    [oracle@test-rms-app application]$
    Application installation:
    [oracle@test-rms-app application]$ ./install.sh
    THIS IS the driver directory
    Verified $ORACLE_SID.
    Verified SQL*Plus exists.
    Verified write permissions.
    Verified formsweb.cfg read permissions.
    Verified Registry.dat read permissions.
    Verified Java version 1.4.2.x or greater. Java version - 1.6.0
    Verified Tk2Motif.rgb settings.
    Verified frmcmp_batch.sh status.
    WARNING: Oracle Enterprise Linux not detected.  Some components may not install properly.
    Verified $DISPLAY - 172.16.129.82:0.0.
    This installer will ask for your "My Oracle Support" credentials.
    Preparing installer. This may take a few moments.
    Your internet connection type is: NONE
    Integrating My Oracle Support into the product installer workflow...
         [move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
    Installer preparation complete.
    MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
    ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
    ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
    DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
    WLS_INSTANCE=WLS_FORMS
    ORACLE_SID=rmsdbtst
    JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
    Launching installer...
    To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
    [oracle@test-rms-app application]$ tnsping rmsdbtst
    TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
    Copyright (c) 1997, 2008, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
    OK (0 msec)
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ ping test-rms-db
    PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
    --- test-rms-db.vonmaur.vmc ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4001ms
    rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ uname -a
    Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ cat /etc/*-release
    Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
    Red Hat Enterprise Linux Server release 5.3 (Tikanga)
    [oracle@test-rms-app application]$
    The database is created and all the batch file scripts have been successfully deployed.  Now working on the application server.  The  Weblogic server is installed and 11g forms and reports are installed successfully.
    Any help would be helpful.
    Thanks,
    Ram.

    Please check MOS Notes:
    FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1)

  • (Cisco Historical Reporting / HRC ) All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054

    Hi All,
    I am getting an error message "All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054"  when trying to log into HRC (This user has the reporting capabilities) . I checked the log files this is what i found out 
    The log file stated that there were ongoing connections of HRC with the CCX  (I am sure there isn't any active login to HRC)
    || When you tried to login the following error was being displayed because the maximum number of connections were reached for the server .  We can see that a total number of 5 connections have been configured . ||
    1: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:Current number of connections (5) from historical Clients/Scheduler to 'CRA_DATABASE' database exceeded the maximum number of possible connections (5).Check with your administrator about changing this limit on server (wfengine.properties), however this might impact server performance.
    || Below we can see all 5 connections being used up . ||
    2: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:[DB Connections From Clients (count=5)]|[(#1) 'username'='uccxhrc','hostname'='3SK5FS1.ucsfmedicalcenter.org']|[(#2) 'username'='uccxhrc','hostname'='PFS-HHXDGX1.ucsfmedicalcenter.org']|[(#3) 'username'='uccxhrc','hostname'='PFS-HHXDGX1.ucsfmedicalcenter.org']|[(#4) 'username'='uccxhrc','hostname'='PFS-HHXDGX1.ucsfmedicalcenter.org']|[(#5) 'username'='uccxhrc','hostname'='47BMMM1.ucsfmedicalcenter.org']
    || Once the maximum number of connection was reached it threw an error . ||
    3: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:Number of max connection to 'CRA_DATABASE' database was reached! Connection could not be established.
    4: 6/20/2014 9:13:49 AM %CHC-LOG_SUBFAC-3-UNK:Database connection to 'CRA_DATABASE' failed due to (All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054.)
    Current exact UCCX Version 9.0.2.11001-24
    Current CUCM Version 8.6.2.23900-10
    Business impact  Not Critical
    Exact error message  All available connections to database server are in use by other client machines. Please try again later and check the log file for error 5054
    What is the OS version of the PC you are running  and is it physical machine or virtual machine that is running the HRC client ..
    OS Version Windows 7 Home Premium  64 bit and it’s a physical machine.
    . The Max DB Connections for Report Client Sessions is set to 5 for each servers (There are two servers). The no of HR Sessions is set to 10.
    I wanted to know if there is a way to find the HRC sessions active now and terminate the one or more or all of that sessions from the server end ? 

    We have had this "PRX5" problem with Exchange 2013 since the RTM version.  We recently applied CU3, and it did not correct the problem.  We have seen this problem on every Exchange 2013 we manage.  They are all installations where all roles
    are installed on the same Windows server, and in our case, they are all Windows virtual machines using Windows 2012 Hyper-V.
    We have tried all the "this fixed it for me" solutions regarding DNS, network cards, host file entries and so forth.  None of those "solutions" made any difference whatsoever.  The occurrence of the temporary error PRX5 seems totally random. 
    About 2 out of 20 incoming mail test by Microsoft Connectivity Analyzer fail with this PRX5 error.
    Most people don't ever notice the issue because remote mail servers retry the connection later.  However, telephone voice mail systems that forward voice message files to email, or other such applications such as your scanner, often don't retry and
    simply fail.  Our phone system actually disables all further attempts to send voice mail to a particular user if the PRX5 error is returned when the email is sent by the phone system.
    Is Microsoft totally oblivious to this problem?
    PRX5 is a serious issue that needs an Exchange team resolution, or at least an acknowledgement that the problem actually does exist and has negative consequences for proper mail flow.
    JSB

  • How to use JNDI datasource instead of database connection settings JDev 10g

    Hi,
    In order to use the different database from other environments, we are not able to use the JNDI datasource configuration settings, all the time need to configure the database connection settings from JDeveloper by changing the database connectivity settings in the JDeveloper for each environment separately, need a solution on how to make the database connectivity unique using the JNDI datasource name for all the environments for database connectivity settings through the application server console rather than changing the database adapter configuration in JDeveloper.
    Please provide the update at the earliest. Your help is greatly appreciated. Thanks in advance..

    What are you not clear on?
    What you need to do is get your developers to conform to a database naming standard, as stated above, so if you have an oracle database that is for eBusiness Suite you get all developers to create a DB connection in JDev called, ora_esb as an example.
    When the developer creates a DB adapter this will create a JNDI name of eis/DB/ora_ebs. When the BPEL project is deployed it looks for the JNDI name in the oc4j-ra.xml file to see its connection details. If they don't exist then they use the developers connection details. The issue with this is that they generally always point to the development DB. It is best practice for the developers to remove the mcf settings in the DB adapter WSDL. This way if the JNDI name has not been configured it will fail.
    So when you migrate from dev-test-prod what you have is the JNDI name eis/DB/ora_ebs. The dev points to the dev instance of ebs, test points to the test instance and so on. This means that you don't need to adjust any code in the BPEL projects.
    cheers
    James

  • Use jdbc to connect servlet to oracle 8.1.6 database on win2k

    The code is below:
    package moreservlets;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    /** Simple servlet used to test JDBC connection. */
    public class TitleQueries extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Connecting to Database";
    DriverManager.registerDriver (new
    oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@pc840:1521:orcl", "scott", "tiger");
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery
    ("select ename from emp");
    while (rset.next()) {
    String name = rset.getString("ename");
    out.println(ServletUtilities.headWithTitle(title) +
    "<body bgcolor=\"#FDF5E6\">\n" +
    "<h1 align=\"center\">" + name + "</h1>\n" +
    "</body></html>");
    CLASSPATH=.;C:\J2ee;C:\j2sdkee1.3.1\lib\cloudscape;C:\Program Files\Apache Tomcat 4.0\common\lib\servlet.jar;C:\Oracle\Ora81\orb\classes\yoj.jar;C:\Oracle\Ora81\orb\classes\share.zip
    My code cannot find the JDBC driver. Any suggestions?
    Thanks.
    I get the following errors:
    C:\J2ee\moreservlets>javac -d "C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\
    EB-INF\classes" TitleQueries.java
    TitleQueries.java:19: package oracle.jdbc.driver does not exist
    oracle.jdbc.driver.OracleDriver());
    ^
    TitleQueries.java:31: cannot resolve symbol
    symbol : variable name
    location: class moreservlets.TitleQueries
    "<h1 align=\"center\">" + name + "</h1>\n" +
    ^
    2 errors

    I changed my classpath variable and my servlet
    compiles okay with the:
    "import oracle.jdbc.driver.*" statement.
    However, I still get the following error.
    Why can't it find the jdbc driver, since it finds the
    import statement?
    Apache Tomcat/4.0.3
    Error loading driver: java.lang.ClassNotFoundException: oracle.jdbc.driver.Oracl
    eDriver
    WebappClassLoader: Resource '/WEB-INF/classes/moreservlets/ServletUtilities.cl
    ass' was modified; Date is now: Tue Jul 02 09:57:26 CDT 2002 Was: Tue Jul 02 09:
    37:20 CDT 2002
    Error loading driver: java.lang.ClassNotFoundException: oracle.jdbc.driver.Oracl
    eDriver
    CLASSPATH=.;C:\J2ee;C:\j2sdkee1.3.1\lib\cloudscape\RmiJdbc;C:\Program Files\Apache Tomcat 4.0\common\lib\servlet.jar;C:\Oracle\Ora81\jdbc\lib\classes12.zip;C:\Oracle\Ora81\orb\classes\yoj.jar;C:\Program Files\Oracle\JDeveloper 3.2.3\jdbc\lib\oracle8.1.7\classes12.zip;C:\Oracle\Ora81\orb\classes\share.zip
    //code begins here
    package moreservlets;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jdbc.driver.*;
    public class TitleQueries extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@pc840:1521:orcl", "scott", "tiger");
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery
    ("select * from emp");
    out.println(ServletUtilities.headWithTitle(title) +
    "<body bgcolor=\"#FDF5E6\">");
    while (rset.next()) {
    out.println("<h1 align=\"center\">"
    + rset.getString("ename") + "</h1>\n");
    out.println("</body></html>");
    catch(ClassNotFoundException cnfe) {
    System.err.println("Error loading driver: " + cnfe);
    catch(SQLException sqle) {
    System.err.println("Error connecting: " + sqle);
    }

  • How to connect sybase database in JDeveloper 11g using JConnect

    Hi
    How to connect sybase database in JDeveloper 11g using JConnect? Please help.

    User,
    It would help if you explained Sybase Jconnect instead of leaving us to google.
    At any rate, it appears you need to create a library definition in JDeveloper, add the appropriate JConnect JAR files to the library's classpath, and then add the library to your project.
    John

  • How to connect to database using sqlplusW (windows based  sqlPlus)

    Hi
    Thank you for reading my post
    I did some search and i find that i should use some kind of SYSTEM/SYSTEM@ORCLE
    to connect to database using windows based sqlplus.
    in the above SYSTEM is username and password and ORCLE is SID.
    but sqlplusw says that
    could not resolve the connect identifier specified.
    where i can find complete information about HOST string ?
    thanks

    You can look inside yours tnsnames.ora file it can be found in %ORACLE_HOME%\network\admin
    MOB92 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxx)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = MOB92.world)
    Here my network service name in MOB92 so in sqlplus I would use:
    system
    password
    mob92
    and it should work. If you have no such entry in tnsnames.ora file you can use for example Network Configuration Assistant to configure your network service name.
    Best Regards
    Krystian Zieja / mob

Maybe you are looking for

  • How to exclude two kind of files in the same folder in sender cc?

    Hi,gurus: Now we are using "advanced selection for source files" in sender file adapter. Our requirement is as below: The source directory is  c:\test and there are many files in the directory. We want to transfer all the files except aa.txt and bb.t

  • "Report this post" still for level4/where are "points"?

    a privilege of level4 was to report the "abuse" of the forum; that option is still availabe only for level4 gurus.. but we don't have anymore any levels... (??) in term of use, I do read an explination of "points", but MyProfile doesn't display any s

  • Formula Node variable assignment problems

    I have a formula node with the follwing: Inputs:E,X,T,PD,I OutputsK,PD The statement inside the formula node is: if (Eelse if (PD=1) if (E else if (E<=X) ; else PK=I, PD=1; The logic seems to be working the way I want, the problem is in the last else

  • Photo showing up as black

    It has happened a couple of times before Seems like its when I copy a part of another project into a project. Basically I drag a new jpg in and it shows up as black. This is so frustrating right now - Apple please fix this bug It is slowing down my w

  • Disabling catchall

    As we are getting more and more spam these days I would like to disable catchall mails. I find that catchall mails are coming into the junkmail account, which I monitor for false positives and then whitelist accordingly. Currently the setting in main