LDAP connections not being closed

Hi,
I am trying to authenticate against a Netscape LDAP server and it works fine for 2 out of the 3 cases I am testing against.
The first case is authenticating with the correct username and correct password. In this case the user is authenticated and the connection is closed.
In the second case, I try to authenticate with the correct username and a wrong password. The authentication fails and an AuthenticationException is thrown. The connection is closed.
In the third case, where I have the PROBLEM is if I provide a wrong username, AuthenticationException is thrown indicating that such an username does not exist. But the CONNECTION IS NOT CLOSED.
Following is the code :
     private boolean authenticate(String userName, String password) throws Exception {
          Hashtable env = new Hashtable(11);
          env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
          env.put("com.sun.jndi.ldap.connect.pool", "false");
          env.put(Context.SECURITY_AUTHENTICATION, "simple");
          env.put(Context.SECURITY_PROTOCOL, "ssl");
          env.put(Context.SECURITY_PRINCIPAL, getSecurityPrincipal(userName));
          env.put(Context.SECURITY_CREDENTIALS, password);
          env.put(Context.PROVIDER_URL,"ldap://ldap05.nike.com:11003");
          DirContext ctx = null;
          try {
               // Create initial context
               ctx = new InitialDirContext(env);
               return true;
          } catch (AuthenticationException e) {
               log.error(e.getMessage());
          } catch (NamingException e) {
               log.error("The user could not be validated on LDAP server due to :" + e.getMessage());
          } finally {
               if (ctx != null) {
                    ctx.close();
          return false;
     }Any help is appreciated.
Thanks in Advance.

I did run the NETSTAT command and found some interesting things.
I ran it for the three cases. The first case is running netstat immediately after authenticating the user with VALID credentials. The status of the connection is TIME_WAIT which is the desired behaviour.
In the second case, when trying to authenticate with CORRECT username but a wrong password, an AuthenticationException is thrown. When I run the netstat command, the connection is in TIME_WAIT state which is the desired one.
In the third case, when I provide a wrong username, an AuthenticationException is thrown. When I run the netstat command, the connection is in ESTABLISHED state, which it should not be in.
An authenticationException is thrown for wrong username and also for wrong password. But the connection is closed for wrong password, but not for wrong username.This is what seems to me as a weird behaviour.
I was under the impression that in the CODE I mentioned at the begining of this topic, the INITIALDIRCONTEXT had the responsibility of closing the connection when authentication fails as we don't have a handle to close it. It is doing so in the case of ERROR 49 which is wrong password, but not in the case of ERROR 32 which is wrong username. Correct me if I am wrong, but doesn't it seem to be a bug with the INITIALDIRCONTEXT class.
Thanks.

Similar Messages

  • JDBC Connections not being returned to pool

    Greetings All.
    I really need some help here to find out where my connections are being held.
    I have a transactional connection pool that runs out of connections on average three times a day. I've read all the threads in the newsgroups for connection leaks and how to always release connections in the finally block.
    1.
    I can confirm that it's definitely not a connection leak, I confirmed this by using the jar for tracing connection leaks and none was displayed.
    2.
    I've looked at all our code and all code that uses jdbc connections destroys jdbc resources in the finally clause.
    3.
    I'm new to the department and therefore cannot tell you what new code was put in that caused this problem to occur.
    4.
    We're using WL 8.1.3 AND JDK 1.4.2_06
    5.
    I've tried JMX to view what the connections are doing when this problem occurs, and hence enabled statement cache which revealed nothing of interest to me. I just wish somehow I could get to trace which threads reserved the connections and do a stack trace on them.
    The most frequent error in my jdbc logs is :
    java.sql.SQLException: ORA-01401: inserted value too large for column
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:70)
         at net.cellc.sal.ejb.saldataaccess.TransactionDAO.updateRecordStatus(TransactionDAO.java:76)
         at net.cellc.sol.ejb.sol.SOLBean.updateRecord(SOLBean.java:312)
         at net.cellc.sol.ejb.sol.SOLBean.processMessage(SOLBean.java:170)
         at net.cellc.sol.ejb.sol.SOL_ytyu34_EOImpl.processMessage(SOL_ytyu34_EOImpl.java:46)
         at net.cellc.sal.ejb.sal.SALBean.callSOL(SALBean.java:339)
         at net.cellc.sal.ejb.sal.SALBean.process(SALBean.java:201)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl.process(SAL_ki83rk_EOImpl.java:100)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1401)
    Your help would be really appreciated.
    Regards
    Ze Casperian

    Hi. Show us your pool definition. You should turn off refresh test minutes.
    Set it to 9999999.
    Joe
    Mncedisi Kasper wrote:
    Greetings All.
    I really need some help here to find out where my connections are being held.
    I have a transactional connection pool that runs out of connections on average three times a day. I've read all the threads in the newsgroups for connection leaks and how to always release connections in the finally block.
    1.
    I can confirm that it's definitely not a connection leak, I confirmed this by using the jar for tracing connection leaks and none was displayed.
    2.
    I've looked at all our code and all code that uses jdbc connections destroys jdbc resources in the finally clause.
    3.
    I'm new to the department and therefore cannot tell you what new code was put in that caused this problem to occur.
    4.
    We're using WL 8.1.3 AND JDK 1.4.2_06
    5.
    I've tried JMX to view what the connections are doing when this problem occurs, and hence enabled statement cache which revealed nothing of interest to me. I just wish somehow I could get to trace which threads reserved the connections and do a stack trace on them.
    The most frequent error in my jdbc logs is :
    java.sql.SQLException: ORA-01401: inserted value too large for column
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:70)
         at net.cellc.sal.ejb.saldataaccess.TransactionDAO.updateRecordStatus(TransactionDAO.java:76)
         at net.cellc.sol.ejb.sol.SOLBean.updateRecord(SOLBean.java:312)
         at net.cellc.sol.ejb.sol.SOLBean.processMessage(SOLBean.java:170)
         at net.cellc.sol.ejb.sol.SOL_ytyu34_EOImpl.processMessage(SOL_ytyu34_EOImpl.java:46)
         at net.cellc.sal.ejb.sal.SALBean.callSOL(SALBean.java:339)
         at net.cellc.sal.ejb.sal.SALBean.process(SALBean.java:201)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl.process(SAL_ki83rk_EOImpl.java:100)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1401)
    Your help would be really appreciated.
    Regards
    Ze Casperian

  • Pooled database connections are not being closed properly

    We are using WLS 9.2 and Microsoft SQL Server 2005 (version 1.1 of the Microsoft JDBC driver), and we are experiencing some strange behavior with the lifecycle of the connections in our data source pools. The WLS console may report that the current capacity of a pool is 5, but the database monitoring tools report that we have more than 5 connections open. It almost seems as though connections are getting dropped somehow and WLS thinks it has closed them and created new ones, but the original connections are never actually closed in the database. Our application is the only thing connecting to the DBMS instance in question, so the connections we are seeing have definitely been created by WebLogic. Any suggestions for tracking down the source of this problem would be greatly appreciated.
    Regards,
    Sabrina

    SabrinaL wrote:
    Thank you for your help. Here is our pool configuration (NOTE: Even though we're not using Oracle, we actually did create our own empty "DUAL" table to use for testing connections):
    <jdbc-connection-pool-params>
    <initial-capacity>10</initial-capacity>
    <max-capacity>10</max-capacity>
    <shrink-frequency-seconds>0</shrink-frequency-seconds>
    <test-frequency-seconds>0</test-frequency-seconds>
    <test-connections-on-reserve>true</test-connections-on-reserve>
    <test-table-name>DUAL</test-table-name>
    </jdbc-connection-pool-params>
    I'm not sure exactly when the problem starts occurring because we only recently
    noticed it; as far as we can tell, it's pretty random. We have seen occasional
    application errors where it appears that the app cannot obtain a connection from
    the pool, but I'm not sure if that issue is directly related to this particular
    problem. We were careful to scale our pool size such that it should always have
    enough connections, so I'm not sure how this is possible. We are running a cluster.
    Regards,
    SabrinaOk, then for every server in the cluster, the server will make 10 connections.
    Because you are using SQLServer, your 'test table' (that is an overloaded
    field) should be set to actually define SQL that we can use for a quick test:
    <test-table-name>SQL select 1</test-table-name>
    That will be quicker than selecting from any real table.
    We would need more info about the problem. If you turn on
    JDBC logging, we might capture the exceptions that indicate
    problems with the pool, however, as configured, the pools
    will have only 10 connections, and will close and replace
    any that fail the test. Do you have a firewall between the
    DBMS and WebLogic?
    Joe

  • Files are not being closed on server

    Hi,
    We have a problem with our Intel macs connecting to our Windows 2003 SBS server. When a file is saved after being created or edited and i then closed on the mac it's still seen as opened on the server. Therefor other users can not open te file. We have older mac's as well with power pc cpu's and they don't seem to have this problem. Also the Windows pc's connected the the same server don't have this problem.
    We ran the latest updates but that didn't solve the problem unfortunately.
    I called Apple support but they didn't hear of the problem before and don't want to investigate this any further because it's an unknown problem !!
    I hope any of you give me a direction what to look for.
    Thanks in advance

    How are they connecting? What Service?
    Any particular APPs that do this? Adobe perhaps?

  • Child Report Cursors Are Not Being Closed

    A SQLDeveloper report with a running defined child report with a Refresh rate of 5 or more seconds will eventually exhaust the session's max_open_cursors and will crash with "ORA-01000 maximum open cursors exceeded". This is true whether it is the parent or child report which is refreshed.
    In my case, max_open_cursors is set to 600 and the refresh rate is 5 seconds; it takes approximately 50 minutes or less for SQLDeveloper to crash.
    Tracking the open cursors by viewing V$OPEN_CURSOR for the report SID clearly shows that the number of child report cursors keeps growing at approximately one cursor per refresh rate. From this it is very clear that SQLDeveloper is not closing those child report cursors and I have found no way to work around this problem.
    BTW, congratulations to the SQLDeveloper team for an overall really good product at an excellent price. Still a bit buggy but otherwise quite enjoyable to use.
    Jerry

    How are they connecting? What Service?
    Any particular APPs that do this? Adobe perhaps?

  • Connections not being released from pool with Weblogic 5.1 sp 8

    I am using WLS 5.1 on RedHat Linux kernel 2.4
    The database is oracle 8.1.6 and I am using the thin
    jdbc driver as shown in the config below.
    weblogic.jdbc.connectionPool.bobePool=\
    url=jdbc:oracle:thin:@localhost:1521:<sid>,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=10,\
    maxCapacity=22,\
    capacityIncrement=5,\
    allowShrinking=true,\
    shrinkPeriodMins=3,\
    testConnsOnReserve=true,\
    testTable=dual,\
    refreshTestMinutes=5,\
    props=user=<username>;password=<password>
    The problem I am facing is that some connections remain active
    after the SQL query has finished. The no. of open connections
    keep on piling up till the limit of 18 connections is reached and
    ultimately at that point weblogic hangs.
    Has someone else faced this problem...and found a solution??
    Regards,
    Anish Srivastava
    System Analyst
    Baazee.com

    I agree with Sree. We had same kind of problem before but I attribute this mostly
    to the application handling of the connections rather than container in managing
    pools. Most often programmers tend to disregard to explicitly claim the resources(close
    them in case of db con.s) in case of exceptions. Though they keep a finally block
    at the end of every business method , my experience says, more safer it is to close
    them in exception catch block too. I dont know if some JVMs defer the execution of
    finally blocks/containers override the behavior.
    comments?
    -Chandra
    "Sree Bodapati" <[email protected]> wrote:
    Hello Anish,
    There are two things here:
    1. Make sure connections are closed (in a finally block). If objects are
    not
    at the method level, the application code may
    be overwriting and losing references to the connection. So watchout for
    that.
    2. Never try to get a connection in an infinite loop in the application,
    that will take all the available execute threads on the server when you
    have
    enough number of clients and can cause this issue.
    One other config change that I would suggest is,
    make refreshtestMinutes=99999, testConnsOnReserve should be sufficient to
    ensure application gets a good connection.
    hth
    sree
    "Anish Srivastava" <[email protected]> wrote in message
    news:[email protected]...
    I am using WLS 5.1 on RedHat Linux kernel 2.4
    The database is oracle 8.1.6 and I am using the thin
    jdbc driver as shown in the config below.
    weblogic.jdbc.connectionPool.bobePool=\
    url=jdbc:oracle:thin:@localhost:1521:<sid>,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=10,\
    maxCapacity=22,\
    capacityIncrement=5,\
    allowShrinking=true,\
    shrinkPeriodMins=3,\
    testConnsOnReserve=true,\
    testTable=dual,\
    refreshTestMinutes=5,\
    props=user=<username>;password=<password>
    The problem I am facing is that some connections remain active
    after the SQL query has finished. The no. of open connections
    keep on piling up till the limit of 18 connections is reached and
    ultimately at that point weblogic hangs.
    Has someone else faced this problem...and found a solution??
    Regards,
    Anish Srivastava
    System Analyst
    Baazee.com

  • Connections not being released from jdbc pool on WLS 5.1 sp8

    I am using WLS 5.1 on RedHat Linux kernel 2.4
    The database is oracle 8.1.6 and I am using the thin jdbc driver as shown in the config below.
    weblogic.jdbc.connectionPool.bobePool=\
    url=jdbc:oracle:thin:@localhost:1521:<sid>,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=10,\
    maxCapacity=22,\
    capacityIncrement=5,\
    allowShrinking=true,\
    shrinkPeriodMins=3,\
    testConnsOnReserve=true,\
    testTable=dual,\
    refreshTestMinutes=5,\
    props=user=<username>;password=<password>
    The problem I am facing is that some connections remain active
    after the SQL query has finished. The no. of open connections
    keep on piling up till the limit of 18 connections is reached and
    ultimately at that point weblogic hangs.
    Has someone else faced this problem...and found a solution??
    Regards,
    Anish Srivastava
    System Analyst
    Baazee.com

    Hi Caren,
    Weblogic doesn't close connections on "time-out". There are some reasons
    for this. The most important one is that even if you have such a
    functionality,
    in case of a connection leak all the available connections can be trashed in
    a matter of milliseconds, so it wouldn't help at all. Though, weblogic does
    close leaked connection when they are garbage collected, but it's easy to
    see
    that it doesn't help a lot, too.
    So you need to make sure that all the JDBC objects are closed properly,
    for example like in this code:
    try {
    } finally {
    try {resultSet.close();} catch (SQLException se) {}
    try {preparedStatement.close();} catch (SQLException se) {}
    try {connection.close();} catch (SQLException se) {}
    Also it's possible that you simply don't have enough connection.
    You could try to increase size of the pool.
    Regards,
    Slava Imeshev
    "Karen Law" <[email protected]> wrote in message
    news:[email protected]...
    Closing the DB connections is important. But is there any parameters to be
    set in the WebLogic configuration in order to release the connection whenit
    hasn't been closed for a long time? Say, setting the connection timeout?
    Many thx!
    Karen
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]...
    Do you close the DB connections in a finally block after you've finished
    using them?
    If not your application is leaking the connections and sometimes GC is
    not able or does not free those in a timely manner.
    --dejan
    Anish Srivastava wrote:
    I am using WLS 5.1 on RedHat Linux kernel 2.4
    The database is oracle 8.1.6 and I am using the thin jdbc driver as
    shown
    in the config below.
    weblogic.jdbc.connectionPool.bobePool=\
    url=jdbc:oracle:thin:@localhost:1521:<sid>,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=10,\
    maxCapacity=22,\
    capacityIncrement=5,\
    allowShrinking=true,\
    shrinkPeriodMins=3,\
    testConnsOnReserve=true,\
    testTable=dual,\
    refreshTestMinutes=5,\
    props=user=<username>;password=<password>
    The problem I am facing is that some connections remain active
    after the SQL query has finished. The no. of open connections
    keep on piling up till the limit of 18 connections is reached and
    ultimately at that point weblogic hangs.
    Has someone else faced this problem...and found a solution??
    Regards,
    Anish Srivastava
    System Analyst
    Baazee.com

  • Username and Password Required for Wifi Connection, Not Being Asked for Username

    I just updated my iphone 4s to ios 8 and attempted to join my school's wireless network, which requires both a username and a password. i am being asked for a password but not a username.
    my question here is how to have the username be requested as well.
    thank you in advance for answering.

    Hi, did you ever find a solution to this?  I see your post is old, but the exact same thing has happened to me and I can't figure out what the generic username and password would be.  Any insight you have would be most helpful. Thanks!

  • DB Connections not being released when using Weblogic Datasource

    I am using Kodo-JDO 2.5.3 and Weblogic 8.1.
    I have JDO running as a JCA connector and I have a simple stateless session
    bean persisting a simple object. My problem is that every time I call my
    session bean to persist an object it grabs a connection from the Weblogic
    connection pool and never returns it. So if I have configured a maximum of
    50 connections in the pool, on my 51st call to the session bean I will get
    an error saying it cannot acquire a connection from the pool. (error pasted
    below)
    I have configured my JDO parameters as follows:
    ConnectionRetainMode=persistence-manager (also tried 'transaction')
    TransactionMode=xa
    ConnectionFactoryName=ERDataSource
    ConnectionFactory2Name=NonXADataSource
    At the end of every call to the SessionBean I perform a
    persistenceManager.close(); and a persistenceManager=null;
    Any ideas why connections are not getting re-used?
    Exception I am receiving:
    java.sql.SQLException: Internal error: Cannot obtain XAConnection
    weblogic.common.resourcepool.ResourceLimitException: No resources currently
    available in pool MyJDBC Connection Pool-1 to allocate to applications,
    please increase the size of the pool and retry..
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
    tions.java:64)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getSQLExecutionManag
    er(JDBCStoreManager.java:722)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.setPersistenceManage
    r(JDBCStoreManager.java:133)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.initialize(PersistenceMa
    nagerImpl.java:173)
    at
    com.solarmetric.kodo.ee.EEPersistenceManager.initialize(EEPersistenceManager
    ..java:50)
    at
    com.solarmetric.kodo.impl.jdbc.ee.EEPersistenceManagerFactory.newPersistence
    Manager(EEPersistenceManagerFactory.java:107)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
    ager(PersistenceManagerFactoryImpl.java:204)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
    ager(PersistenceManagerFactoryImpl.java:136)
    at
    com.solarmetric.kodo.impl.jdbc.ee.JDOConnectionFactory.getPersistenceManager
    (JDOConnectionFactory.java:161)
    at
    com.mslv.osa.infrastructure.ossj.app.JVTSessionBean.getPersistenceManager(JV
    TSessionBean.java:308)
    at
    com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean.createSystemProp
    erty(SystemJVTSessionBean.java:882)
    at
    com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean_toe7tm_EOImpl.cr
    eateSystemProperty(SystemJVTSessionBean_toe7tm_EOImpl.java:1536)
    at
    com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean_toe7tm_EOImpl_WL
    Skel.invoke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:407)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:356)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:353)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:123)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:351)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Glen

    A couple of suggestions that might do the trick:
    1. Upgrade to 2.5.4
    2. Leave the ConnectionRetainMode to its default value (on-demand).
    3. Make sure you always close your Query results and Extent iterators.

  • Hdmi connection not being detected on tv

    So when I plug the hdmi into my computer through the adapter, it is no longer showing up on my TV, saying 'no signal'. It was working earlier today but now its not.
    When I plug it it, the screen flashes like usual, but nothing happens. When I look in the displays part of system preferences, it knows its attached, but it still doesn't do anything.
    So far I have tried taking it out and plugging it in again, restarting the computer, restarting the NVRAM because thats what another support thread said but none of them have worked.
    I'm not sure if this is a problem with my computer, my TV, or my cable, but if anyone could tell me whats wrong, I would greatly appreciate it.

    Your problem may be as simple as an HDMI cable that has gone bad, or.
    Your television may have had its HDCP (High-bandwidth Digital Content Protection) credentials removed.
    Sometimes a display can be HDCP certified and then later be removed from the certified list. So purchasing a new display (TV) may not be a permanent solution.
    Your display may not be on the "approved" list, or was removed from it.
    The Hollywood demanded technology is called High-bandwidth Digital Content Protection (HDCP) and aims to prevent copying of digital audio and video content as it travels across a variety of display connectors, even if such copying is not in violation of fair use laws.
    I have occasionally offer methods for fixing this but my post gets deleted.   Suggest you search elsewhere on the Internet for advice or purchase another television.

  • Wireless Internet Connection Not Being Shared

    I'm having a bizarre problem that I cannot get my head around. I have just setup my Airport Extreme and it works fine wirelessly with my G4 Powerbook, whereas other devices can connect to the network but cannot access the internet. I am using the following settings:
    Country: United States
    Radio Mode: 802.11n (802.11b/g compatible)
    Security: WPA2 Personal
    I do you connect to the Internet: I use a DSL or cable modem with a static IP or DHCP
    Configure IPv4: Using DHCP
    Wireless Network Mode: Create a wireless network
    My wife's MacBook can connect to the wireless network, but it just can't get on the internet.
    I've tried turning stuff on and off. I've tried connecting the ethernet cable from my ComCast modem to the WAN socket in the back of the AX and using 'Bridge Mode'. But I've now connected it in the LAN sockets.
    Any help would be greatly appreciated.
    Thanks,
    Ben

    Bob Timmons wrote:
    The WDS procedure that Tesserax posted recently should provide better guidance.
    http://discussions.apple.com/thread.jspa?threadID=2287950&tstart=0
    Thanks, I had a look at the thread; those instructions are from 'DesigningAirPort_Networks10.5-Windows.pdf', which I had downloaded earlier today. After reading through it there didn't seem to be anything that I missed in the WDS set-up. I re-did the set-up and got the same result.
    For no particular reason, I tried setting up the WDS yet again, and now the network and internet access are functioning correctly, no problems. This time I had both AXs in the Main's room, then moved the Remote to its location after set-up. I don't know how this might make a difference, as this was how I did the set-up originally, and it didn't work then.
    So, the problem was a phantom and the solution was magic — with a bit of helpful advice, of course — thanks

  • Database Connections Not Closing

    I'm using iBatis for PostgreSQL database access and frequently have problems with connections not being closed. Here is a copy of my sqlMapConfig file:
    ============================
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE sqlMapConfig
    PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
    "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
    <sqlMapConfig>
    <properties resource="ibatis.properties" />
    <settings
    lazyLoadingEnabled="true"
    cacheModelsEnabled="true"
    enhancementEnabled="false"
    useStatementNamespaces="false"
    />
    <transactionManager type="JDBC" commitRequired="true">
    <dataSource type="DBCP">
    <property name="driverClassName" value="${driver}" />
    <property name="url" value="${url}" />
    <property name="username" value="${username}" />
    <property name="password" value="${password}" />
    <property name="maxActive" value="10"/>
    <property name="maxIdle" value="5"/>
    <property name="maxWait" value="5000"/>
    <property name="logAbandoned" value="true"/>
    <property name="removeAbandoned" value="true"/>
    <property name="removeAbandonedTimeout" value="1"/>
    <property name="Driver.logUnclosedConnections" value="true"/>
    </dataSource>
    </transactionManager>
    <sqlMap resource="job-sqlMap.xml" />
    </sqlMapConfig>
    ============================
    Due to the logAbandoned and removeAbandoned settings, I get a report in my log file whenever there is a connection that was not properly closed. Here is one of those log entries:
    23:22:51.483 (10) Finalizing a Connection that was never closed:
    java.lang.Throwable: Connection was created at this point:
    at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:175)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
    at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
    at org.postgresql.Driver.makeConnection(Driver.java:393)
    at org.postgresql.Driver.connect(Driver.java:267)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
    at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
    at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
    at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
    at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
    at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
    at edu.calpoly.lib.multimedia.big.db.AutomaticPeriodUpdateIBatisImplDBHandler.getGamesWithAutomaticUpdatePolicy(AutomaticPeriodUpdateIBatisImplDBHandler.java:154)
    at edu.calpoly.lib.multimedia.big.game.AutoUpdateThread.run(AutoUpdateThread.java:155)
    The file: AutomaticPeriodUpdateIBatisImplDBHandler.java contains an iBatis call on line # 154:
    --> list = sqlMap.queryForList("getGamesWithAutoPolicy", null);
    from the map file:
    <select id="getGamesWithAutoPolicy" resultClass="java.util.HashMap">
    <![CDATA[
    SELECT gameid, policy
    FROM update_policy
    ]]>
    </select>
    Here is the code for the entire method that uses this transaction:
    ============================
    public List getGamesWithAutomaticUpdatePolicy() throws BIGDatabaseFacadeException
    List list = new ArrayList();
    try
    sqlMap.startTransaction();
    list = sqlMap.queryForList("getGamesWithAutoPolicy", null);
    sqlMap.commitTransaction();
    catch(SQLException sqle)
    throw new BIGDatabaseFacadeException(sqle);
    finally
    try
    sqlMap.endTransaction();
    catch(SQLException sqle)
    throw new BIGDatabaseFacadeException(sqle);
    return list;
    ============================
    I know that this should be handled as an automatic transaction, but I tried adding the start, commit and end transaction commands in my desperate attempt to fix this problem (but it still didn't help).
    Here is my code for creation of sqlMap -
    --> sqlMap = SqlMapClientBuilder.buildSqlMapClient(Resources.getResourceAsReader("sqlMaps.xml"));
    Except for the fact that occasionally connections are not closed, overall my database access using iBatis works very well.
    In the course of trying to fix this problem I've worked to update all my lib files to the latest versions, and here is current status:
    My iBatis lib file: ibatis-2.3.4.726.jar
    My JDBC driver: postgresql-8.4-701.jdbc3.jar
    Required commons files:
    commons-dbcp-1.2.2.jar
    commons-pool-1.5.3.jar
    Note that I tried adding --> commitRequired="true" to the transactionManager in sqlMaps.xml, hoping it might help, but no joy.
    Please help me figure out why my database connections often do not close. Thank you very much!

    I'm sorry, but I don't understand what you mean by "close the session." I believe iBatis is supposed to take care of all that automatically. My understanding is that all the user does is create the sqlMapClient and then use it along with various map files to query and update the database. iBatis does the rest.

  • DBCP Connections not recycling or closing.

    I have implement DBCP using Jakarta-Commons. My connection resource seems to work fine and I am explicitly closing all connections I create. JSTL SQL tags are also using the JNDI resource. However my connection are not being closed or reused. When I allow JSE to crawl the site it quickly taps out the connection pool and Tomcat returns this error:
    "javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: Timeout waiting for idle object"
    Oracle 8i and 9i
    commons-dbcp-1.1.jar
    commons-pool-1.1.jar
    Can anyone help with this?
    Thanks
    JP Steffen

    Ok here is what I am doing.....
    Server.xml
    <Resource name="jdbc/siteoracle" auth="Container" scope="Shareable" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/siteoracle">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>myuser</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>mypword</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:oci:@MYODB</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>removeAbandoned</name>
    <value>true</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>20</value>
    </parameter>
    </ResourceParams>
    web.xml
    <!-- Reference to JNDI Datasource -->
    <resource-ref>
         <description>Oracle Datasource</description>
         <res-ref-name>jdbc/siteoracle</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <!-- JSTL Datasource -->
    <context-param>
         <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
         <param-value>jdbc/siteoracle</param-value>
    </context-param>
    Example Code:
    (JSP Code)
    <!--- Get the Main Info Content --->
    <sql:query var="MyInfo" sql="SELECT myinfo.title FROM myuser.infolocal WHERE myinfoid = ?" >
         <sql:param value="${DefaultmyinfoID}" />
    </sql:query>
    (Servlet Code)
    package Text;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.sql.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    // import Database.*;
    public class LineText extends HttpServlet {
    Connection conn;
    DataSource pool;
    public void doGet(
    HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    PrintWriter out = response.getWriter();
    Clob linetext = null;
    Connection conn=null;
    Statement statement = null;
    ResultSet rs = null;
    String sql =
    "select column_data " +
    "from myuser.data_table " +
    "where dataid = " +
    request.getParameter("DataID") +
    " and languageid = '" +
    request.getParameter("LangID") + "'";
    try {
    Context env = new InitialContext();
    pool = (DataSource)env.lookup("java:comp/env/jdbc/siteoracle");
    } catch (NamingException e) {
    System.out.println("Error: No InitialContext " + e.getMessage());
    try {
    // conn=DataBaseConnection.getConnection();
    conn = pool.getConnection();
    statement = conn.createStatement();
    rs = statement.executeQuery(sql);
    if (rs.next()) {
    linetext = rs.getClob(1);
    else {
    return;
    response.setContentType("text/html");
    Reader in = linetext.getCharacterStream();
    int length = (int)linetext.length();
    char[] buffer = new char[1024];
    while ((length = in.read(buffer)) != -1) {
    out.write(buffer, 0, length);
    in.close();
    in = null;
    out.flush();
    catch (SQLException e) {
    System.out.println(
    "linetext.doGet() SQLException: " +
    e.getMessage() + "executing ");
    System.out.println(sql);
    finally {
    if (rs != null)
    try { rs.close(); } catch (SQLException ignore) { }
    if (statement != null)
    try { statement.close(); } catch (SQLException ignore) { }
    if (conn != null)
    try { conn.close(); } catch (SQLException ignore) { }

  • TCP Socket connection in CLOSE_WAIT status and not getting closed

    I am facing an issue with the TCP socket connections not getting closed and they are in CLOSE_WAIT status for ever.
    As a part of batch process in our application, emails are sent with 4 embedded images. These images are downloaded from 3rd party site with IP say "UUU.XXX.YYY.ZZZ"
    The images are embedded to email as follows
    1. An URL object is created with the site url.
    URL urlPhoto = new
    URL("http://UUU.XXX.YYY.ZZZ/email/photos.jpg");
    2.     The image cid is created with the URL object and the image name
    HtmlEmail htmlEmail = new HtmlEmail();
    String cid1 = htmlEmail.embed(urlPhoto,
    "photo.jpg");
    3.     The image cid is added to the email template by replacing the ${cid1} and the email is sent.
    <td valign="top">
                   <img src="cid:${cid1}" width="279" height="274">
              </td>
    When a mail is sent, 4 new TCP connections are opened and are put in CLOSE_WAIT status for ever. For every mail sent 4 new connections are opened. In UNIX there is an upper limit on the number of open file handles (defaults to 1024) at any point of time. The open TCP connection has the underlying socket in CLOSE_WAIT status and is not getting closed at all. When the upper limit (1024) is reached the batch process is throwing the following exception and terminates.
    Caused by: com.inet.tds.ap: java.net.SocketExceptionjava.net.SocketException: Too many open files
    at com.inet.tds.am.a(Unknown Source)
    at com.inet.tds.TdsDriver.a(Unknown Source)
    at com.inet.tds.TdsDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at com.hcomemea.batchprocess.dataaccess.database.BaseJdbcDao.openConnection(BaseJdbcDao.java:106)
    ... 12 more
    When I run the command lsof in UNIX which list the open file handles in the system
    $ /usr/sbin/lsof -p 22933 -i | grep CLOSE_WAIT
    java 22933 build_master 297u IPv6 129841943 TCP integration.com:47929->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 298u IPv6 129841947 TCP integration.com:47933->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 299u IPv6 129841950 TCP integration.com:47936->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 300u IPv6 129841970 TCP integration.com:47952->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    ���list of 935 connections similarly�
    I tried 2 solutions
    1. Got the HttpURLConnection from the URL object and invoked disconnect method on the same. But it doesn�t work.
    2. Ran the batch process java program with the parameter �Dhttp.keepAlive=false to close the underlying connection but didn�t help.
    I need the underlying sockets to be closed and not put in CLOSE_WAIT status after sending the mail.
    Is it the problem with the embed method of HtmlEmail object not closing the underlying socket connection.
    If anyone has faced this issue before, kindly let me know the possible solutions for the same ASAP.
    Thank you,
    Ramesh G

    This sounds more like a problem due to connection pooling at middle tier/application server.
    If that has been ruled out, then you might to enable DCD or set expiry time on the server.

  • WLS 9.2.1 keeping huge no of opn Embedded LDAP connections

    Hello All,
    While using Embedded LDAP, we see a huge no of open LDAP connections through Admin console.
    We checked the following options:
    GroupMembershipSearching=limited
    MaxGroupMembershipSearchLevel=5
    But still the same issue persists.
    Any idea?
    /ed

    Are all these sockets actually listening or are they waiting to be closed? You can use netstat -a to find the status of these LDAP sockets.
    May be they are not being closed properly.

Maybe you are looking for

  • Error while releasing the Marketing Campaign Status

    Hi Experts, I have created a Campaign in CRM 7.0 and when i am trying to set its New Status to "Release"  (in edit mode) from the current status "Created" ,  the browser is directing me to an error page  "400 Bad HTTP request ".. Can some one suggest

  • Run Time Script Error won't let me open my file

    Hey, I just filled out a PDF form with lost of data. I put a negative number in a field where apparently this is not allowed, and now when I try and open the PDF I get an error message: Script failed (language is formcalc; context is [long variable]

  • Problems with the flash in internet

    When i navegate in internet in webs with flash (for example www.korazza.com) my iphone in Safari don't show this flash. Anyone know if I need a special application to download in the iphone? Thank you

  • . How to sync calender on mobileme

    Registered iphone 3g and ipad with mobileme, but please how to i get the calenders to sync automatically without going to itunes Thanks

  • Prompt NODE_NOT_FOUND when doing archiving object

    Hi Expert, I find an exception raise when accessing logs of archiving objects: "MM_MATNR" and "SD_VBAK" in t-code: SARA. Could you advice what's the problem and how to fix it? Thanks! Rdgs, Emily