Cannot create InitialDirContext sometimes

We have implemented our own DirContext pool which implements the InitialContextFactory interface. The InitialContextFactory has a reference to a singleton class managing the pool.
Sometimes we cannot create a new InitialDirContext with the following error message: "Cannot instantiate class" refering to the InitialContextFactory class. The Root exception is java.lang.ClassNotFoundException. So it seems that the InitialContextFactory class is lost sometimes. Using the -Xnoclassgc improves the situation somewhat. It does still happen sometimes, but now it can start working again without restarting the application. This does not happen all the time, only sometimes, so it does not seem to be a simple case of an erronous classpath.
Our application creates new Contexts often so "new InitialDirContext" and the DirContext close method is called often.
Anyone recognizing the problem or have any suggestions on how to further investigate the cause of the problem? We have monitored memory and file descriptor usage (we are running on a Solaris 10 environment) and we are experiencing leakage due to other components in the system, but it seems that the described problem happens before memory and file descriptors starts to leak.
Best regards,
Andreas

We found the solution to the problem, maybe it can help somebody else:
We had a C-module that used an Event-mechanism in Java. Sometimes when an event was fired, our threadpool created a new thread. If the event originated from the C-module in this case, the created thread inherited the ContextClassLoader from the C-thread, which was null.
Since JNDI uses the threads ContextClassLoader when loading factory classes, our factory was not found.
Best regards,
Andreas

Similar Messages

  • Cannot create and add a new entry to LDAP

    Hi,
    I'm pretty new at LDAP and JNDI, i've been trying to create and add a new entry to the directory but somehow it's not working.
    here is my code and I would appreciate it if someone can help.
    import java.util.Hashtable;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    import javax.naming.*;
    import javax.net.ssl.*;
    import java.io.*;
    public class Newuser
         public static void main (String[] args)
              //LDAPEntry myEntry = new LDAPEntry();
              Hashtable<String, String> env = new Hashtable<String, String>(11);
              String adminName = "CN=ldap_admin,o=JNDITutorial,dc=img,dc=org";
              String adminPassword = "secret";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial,dc=img,dc=org");
                   // Create the initial directory context
                   //JNDILDAPConnectionManager jndiManager = new JNDILDAPConnectionManagerImpl();
                  try{
                       DirContext ctx = new InitialDirContext(env);
                        System.out.println("Connection to LDAP server done" );
                       final String groupDN ="ou=people,o=JNDITutorial,dc=img,dc=org";
                      //DirContext dirCtx = jndiManager.getLDAPDirContext();
                      People people = new People("Thiru","Thiru","Thiru Ganesh","Ramalingam","ou=people","[email protected]");
                      // The Common name must be equal in Attributes common Name
                      ctx.bind("cn=Thiru," + groupDN, people);
                      System.out.println("** Entry added **");
                      //jndiManager.disConnectLDAPConnection(ctx);
                  }catch(NamingException exception){
                      System.out.println("**** Error ****");
                      exception.printStackTrace();
                      System.exit(0);
    }here is the Object class People that i'm trying to instantiate
    public class People implements DirContext {
         public People(String uid,String cn,String givenname,String sn,String ou,String mail) {
        BasicAttributes myAttrs = new BasicAttributes(true);  //Basic Attributes
        Attribute objectClass = new BasicAttribute("objectclass"); //Adding Object Classes
        objectClass.add("inetOrgPerson");
        /*objectClass.add("organizationalPerson");
        objectClass.add("person");
        objectClass.add("top");*/
        Attribute ouSet = new BasicAttribute("ou");
        ouSet.add("people");
        ouSet.add(ou);
        myAttrs.put(objectClass);
        myAttrs.put(ouSet);
        myAttrs.put("cn",cn);
        myAttrs.put("sn",sn);
        myAttrs.put("mail",mail);
    ...the message i keep getting is:
    javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - entry has no objectClass attribute]
    the thing is that I can create and add a new entry in openLDAP from the console and it works.
    and here is how I proceed
    I create a text file: new.txt
    dn:cn=Hamido Saddo,ou=People,o=JNDITutorial,dc=img,dc=org
    cn:Hamido Saddo
    mail:[email protected]
    telephonenumber:3838393038703
    sn:hamdio
    objectclass:top
    objectclass:person
    objectclass:organizationalPerson
    objectclass:inetOrgPersonand i use this command to add the entry:
    ldapadd -D "cn=ldap_admin,O=JNDITutorial,dc=img,dc=org" -W -f new.txtand everything works, i get no errors.
    does anyone has a clue maybe???

    You must have an IMAP email account in order to add additional folders on the iPad mail app.
    If you go to your email account in the Mail app and look at the window where your inbox, trash folder and sent folder are - if there is an Edit button at the top of the window - tap that and then tap Add Mailbox at the bottom.
    If the Edit button is not there - you cannot create folders on the iPad. Your email account is not IMAP. Only IMAP email accounts can create folders on the iPad. Any folders that you would already have in an IMAP account would sync to the device as well.

  • Cannot create Acknowledgement for msd ID:.....

    I am getting following error msg frequently in my JMS receiver comm channel:
    "Cannot create Acknowledgement for msd ID :....."
    This msg is displayed in Runtime workbench for my JMS Receiver comm channel
    Please provide a solution to prevent this error.
    This error comes certain times, and after sometime comm channels starts as usual without any error..

    You want ;
    request.setAttribute("customers", customers);
    instead
    request.setAttribute("customers", "customers");
    regards

  • Getting error "Cannot create a BACPAC from a file that does not contain exported data." from SqlManagementClient.Dac.ImportAsync

    We're trying to import a dacpac to azure via the new SqlManagementClient DacOperations ImportAsync api I get an exception with the error: "Cannot create a BACPAC from a file that does not contain exported data."
    This same dacpac imports fine using an alternate but less friendly API from sql server's tooling. We'd like to use the new management SDK instead for various reasons.

    Hi Kyle A Wilt,
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Cannot create temp directory: The system cannot find the path specified

    Hello
    I am getting Cannot create temp directory when deploying to Oracle AS , can any one help ?
    ---- Deployment started. ---- Apr 23, 2007 8:20:29 AM
    Target platform is Oracle Application Server 10g 10.1.3 (WEBQA01).
    Wrote WAR file to C:\ide\jdeveloper\jdev\mywork\Upload\Upload\deploy\fileupload.war
    Wrote EAR file to C:\ide\jdeveloper\jdev\mywork\Upload\Upload\deploy\fileupload.ear
    Operation failed with error:
    Cannot create temp directory: The system cannot find the path specified
    Deployment failed
    Elapsed time for deployment: 8 seconds
    #### Deployment incomplete. #### Apr 23, 2007 8:20:37 AM

    In Windows, setting the Environmental Variable sometimes DOES NOT WORK.
    The -Djava.io.tmpdir=C:\temp setting must be made in the server properties of the oc4j in order for it to work.
    Jae

  • Cannot create target element(Runtime exception occurred during application

    Hi ,
    this is IDOC TO HTTP Scenario. in error description it is shoein g below error.
    Runtime exception occurred during application
    Cannot create target element (inbound)
    please advice
    thank you.

    Copy the payload from sxmb_moni and test it in the mapping tool using debug mode. I suspect some mandatory elements in target structure requires value but it is missing during mapping. Sometime sender data structure due to values are not getting at runtime does not create target structure element. Check all the individual fields in the mapping tool.

  • Cannot create virtual memory swap file

    Hello,
    I'm getting an error message when i execute the query of a workbook.
    The message I receive is "Cannot create virtual memory swapfile "\EuZ""
    Something to note is that my workbook opened and ran fine in the morning and started crashing in the afternoon.
    I started the workbook on another user's machine
    and works fine... for now.
    I look in the .INI that are created when i open discoverer and found nothing.
    If there is a setting to change or
    someone knows about that problem, let me know.
    NOTE: The version i'm running is dicoverer 9.0.2.39.01
    under windows 2000 (SP3)
    Thank you
    Yan

    This is a (sometimes) bug, at least in Discoverer 3.1 and I see it on some machines when I first install Discoverer. One or two queries may work, and then your message (with garbage characters for the "file name") from then on.
    The program seems to fail to correctly set the cache sizes in the registry (or ini file or whatever it's saving stuff) from the Preferences.
    What fixes it for us (every time) is:
    1. Pull down the [Tools] menu.
    2. Select [Options].
    3. (Scroll right if needed to) select the [Cache] tab.
    4. Set the [Memory Cache] and [Disk Cache] values. You can set them to the values they were going to default to anyway, just type in there and then put it back to the original value so it sees they were "modified" and saves the values when you...
    5. click [OK]
    Apparently the installation defaults are not reliably saved in the first place. "Changing" them in the [Options] dialog will, however, reliably set them and that always cures this problem for our users.
    Regards,
    Chuck Somerville
    Scitex Digital Printing

  • Can not create table with the CLOB type VARRAY, ORA-02348: cannot create VA

    CREATE OR REPLACE TYPE Project AS OBJECT (
    project_no NUMBER(2),
    title VARCHAR2(35),
    cost CLOB );
    CREATE OR REPLACE TYPE ProjectList AS VARRAY(50) OF Project;
    CREATE TABLE department (
    dept_id NUMBER(2),
    name VARCHAR2(15),
    budget NUMBER(11,2),
    projects ProjectList );
    The table creatation always with the error :
    ORA-02348: cannot create VARRAY column with embedded LOB
    Can anybody help ???

    Hi Peng,
    It seems you have hit a limitation of the Oracle version, which you don't post.
    Limitations are sometimes also called a 'feature'.
    You would need to find out whether this restriction has been lifted in a subsequent release or redesign your application.
    Sybrand Bakker
    Senior Oracle DBA

  • Cannot create data store shared-memory segment error

    Hi,
    Here is some background information:
    [ttadmin@timesten-la-p1 ~]$ ttversion
    TimesTen Release 11.2.1.3.0 (64 bit Linux/x86_64) (cmttp1:53388) 2009-08-21T05:34:23Z
    Instance admin: ttadmin
    Instance home directory: /u01/app/ttadmin/TimesTen/cmttp1
    Group owner: ttadmin
    Daemon home directory: /u01/app/ttadmin/TimesTen/cmttp1/info
    PL/SQL enabled.
    [ttadmin@timesten-la-p1 ~]$ uname -a
    Linux timesten-la-p1 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    [root@timesten-la-p1 ~]# cat /proc/sys/kernel/shmmax
    68719476736
    [ttadmin@timesten-la-p1 ~]$ cat /proc/meminfo
    MemTotal: 148426936 kB
    MemFree: 116542072 kB
    Buffers: 465800 kB
    Cached: 30228196 kB
    SwapCached: 0 kB
    Active: 5739276 kB
    Inactive: 25119448 kB
    HighTotal: 0 kB
    HighFree: 0 kB
    LowTotal: 148426936 kB
    LowFree: 116542072 kB
    SwapTotal: 16777208 kB
    SwapFree: 16777208 kB
    Dirty: 60 kB
    Writeback: 0 kB
    AnonPages: 164740 kB
    Mapped: 39188 kB
    Slab: 970548 kB
    PageTables: 10428 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    CommitLimit: 90990676 kB
    Committed_AS: 615028 kB
    VmallocTotal: 34359738367 kB
    VmallocUsed: 274804 kB
    VmallocChunk: 34359462519 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    Hugepagesize: 2048 kB
    extract from sys.odbc.ini
    [cachealone2]
    Driver=/u01/app/ttadmin/TimesTen/cmttp1/lib/libtten.so
    DataStore=/u02/timesten/datastore/cachealone2/cachealone2
    PermSize=14336
    OracleNetServiceName=ttdev
    DatabaseCharacterset=WE8ISO8859P1
    ConnectionCharacterSet=WE8ISO8859P1
    [ttadmin@timesten-la-p1 ~]$ grep SwapTotal /proc/meminfo
    SwapTotal: 16777208 kB
    Though we have around 140GB memory available and 65GB on the shmmax, we are unable to increase the PermSize to any thing more than 14GB. When I changed it to PermSize=15359, I am getting following error.
    [ttadmin@timesten-la-p1 ~]$ ttIsql "DSN=cachealone2"
    Copyright (c) 1996-2009, Oracle. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    connect "DSN=cachealone2";
    836: Cannot create data store shared-memory segment, error 28
    703: Subdaemon connect to data store failed with error TT836
    The command failed.
    Done.
    I am not sure why this is not working, considering we have got 144GB RAM and 64GB shmmax allocated! Any help is much appreciated.
    Regards,
    Raj

    Those parameters look ok for a 100GB shared memory segment. Also check the following:
    ulimit - a mechanism to restrict the amount of system resources a process can consume. Your instance administrator user, the user who installed Oracle TimesTen needs to be allocated enough lockable memory resource to load and lock your Oracle TimesTen shared memory segment.
    This is configured with the memlock entry in the OS file /etc/security/limits.conf for the instance administrator.
    To view the current setting run the OS command
    $ ulimit -l
    and to set it to a value dynamically use
    $ ulimit -l <value>.
    Once changed you need to restart the TimesTen master daemon for the change to be picked up.
    $ ttDaemonAdmin -restart
    Beware sometimes ulimit is set in the instance administrators "~/.bashrc" or "~/.bash_profile" file which can override what's set in /etc/security/limits.conf
    If this is ok then it might be related to Hugepages. If TT is configured to use Hugepages then you need enough Hugepages to accommodate the 100GB shared memory segment. TT is configured for Hugepages if the following entry is in the /u01/app/oracle/EXALYTICS_MWHOME/TimesTen/tt1122/info/ttendaemon.options file:
    -linuxLargePageAlignment 2
    So if configured for Hugepages please see this example of how to set an appropriate Hugepages setting:
    Total the amount of memory required to accommodate your TimesTen database from /u01/app/oracle/EXALYTICS_MWHOME/TimesTen/tt1122/info/sys.odbc.ini
    PermSize+TempSize+LogBufMB+64MB Overhead
    For example consider a TimesTen database of size:
    PermSize=250000 (unit is MB)
    TempSize=100000
    LogBufMB=1024
    Total Memory = 250000+100000+1024+64 = 351088MB
    The Hugepages pagesize on the Exalytics machine is 2048KB or 2MB. Therefore divide the total amount of memory required above in MB by the pagesize of 2MB. This is now the number of Hugepages you need to configure.
    351088/2 = 175544
    As user root edit the /etc/sysctl.conf file
    Add/modify vm.nr_hugepages= to be the number of Hugepages calculated.
    vm.nr_hugepages=175544
    Add/modify vm.hugetlb_shm_group = 600
    This parameter is the group id of the TimesTen instance administrator. In the Exalytics system this is oracle. Determine the group id while logged in as oracle with the following command. In this example it’s 600.
    $ id
    $ uid=700(oracle) gid=600(oinstall) groups=600(oinstall),601(dba),700(oracle)
    As user root edit the /etc/security/limits.conf file
    Add/modify the oracle memlock entries so that the fourth field equals the total amount of memory for your TimesTen database. The unit for this value is KB. For example this would be 351088*1024=359514112KB
    oracle hard memlock 359514112
    oracle soft memlock 359514112
    THIS IS VERY IMPORTANT in order for the above changes to take effect you to either shutdown the BI software environment including TimesTen and reboot or issue the following OS command to make the changes permanent.
    $ sysctl -p
    Please note that dynamic setting (including using 'sysctl -p') of vm.nr_hugepages while the system is up may not give you the full number of Hugepages that you have specified. The only guaranteed way to get the full complement of Hugepages is to reboot.
    Check Hugepages has been setup correctly, look for Hugepages_Total
    $ cat /proc/meminfo | grep Huge
    Based on the example values above you would see the following:
    HugePages_Total: 175544
    HugePages_Free: 175544

  • Cannot create a partion on an unpartitioned drive...

    Hi all;
    Please look at the following figures:
    As you can see on the second figure. I cannot create a partition on it. Can anyone explain why?
    Thanks
    Please VOTE as HELPFUL if the post helps you and remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

    Sometimes when things in Disk Manager aren't making sense for me, I try doing it with diskpart.
    http://technet.microsoft.com/en-us/library/bb490893.aspx
    http://technet.microsoft.com/en-us/library/cc766465(v=ws.10).aspx
    You might give it a try and see if it makes any difference. 
    Are you trying to create a partition with the remaining free space, or simply format that 3rd partition on Disk0?  If the former, you might see if formatting that 3rd partition suddenly opens things up for you.  Just a suggestion.
     

  • Cannot create new mailbox folder on my mac.

    I am trying to add a new mailbox folder and gives me error cannot create on your mac? What is this all about?

    Apparently, Mail has a bug that causes ~/Library/Mail/Mailboxes to sometimes be a file instead of a folder, and that prevents Mail from creating any mailboxes there.
    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    After having fixed all the filesystem issues, if any, proceed as follows:
    1. Quit Mail if it’s running.
    2. In the Finder, go to ~/Library/Mail/.
    3. Locate Mailboxes. If it’s a file instead of a folder, move it to the Trash.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder, i.e. ~/Library is the Library folder within the user’s home folder.

  • Cannot create your bootable usb stick

    Hi all,
    I'm new to bootcamp and I have the following problem:
    When I'm creating a Windows 7 usb drive, it gives me an error "Cannot create your bootable usb stick there was a problem copying files".
    I've tried searching google for the problem, but the only possible solutions I've got was to unmount the iso image and try again, but when I do that I still get the same error and when I check the disk utility I find the iso image is mounted again.
    Does anyone haven an idea about what to do.
    Specs:
    OS X Yosemite 10.10.2
    MacBook Pro Retina 13-inch Mid 2014
    2,6Ghz Core i%
    8 GB 1600 MHz ddr3
    Thanks in advance!

    Please see the Microsoft reference and the second link has an example.
    https://support.microsoft.com/en-us/kb/841290?wa=wsignin1.0
    Bootcamp Windows 8.1 "No Images Are Available"

  • Cannot create recovery disk after update to Win 8.1 on G580

    Friends
    I have a Lenovo G580 that came with Win 8.0 preinstalled. I upgraded it to Win 8.1 over the Internet.
    When I try to run the "Create recovery disk" I get the error that states that "We cannot create a recovery drive for this PC. Some required files are missing..."
    I found out that the winre.wim file that is supposed to be in the C:\Windows\System32\Recovery folder is not there. I cannot locate it anywhere on the C or D drives either. I believe there is a copy on one or more of the recovery partitions but I do not know how to get that file from those partitons.
    I am confused as to why there are seven partitions on that one drive:
    1 Recovery partition 1000 MB
    2 EFI system partition 260 MB
    3 OEM partition 1000 MB
    4. Recovery partition 350 MB
    5. Recovery partition 20 GB
    6. Lenovo D: 25 GB
    7. Windows 8 C: 250 GB
    Can someone help me and give me some instructions on how I can fix the system to find the winre.wim file?
    Thanks for any good input.
    Calle

    Hi Calle,
    Welcome to Lenovo Community Forums!
    I’m sorry to hear that the error message is displayed in your G580 Laptop, as the OS (Operating System) installed is Windows 8.1 or Windows 8. Recovery discs cannot be created only a “Recovery Media” can be created using USB Flash drive, below is the link to create USB recovery drive.
    Create a USB Recovery Drive
    Do post us back if the issue persists.
    Best Regards
    Shiva Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • I just installed Lightroom CC. When I try to open it, I get an error message: "An internal error has occurred.  Cannot create the required folder: ..."

    I just installed Lightroom CC. When I try to open it, I get an error message: "An internal error has occurred.  Cannot create the required folder: ..."

    Cannot create the required folder

  • Database Connection Error Cannot create PoolableConnectionFactory

    Hello everyone,
    Background:
    I have a newly installed and configured Ubuntu server running Tomcat5.5 and Mysql 5.0. This server was created in an attempt to migrate from a Red Hat server in a similar configuration, running the exact same webapp. Most of the configuration/classpath differences between the two platforms have been ironed out.
    The Problem:
    When our webapp trys to connect to the database on localhost, an exception 'java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)' is generated.
    The server.xml configuration is below:
    <Resource name="jdbc/EconDollarsDB"
    auth="Container"
    type="javax.sql.DataSource"
    username="user"
    password="pass"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/DBName?autoReconnect=true"
    maxActive="20" maxIdle="5"
    />I can connect to the database just fine using the command line client and the same username/password combo. This configuration has been working fine for at least a year on the older server. The only similar problems I have found on the net (meaning the same exception is generated) involve applets and attempts to connect to different hosts. This case involves a webapp, connecting to localhost, using a configuration that is known to work! I am simply baffled.
    The following stacktrace is generated:
    javax.servlet.ServletException: Database Connection Error
    Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)'.
    ** BEGIN NESTED EXCEPTION **
    java.security.AccessControlException
    MESSAGE: access denied (java.net.SocketPermission localhost resolve)
    STACKTRACE:
    java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1117)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
         at java.net.InetAddress.getAllByName(InetAddress.java:1061)
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:137)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
         at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
         at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
         at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
         at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
         at edu.tamu.erl.database.dblibrary.plugin.TomcatConnectionFactory.getConnection(TomcatConnectionFactory.java:102)
         at edu.tamu.erl.database.dblibrary.DBManager.getConnection(DBManager.java:70)
         at edu.tamu.erl.database.dblibrary.DBManager.getDBDataAccessObjectList(DBManager.java:318)
         at edu.tamu.erl.econdollars.middletire.SessionManager.getSessionStatus(SessionManager.java:157)
         at edu.tamu.erl.econdollars.middletire.SessionManager.retallyDB(SessionManager.java:637)
         at org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    ** END NESTED EXCEPTION **
    Attempted reconnect 3 times. Giving up.)
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
         org.apache.jasper.runtime.PageContextImpl.access$11(PageContextImpl.java:65)
         org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:766)
         java.security.AccessController.doPrivileged(Native Method)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:764)
         org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:242)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
    edu.tamu.erl.database.dblibrary.DBLibraryBaseException: Database Connection Error
    Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)'.
    ** BEGIN NESTED EXCEPTION **
    java.security.AccessControlException
    MESSAGE: access denied (java.net.SocketPermission localhost resolve)
    STACKTRACE:
    java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1117)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
         at java.net.InetAddress.getAllByName(InetAddress.java:1061)
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:137)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
         at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
         at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
         at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
         at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
         at edu.tamu.erl.database.dblibrary.plugin.TomcatConnectionFactory.getConnection(TomcatConnectionFactory.java:102)
         at edu.tamu.erl.database.dblibrary.DBManager.getConnection(DBManager.java:70)
         at edu.tamu.erl.database.dblibrary.DBManager.getDBDataAccessObjectList(DBManager.java:318)
         at edu.tamu.erl.econdollars.middletire.SessionManager.getSessionStatus(SessionManager.java:157)
         at edu.tamu.erl.econdollars.middletire.SessionManager.retallyDB(SessionManager.java:637)
         at org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    ** END NESTED EXCEPTION **
    Attempted reconnect 3 times. Giving up.)
         edu.tamu.erl.database.dblibrary.plugin.TomcatConnectionFactory.getConnection(TomcatConnectionFactory.java:105)
         edu.tamu.erl.database.dblibrary.DBManager.getConnection(DBManager.java:70)
         edu.tamu.erl.database.dblibrary.DBManager.getDBDataAccessObjectList(DBManager.java:318)
         edu.tamu.erl.econdollars.middletire.SessionManager.getSessionStatus(SessionManager.java:157)
         edu.tamu.erl.econdollars.middletire.SessionManager.retallyDB(SessionManager.java:637)
         org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:88)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)Any help would be greatly appreciated.

    Hi,
    Its clearly saying the connect permission is missing with the current available policy.
    you add the following permisson entry to the <installed JRE>\lib\security\java.policy file.
    (e.g) C:\Program Files\Java\j2re1.4.2_08\lib\security\java.policy
    permission java.security.AllPermission;
    grant{
    permission java.security.AllPermission;
    If the application is running standalone then the code is allowed uncontrolled access but for webapplicatons running through browser, the security check is performed for the configured JRE.
    Regards
    Karthik
    <[email protected]>

Maybe you are looking for