Exception in finally

hi,
i throw an Exception in try block and also throw an Exception in finally block. why do i get only the Exception thrown in finally block.
i completely lose the Exception thrown in try block.
The reason i'm asking this is because of the way JUnit is written.
They call Setup and tests in try block and tearDown in a finally block.
if an Exception happens in test and also Exception happens in tearDown, the test results show the test failed with exception in tearDown. Actually i expect the results to show as test failed in the test. Is this a java bug?
thanks
venkat

If I did understand your question right, I find it very strange. For my it works as expected.
Sounds very strange, you should get the thrown Exception in both the try-catch and in your finally-try-catch.
try to just fill your stack and see if it will be displayd later in the finallys thrown exception. (use the fillinstacktrace).
    public void doSomething()
        int[] a = new int[2];
        String b = null;
        try
            System.out.println( a[3] );
        catch( ArrayIndexOutOfBoundsException aioobe )
            System.out.println("in catch");
            sleep(500);
            aioobe.printStackTrace();
            throw (ArrayIndexOutOfBoundsException) aioobe.fillInStackTrace();
        finally
            try
                System.out.println( b.length() );
            catch( NullPointerException npe )
                System.out.println("in finally");
                sleep(500);
                npe.printStackTrace();
    }good luck!

Similar Messages

  • Exception: Given final block not properly padded

    Hi,
    I generated an password encrypted RSA private key using the following openssl command.
    openssl pkcs8 -topk8 -in private.pem -outform DER -out private.der -v2 des3
    I am using the following piece of code to decrypt private.der using a password entered by the user.
    For now, I assume that the password is of 24 bytes long.
    1. The following method throws an exception saying "Given final block not properly padded."
    How can I fix it?
    2. Since private.der is created by openssl, I didn't provide salt and iv paramters.
    Are they embedded in the file itself?
    Does the objects in the following method takes care of them automatically?
    Thanks.
    public byte[] readDES3EncryptedPrivateKey2(final String password,
                                                final String privateKeyFilePath)
    throws Exception
            File privateKeyFile = new File(privateKeyFilePath);
            byte[] encryptedPrivateKey = FileUtils.readFileToByteArray(privateKeyFile);
            final byte[] passwordInBytes = password.getBytes("UTF-8");
            DESedeKeySpec keySpec = new DESedeKeySpec(passwordInBytes);
            SecretKey key = SecretKeyFactory.getInstance(DES3).generateSecret(keySpec);
            javax.crypto.EncryptedPrivateKeyInfo epki = new javax.crypto.EncryptedPrivateKeyInfo(
                    encryptedPrivateKey);
            AlgorithmParameters ap = epki.getAlgParameters();
            des3Cipher.init(Cipher.DECRYPT_MODE, key, ap);
            // Error: Given final block not properly padded
            return des3Cipher.doFinal(epki.getEncryptedData());
        }

    I've run into similar things. Have you tried padding the data you are trying decrypt to the block size of DES3?

  • Determining Exception in finally clause

    Is it possible to determine if an Exception has been thrown in a finally clause?
    This is in reaction to the anti-pattern log and throw.
    Bad:
    try
        someCall();
    catch (someException e)
        log(e.getMessage());
        throw someException("oops", e);
    }What I want:
    try
        someCall();
    finally
        boolean exceptionThrown = magicHere();
        if (exceptionThrown)
            // get the exception message, log the message
    }of course, this may be an anti-pattern as well.

    The 'Log and throw' antipattern just says that you should either log or throw, not both, i.e. that somebody somewhere must catch and absorb the exception, log it, and do something about it, and that that somebody should be unique. Logging it more than once doesn't add anything useful to the log and it also destroys the original stack trace. If you need to know whether an exception occurred here, the antipattern implies that you should logging it here and doing something about it here.
    But I agree that antipatterns aren't set in stone, and once you set out the underlying assumptions as above it is easy to devise counter-examples where they don't apply.

  • Catching causal exceptions from finally{} block?

    I have some code that I have not developed, yet from what I can tell throws Exceptions as in the following psuedo-code:
    public void foobar() throws BarException, FooException {
            try {
                  throw new FooException();
            } finally {
                    throw new BarException();
    }This expectedly returns BarException, not FooException. Question is since FooException was thrown, is there any way to get a reference to the original cause?

    This is due to the good-ol' problem of cleaning up
    java.sql.Connection objects to a connection pool in
    the finally block yet wanting to ensure the original
    exception is propagated to the calling method,
    whereas the OP should catch the exception,
    maintain temporary reference, then use it as a
    reference to the other Exception in the finally
    if there's no better way for her to do it.There's a better way to do it. You don't need to keep a temp reference to that exception in your finally block. Finally doesn't need to know anything about the exception. public void foo() {
        try {
            Bar bar = sqlStuff();
        catch (SQLException exc) {
            // This catch block will execute if  SQLException is thrown at *1*
            System.err.println("I got a SQLException!");
    private Bar sqlStuff() throws SQLException, MyException {
        try {
            // *1* do something that might throws SQLException, and maybe something else
            return aBar;
        catch (SomeOtherException exc) {
            throw new MyException(exc);
        finally {
            // close ResultSet, Statement, Connection
            // NO EXCEPTION re-throwing
        // or return aBar here
    } If a SQLException is thrown inside the try block, finally will execute, and then the method will throw that original SQL exception. If SomeOtherException is thrown, it will be caught, a new MyException will be created to wrap it, the finally block will execute, and the MyException will be thrown from the method. If everything goes well, the finally block will execute, and the method will return aBar.
    All this will happen without the finally block touching or knowing about any exception that was thrown before entering it.

  • Exceptions handling (finally)

    try {
    catch {
    finally {
    What is the purpose of "finally" if I can catch an error using "catch"? Any example?
    Thanks,

    http://java.sun.com/docs/books/tutorial/essential/exceptions/index.htmlIt's for cleanup code that will get executed regardless of how and where the try and catch blocks complete. Throw, return, normal completion--regardless, the finally block will execute.

  • Finally cause Exception be forgotten

    In trying out that finally cause previous return value be forgotten, as described on page 206 of "The Java Programming Language, 3rd edition", I wrote the following code, and tested it with jdk1.3.1. To my supprise, not only the return value was forgotten, the exception was appeared forgotten as well:
    class PException extends Exception {
    class Final {
        void f1(int i) {
         int result;
         System.out.println("f1("+i+")");
         try {
             result = f2(i);
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("caught an Exception: " + e);
         try {
             result = f3(i);
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("caught an Exception: " + e);
        int f2(int i) throws PException {
         try {
             if (i == 1) {
              System.out.println("generate exception");
              throw new PException();
             return 1;
         } finally {
             return 2;
        int f3(int i) throws PException {
         if (i == 1) {
             System.out.println("generate exception");
             throw new PException();
         return 1;
        public static void main(String[] args) {
         Final f = new Final();
         f.f1(1);
         f.f1(2);
         f.f1(1);
    }Here is the result:
    f1(1)
    generate exception
    result = 2
    generate exception
    caught an Exception: PException
    f1(2)
    result = 2
    result = 1
    f1(1)
    generate exception
    result = 2
    generate exception
    caught an Exception: PException

    The concern here is that when the
    try {
    finally {
    }pattern is used, without the catch block, purelly for flow control purpose, a return statement in the finally block could be problematic. If a finally block ends with a return statement, any exception that might be thrown in the try block would be ignored. The unhandled exception will not propergate, it simply lost in the midst. Because any code could throw unchecked exception, if the exception cannot afford to be lost, then one should be careful not to use return in the finally block. See the following test code:
    class Finally {
        void test() {
         int result;
         System.out.println("test()");
         try {
             result = f1();
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
         try {
             result = f2();
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
         try {
             f3();
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
         try {
             f4();
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
        int f1() {
         System.out.println("f1()");
         int a = 0;
         int b = 0;
         try {
             a = 1/0;  // this generate an unchecked exception
             b = 1;
         } finally {
             return b; // this return clobber the unchecked exception
        int f2() {
         System.out.println("f2()");
         int a = 0;
         int b = 0;
         a = 1/0; // this generate an unchecked exception
         b = 1;
         return b;
        void f3() {
         System.out.println("f3()");
         int a = 0;
         int b = 0;
         try {
             a = 1/0;  // this generate an unchecked exception
             b = 1;
         } finally {
             return;   // this return clobber the unchecked exception
        void f4() {
         System.out.println("f4()");
         int a = 0;
         int b = 0;
         try {
             a = 1/0;  // this generate an unchecked exception
             b = 1;
         } finally {
        public static void main(String[] args) {
         Finally f = new Finally();
         f.test();
    /code]
    Here are the results:test()
    f1()
    result = 0
    f2()
    Caught an Exception: java.lang.ArithmeticException: / by zero
    f3()
    f4()
    Caught an Exception: java.lang.ArithmeticException: / by zero
    We see that the devide by zero exception throw by f1() simply vanished, the unintended result 0, instead of the intended result 1, is returned. The test() method did not detect any abnormality in f1(), which is scary. To drive the point home, we try f3() and f4(), which has void return type. A simple return statement in f3() causes exception be lost. The stack frame seems intact, for otherwise, the test() method would exit abruptly before f2() even get a chance to be called.

  • Finally and Exceptions

    I remember, that there was some issues related to the exceptions in the code like the one below. Maybe someone can remember what it was?  public void test() throws Exception {
        try {
          throw new Exception( "1"); 
        } catch( Exception ex) {
          throw new Exception( "2");
        } finally {
          try {
            throw new Exception( "3");
          } catch( Exception ex2) {
            throw new Exception( "4");
          } finally {
            throw new Exception( "5");
      }

    And this is why I hate compact notation...
    All cleaned up :)
    public void test() throws Exception
          try
                throw new Exception( "1");
          catch (Exception ex)
                throw new Exception( "2");
          finally
                try
                      throw new Exception( "3");
                catch (Exception ex2)
                      throw new Exception( "4");
                finally
                      throw new Exception( "5");
    }

  • Invalid Argument Exception on Java API's DB Close

    When closing the database via the Java API's close method, I am getting an invalid argument exception... how can this be fixed... subsequent access to the DB causes the JVM to crash??
    ERROR: An exception has occurred: java.lang.IllegalArgumentException: Invalid argument
    java.lang.IllegalArgumentException: Invalid argument
    at com.sleepycat.db.internal.db_javaJNI.DbEnv_close0(Native Method)
    at com.sleepycat.db.internal.DbEnv.close0(DbEnv.java:217)
    at com.sleepycat.db.internal.DbEnv.close(DbEnv.java:77)
    at com.sleepycat.db.Environment.close(Environment.java:39)
    at com.sleepycat.dbxml.XmlManager.closeInternal(XmlManager.java:301)
    at com.sleepycat.dbxml.XmlManager.delete(XmlManager.java:33)
    at com.sleepycat.dbxml.XmlManager.close(XmlManager.java:310)
    at com.iconnect.data.adapters.BerkleyXMLDBImpl.insert(BerkleyXMLDBImpl.java:827)
    at com.iconnect.data.DataManagerFactory.insert(DataManagerFactory.java:182)
    at Xindice2Berkley.main(Xindice2Berkley.java:99)

    I had the same problem. I could fix it by carefully calling the delete() function on all those DBXML Xml..xyz objects that you create when you perform queries etc. It seems that those Java objects have some 'shadow' object in the underlying DLL and by calling delete() you free resources that remain otherwise assigned (maybe somebody with a C++ background who programmed this stuff?). Call delete() before the Java object gets out of scope. For instance:
    results = mgr.query(collection,context,null);
    XmlValue value;
    try {
    while ((value = results.next()) != null) {
    XmlValue c = value.getFirstChild();
    String ref = c.getNodeValue();
    c.delete(); c = null;
    value.delete(); value = null;
    catch (Exception e) {
    finally {
    if (results != null) {
    results.delete();
    results = null;
    Once i did this on all possible dbxml objects i used in my code, the java.lang.IllegalArgumentException: Invalid argument disappeared.
    Message was edited by:
    user562374

  • How should I deal with exceptions?

    I have three possible choices that I see:
    (1) Deal with them in an exception handler class. Use try/catch/throw in the class. Have throw call a method in the exception handler class.
    (2) Use try/catch/throw and handle the exception in the same class where the exception occurs.
    (3) Use throws and deal with the exceptions in the mediator class. The mediator class allows for communication between my FileHandler class, my DBHandler class, my UIClass, and any future classes.
    Note that for each exception, I want to call a method in the UI class that displays a message to the user about the error so it can be debugged and a method in some class to write the error to an error log text file.

    Handling
    can mean as little as logging the error.I'm gonna have to go ahead and disagree with youthere, %.
    Disagree with me? This cannot be tolerated! 8)Watch it, lest yet get yer ass smote.
    Except for where you're intentionally
    smothering exceptions in finally blocks, or maybe
    just recording an InterruptedException, justlogging
    it is little better than smothering it. So what about unchecked exceptions? Are these .NET
    demon spawn?I let unchecked exceptions bubble up. I'd expect an appserver to catch and log them, so that a bug in one app doesn't cause the whole server to barf. But other than that kind of situation, these are exceptions that you usually shouldn't try to handle.
    >
    I'm curious, since this thread is so much about
    handling exceptions. What do people do besides
    report them? If you get a SQL exception, what
    recovery actions are you taking? Anything that I'm
    missing?Usually it just bubbles up, or it's a wrapped in a more appropriate or layer-specific exception and rethrown. Sometimes there might be a retry, but usually the exception bubbles up to the higher layers and gets presented to the user as something like, "Could not connect. Retry?" What I hate to see is this:
    try {
        // get stuff from the DB
    catch (SQLExeption exc) {
        // log it
    // Continue here (where "here" may be the calling method)
    // with no idea that anything went wong.If you do that, you might as well not have an exception mechanism. Just go back to return codes and don't bother checking them.

  • J2me & servlet - exception  in midlet output

    I am invoking servlet in my MIDlet application. when i invoke on my local netword with local ip of web server it works properly on browser and midlet. but when i invoke with internet with global ip of web server it works properly only on browser not on MIDlet. it gives msg - "Uncaught exception java/lang/IllegalArgumentException"
    i am not understanding the problem and helpless...
    please help me to solve this problem....
    my code is here... (for invoking servlet on midlet - i am displaying returning value of this method on form)
    methos in medlet
    public String invokeServlet(String data) throws IOException
    //String url="http://127.0.0.1:8081/dictionary/searchword_mobile?word=" + data; //working properly
    //String url="http://192.168.1.54:8081/dictionary/searchword_mobile?word=" + data; //working properly
    //String url="http://192.168.0.115:8080/dictionary/searchword_mobile?word=" + data; //working properly
    String url="http://202.144.52.226:8080/dictionary/searchword_mobile?word=" + data; //not working gives exception
    HttpConnection c = null;
    InputStream is = null;
    StringBuffer b = new StringBuffer();
    try
    c = (HttpConnection)Connector.open(url);
    c.setRequestMethod(HttpConnection.GET);
    c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-CA");
    is = c.openDataInputStream();
    int ch;
    while ((ch = is.read()) != -1)
    b.append((char) ch);
    catch (Exception e)
    wordbox.setString("Exception " + e);
    finally
    if(is!= null)
    is.close();
    if(c != null)
    c.close();
    return b.toString();
    =======================
    servlet code
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.dictionary.wordpack.WordDAO;
    public class SearchWordServlet_Mobile extends HttpServlet
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException
              String word=request.getParameter("word");
              String returndata=new WordDAO().searchword_mobile(word);
              //System.out.println("word for searching : " + word);
              response.setHeader("Content-Type", "application/octet-stream");
              response.setHeader("Cache-Control","no-store");
              response.setHeader("Cache-Control", "no-cache");
              response.setHeader("Pragma","no-cache");
              response.setHeader("Cache-Control", "no-transform");
              response.setHeader("Connection", "Keep-Alive");
              response.setHeader("Proxy-Connection", "Keep-Alive");
              response.setContentType("text/plain");
              response.setContentLength(returndata.length());          
              ServletOutputStream out=response.getOutputStream();
              out.print(returndata);                         
              out.close();          
    =====================
    plseae suggest me solution for this problem.
    thanks in advance...

    Are you able to receive any data in simulator I mean to say are you getting the same exception in simulator too?
    Use POST method in place of GET, and check.
    What are you passing in the variable data? May be the data size is exceeding the limit.
    If you resolved then don't forget to reward!!!
    Shan!!!

  • About the finally block of the try catch.

    I know that finally block contains the code that will be executed in any condition of the try catch.
    However, I think it is unneccessary, since the stack after the try catch stack will be executed any way.
    Any one can help?
    for example
    try{
    System.in.read();
    catch(Exception e){}
    finally
    { System.out.println("does this matter?");}and
    try{
    System.in.read();
    catch(Exception e){}
    System.out.println("does this matter?");

    However, I think it is unneccessary, since the stackafter the try catch
    stack will be executed any way.That does assume that you catch and handle the error
    appropriately.
    Of course this is valid as well, and demonstrates
    when you would WANT a finally clause.
    Connection con = null;
    Statement stmt = null;
    try{
    con  = Database.getConnection();
    stmt = con.createStatement("Select * from dual");
    // maybe something throws an exception here?
    finally{
    if (stmt != null){
    stmt.close();
    if (con != null){
    con.close();
    The finally block here might throw a null pointer exception itself use
    null!=stmt null!=stmt

  • Exception during call webservice from Web Dyn Pro application

    I receive exception when execute call to webservice. I found place where it fall, it is in stub classmdp\company\wd\_comp\src\packages\com\accenture\mdp\company\model\companybasic\proxies\Config1BindingStub.java
    in method below, in line
    this.transportBinding.call(this.stubConfiguration,this.globalProtocols,_getOperationProtocols("filterCompany"));
    public com.accenture.mdp.company.model.companybasic.proxies.types.p4.FilterCompanyResponse filterCompany(com.accenture.mdp.company.model.companybasic.proxies.types.p4.FilterCompany parameters) throws java.rmi.RemoteException,com.accenture.mdp.company.model.companybasic.proxies.Exception,com.accenture.mdp.company.model.companybasic.proxies.MDPException {
        try {
          super._beginLogFrame();
          // Operation input params initialization
          this.inputParams = new ServiceParam[1];
          this.inputParams[0] = new ServiceParam();
          this.inputParams[0].isElement = true;
          this.inputParams[0].schemaName = new QName("urn:CompanyServiceVi","filterCompany");
          this.inputParams[0].name = "parameters";
          this.inputParams[0].contentClass = com.accenture.mdp.company.model.companybasic.proxies.types.p4.FilterCompany.class;
          this.inputParams[0].content = parameters;
          // Operation output params initialization
          this.outputParams = new ServiceParam[1];
          this.outputParams[0] = new ServiceParam();
          this.outputParams[0].isElement = true;
          this.outputParams[0].schemaName = new QName("urn:CompanyServiceVi","filterCompanyResponse");
          this.outputParams[0].name = "parameters";
          this.outputParams[0].contentClass = com.accenture.mdp.company.model.companybasic.proxies.types.p4.FilterCompanyResponse.class;
          // Operation faults initialization
          this.faultParams = new ServiceParam[2];
          this.faultParams[0] = new ServiceParam();
          this.faultParams[0].isElement = true;
          this.faultParams[0].schemaName = new QName("urn:CompanyServiceWsd/CompanyServiceVi","filterCompany_java.lang.Exception");
          this.faultParams[0].name = "errorPart";
          this.faultParams[0].contentClass = com.accenture.mdp.company.model.companybasic.proxies.Exception.class;
          this.faultParams[1] = new ServiceParam();
          this.faultParams[1].isElement = true;
          this.faultParams[1].schemaName = new QName("urn:CompanyServiceWsd/CompanyServiceVi","filterCompany_com.accenture.mdp.common.exceptions.MDPException");
          this.faultParams[1].name = "errorPart";
          this.faultParams[1].contentClass = com.accenture.mdp.company.model.companybasic.proxies.MDPException.class;
          com.accenture.mdp.company.model.companybasic.proxies.types.p4.FilterCompanyResponse parametersTemp;
          this.transportBinding.setTypeMappingRegistry(this.typeRegistry);
          this.transportBinding.startOperation(this.inputParams,this.outputParams,this.faultParams);
          // Binding Context initialization
          this.bindingConfiguration.clear();
          bindingConfiguration.setProperty("soapAction","");
          bindingConfiguration.setProperty("style","document");
          bindingConfiguration.setProperty("transport","http://schemas.xmlsoap.org/soap/http");
          PropertyContext bindingConfigurationX;
          bindingConfigurationX = bindingConfiguration.getSubContext("output");
          bindingConfigurationX.setProperty("operationName","filterCompany");
          bindingConfigurationX.setProperty("use","literal");
          bindingConfigurationX = bindingConfiguration.getSubContext("input");
          bindingConfigurationX.setProperty("operationName","filterCompany");
          bindingConfigurationX.setProperty("use","literal");
          bindingConfigurationX.setProperty("parts","parameters");
          super._fillEndpoint(bindingConfiguration);
          _buildOperationContext("filterCompany",this.transportBinding);
          this.transportBinding.call(this.stubConfiguration,this.globalProtocols,_getOperationProtocols("filterCompany"));
          _setEndpoint((String) bindingConfiguration.getProperty(com.sap.engine.services.webservices.jaxrpc.wsdl2java.ClientTransportBinding.ENDPOINT));
          if (this.faultParams[0].content != null) {
            throw (com.accenture.mdp.company.model.companybasic.proxies.Exception) this.faultParams[0].content;
          if (this.faultParams[1].content != null) {
            throw (com.accenture.mdp.company.model.companybasic.proxies.MDPException) this.faultParams[1].content;
          parametersTemp = (com.accenture.mdp.company.model.companybasic.proxies.types.p4.FilterCompanyResponse) this.outputParams[0].content;
          return parametersTemp;
        } catch (com.accenture.mdp.company.model.companybasic.proxies.Exception e) {
          throw e;
        } catch (com.accenture.mdp.company.model.companybasic.proxies.MDPException e) {
          throw e;
        } catch (javax.xml.rpc.soap.SOAPFaultException e) {
          throw e;
        } catch (java.lang.Exception e) {
          throw new RemoteException("Service call exception",e);
        } finally {
          super._endLogFrame("filterCompany");
    I receive Service call exception; nested exception is: java.lang.NullPointerException
    May be anybody could suggest me how can I get more information about of  reason of this exceprion ?
    How to repair it ?

    Check the following path in your server:
    If you are using NW04s: :\usr\sap\<InstanceName>\JC00\j2ee\cluster\server0\log\
    If you are using CE: :\usr\sap\<InstanceName>\J00\j2ee\cluster\server0\log.
    If you are using CE: [Log Viewing with the SAP MC|http://help.sap.com/saphelp_nwce10/helpdata/en/44/f71b59e38e2462e10000000a1553f7/content.htm]
    Bala

  • Doubt in a Finally block ?

    ques 1 :: public class Main {
       public String test() throws Exception
           try
               throw new Exception();
           catch(Exception e)
                throw new Exception();
           finally
        public static void main(String[] args) {
              try{
           new Main().test();
               catch(Exception e)
                  e.printStackTrace();
        }According to sun documentation ,a method whose return type is String,int,.. must have return statement otherwise compiler will show an error.But according to this program it will not show any compiler error.Can you please suggest or explain me how this program is compiling.
    I have fair idea, that when you throw any exception and after that if u give return statement then it will say its not reachable.
    ques 2::
       public String test() throws Exception
           try
               throw new Exception();
           catch(Exception e)
                throw new Exception();
           finally
      return "abc";
        }Again am using same method but here am just returning an value. I want to know what will happen to that new Exception() object which we are throwing at catch block.Since its returning value as "abc".
    If you just comment that return statement then it will throw Exception.
    Please clarify this also.

    My first recommendation is that you build an experiment and see how it behaves. That way you will know without a doubt what to expect based on your coding style. I'm not in any way saying that the behavior is in any way different from what the documentation illustrates, only that if you build a test you'll know for sure. Otherwise, you'll know what we told you and what the documentation says.
    Puckstopper's rules #6 - It is preferred to have a single return from any given method. The exception to this rule is if you reach a point in the code that is non-exceptional but creates a condition where the rest of the method should not execute. (There is another rule that relates to this condition that says that in this case the functionality should really be divided because it is clearly overly complex.)
    That leads us to a basic code pattern.
    int retVal = 0 ; // Initialize to a neutral condition or the default condition
    try{
        // Do some stuff that might cause an exception to be thrown
        retVal = RESOLUTION_STATE
    // Be specific about exceptions
    catch(Exception e){
        // Do something to handle the exception in a graceful and tidy manner.
        // Code that simply barfs the stack trace will incur the wrath of the Exception Gods
    finally{
        // Do anything relating to the code in the try and only in the try that must happen no matter what
    return retVal ;This does not address the question of whether the exception(s) can or should be handled here. Only a cohesive way of dealing with the try/catch/finally construct and returning from a method.
    PS.

  • Oracle OLAP ExpressDataProvider Exceptions

    Hi
    I'm using Oracle 9i OLAP API. There's something strange going on here. I written a test program that accesses the metadata and displays all it's contents. It runs fine on my home PC. At college the same program running on the same settings as that of my home PC (including the jar files required) gives me the error shown by the staacktrace below:
    Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.OracleConnection.getTypeMap()Ljava/util/Map;
    at oracle.express.idl.util.TypeMapHelper.setTypeMap(TypeMapHelper.java:14)
    at oracle.express.olapi.data.full.ExpressDataProvider.initialize(ExpressDataProvider.java:150)
    at metadata.main(metadata.java:44)
    Press any key to continue...
    I am also sending the code below:
    import java.sql.*;
    import oracle.jdbc.driver.OracleSavepoint;
    import com.sun.java.util.collections.Map;
    import com.sun.java.util.collections.List;
    import com.sun.java.util.collections.Iterator;
    import oracle.express.olapi.transaction.ExpressTransactionProvider;
    import oracle.express.olapi.data.full.ExpressDataProvider;
    import oracle.olapi.data.source.Source;
    import oracle.olapi.metadata.MetadataObject;
    import oracle.express.*;
    import oracle.olapi.*;
    import oracle.jdbc.OracleConnection;
    import oracle.express.mdm.*;
    import oracle.dms.console.DMSConsole;
    import oracle.jdbc.driver.DMSFactory;
    class metadata
    public static void main(String[] args)
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String url="jdbc:oracle:thin:@ss14:1521:OLAP";
    String user="sh";
    String passwd="sh123";
    OracleConnection conn=(oracle.jdbc.OracleConnection)DriverManager.getConnection(url,user,passwd);
    ExpressTransactionProvider tp=new ExpressTransactionProvider();
    ExpressDataProvider dp=new ExpressDataProvider(conn,tp);
    dp.initialize();
    MdmMetadataProvider mp=null;
    mp=(MdmMetadataProvider)dp.getDefaultMetadataProvider();
    MdmSchema root=mp.getRootSchema();
    System.out.println("Created Root Schema object...[OK]");
    Explorer ex=new Explorer(root);
    }catch(Exception e)
    e.printStackTrace();
    class Explorer
    MdmSchema root;
    public Explorer(MdmSchema root)
    this.root=root;
    get_Dimensions();
    public void get_Dimensions()
    MdmDimension mdmDim=null;
    List dim=root.getDimensions();
    System.out.println("Listing Dimensions");
    Iterator iter=dim.iterator();
    while(iter.hasNext())
    mdmDim=(MdmDimension)iter.next();
    System.out.println(mdmDim.getName());
    System.out.println("Getting the regions within dimensions");
    MdmUnionDimensionDefinition unionDef=(MdmUnionDimensionDefinition)(mdmDim.getDefinition());
    try{
    List hierarchies=unionDef.getRegions();
    System.out.println("Tapped Dimensional metadata..[OK]");
    Iterator hieriter=hierarchies.iterator();
    MdmHierarchy mdmHier=null;
    while(hieriter.hasNext())
    mdmHier=(MdmHierarchy)hieriter.next();
    System.out.println(mdmHier.getName());
    }catch(Exception npe)
    System.out.println("No regions present");
    System.out.println("Determining Dimension Type");
    try{
    MdmDimensionMemberType dim_memb_type=mdmDim.getMemberType();
    //check for the type of member
    if(dim_memb_type instanceof MdmStandardMemberType)
    System.out.println("Dimension is a standard dimension");
    if(dim_memb_type instanceof MdmTimeMemberType)
    System.out.println("Dimension is a TIME dimension");
    if(dim_memb_type instanceof MdmMeasureMemberType)
    System.out.println("Dimension is a Measure Member Type");
    }catch(Exception e)
    System.out.println("Exception:"+e);
    //finally to finish off let's tap the attributes of each dimension
    try{
    List attrList=mdmDim.getAttributes();
    MdmAttribute attribute=null;
    Iterator attrIter=attrList.iterator();
    while(attrIter.hasNext())
    attribute=(MdmAttribute)attrIter.next();
    System.out.println("Attribute:"+attribute.getName());
    }catch(Exception e)
    System.out.println("Exception:"+e);
    I dunno what's happening.Someone help with this please.
    It's urgent
    Thanx
    Prahalad Deshpande

    Good questions and I have put them to the docs team to (1) update the online docs and (2) respond here. Let's see if they do.

  • Java.lang.reflect.InvocationTargetException: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader ) exception at startup

    Hi Everybody
    I downloaded and installed weblogic as per the installation document
    but I am getting the following exception and finally the server
    is started. Can somebody help me to resolve this problem
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:24)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:35 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.jts.internal.CoordinatorFactoryImpl.start(CoordinatorFactoryImpl.java:52)
         at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:33)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:35 EST 2001:<I> <WebLogicServer> Invoking main-style
    startup weblogic.jdbc.common.internal.JdbcStartup weblogic.jdbc.common.internal.JdbcStartup
    Wed Feb 28 12:55:35 EST 2001:<E> <JDBC Init> ERROR: Could not get
    JNDI context: javax.naming.NoInitialContextException: Cannot instantiate
    class: weblogic.jndi.WLInitialContextFactory [Root exception is
    java.security.AccessControlException: access denied (java.lang.RuntimePermission
    getClassLoader )]
    Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Beginning startup process
    Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Init JMS Security
    Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Initializing from weblogic.properties
    Wed Feb 28 12:55:35 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
         at weblogic.jms.server.JMSManager.getContext(JMSManager.java:835)
         at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:483)
         at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
         at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:35 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
         at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:488)
         at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
         at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Startup process complete.
    JMS is active
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
         at weblogic.jms.server.JMSManager.initSessionPoolManager(JMSManager.java:317)
         at weblogic.jms.server.JMSManager.init(JMSManager.java:308)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound SessionPoolManager
    as weblogic.jms.SessionPoolManager
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
         at weblogic.jms.server.JMSManager.initConnectionConsumerManager(JMSManager.java:333)
         at weblogic.jms.server.JMSManager.init(JMSManager.java:310)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound ConnectionConsumerManager
    as weblogic.jms.ConnectionConsumerManager
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1476)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1495)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <WebLogicServer> Invoking main-style
    startup RMI Registry weblogic.rmi.internal.RegistryImpl
    Wed Feb 28 12:55:36 EST 2001:<I> <RMI> Registry started
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.common.internal.T3BindableServices.initialize(T3BindableServices.java:114)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.ejb.internal.EJBManagerImpl.bindToJNDI(EJBManagerImpl.java:580)
         at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:226)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <EJB> Cannot intialize Mail Session
    resources because could not get JNDI context: javax.naming.NoInitialContextException:
    Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
    [Root exception is java.security.AccessControlException: access
    denied (java.lang.RuntimePermission getClassLoader )]
    Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 EJB jar files loaded,
    containing 0 EJBs
    Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 deployed, 0 failed to
    deploy.
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at java.lang.SecurityException.<init>(Compiled Code)
         at java.security.AccessControlException.<init>(Compiled Code)
         at java.security.AccessControlContext.checkPermission(Compiled
    Code)
         at java.security.AccessController.checkPermission(Compiled Code)
         at java.lang.SecurityManager.checkPermission(Compiled Code)
         at java.lang.Thread.setContextClassLoader(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(Compiled
    Code)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
         at weblogic.jndi.Environment.getContext(Environment.java:122)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
         at weblogic.io.common.internal.T3FileSystemProxyImpl.installFileSystems(Compiled
    Code)
         at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
         at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.Server.startServerDynamically(Server.java:99)
         at weblogic.Server.main(Server.java:65)
         at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <ServletContext-General> cannot
    make temp directory '/opt/weblogic/myserver/public_html/_tmp_war',
    will not be able to compile JSPs
    Wed Feb 28 12:55:36 EST 2001:<E> <HTTP> Cannot intialize httpd
    URL resources because could not get JNDI context: javax.naming.NoInitialContextException:
    Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
    [Root exception is java.security.AccessControlException: access
    denied (java.lang.RuntimePermission getClassLoader )]
    Lot of thanks for your help.

    Check the weblogic.policy file to make sure that it is giving permissions to the right directories. If you have
    installed a Service Pack, make sure that both service pack jar files are at the front of their corresponding
    classpaths...
    vj wrote:
    Hi Everybody
    I downloaded and installed weblogic as per the installation document
    but I am getting the following exception and finally the server
    is started. Can somebody help me to resolve this problem
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:24)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:35 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.jts.internal.CoordinatorFactoryImpl.start(CoordinatorFactoryImpl.java:52)
    at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:33)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:35 EST 2001:<I> <WebLogicServer> Invoking main-style
    startup weblogic.jdbc.common.internal.JdbcStartup weblogic.jdbc.common.internal.JdbcStartup
    Wed Feb 28 12:55:35 EST 2001:<E> <JDBC Init> ERROR: Could not get
    JNDI context: javax.naming.NoInitialContextException: Cannot instantiate
    class: weblogic.jndi.WLInitialContextFactory [Root exception is
    java.security.AccessControlException: access denied (java.lang.RuntimePermission
    getClassLoader )]
    Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Beginning startup process
    Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Init JMS Security
    Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Initializing from weblogic.properties
    Wed Feb 28 12:55:35 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
    at weblogic.jms.server.JMSManager.getContext(JMSManager.java:835)
    at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:483)
    at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
    at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:35 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
    at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:488)
    at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
    at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Startup process complete.
    JMS is active
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
    at weblogic.jms.server.JMSManager.initSessionPoolManager(JMSManager.java:317)
    at weblogic.jms.server.JMSManager.init(JMSManager.java:308)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound SessionPoolManager
    as weblogic.jms.SessionPoolManager
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
    at weblogic.jms.server.JMSManager.initConnectionConsumerManager(JMSManager.java:333)
    at weblogic.jms.server.JMSManager.init(JMSManager.java:310)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound ConnectionConsumerManager
    as weblogic.jms.ConnectionConsumerManager
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1476)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1495)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<I> <WebLogicServer> Invoking main-style
    startup RMI Registry weblogic.rmi.internal.RegistryImpl
    Wed Feb 28 12:55:36 EST 2001:<I> <RMI> Registry started
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.common.internal.T3BindableServices.initialize(T3BindableServices.java:114)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.ejb.internal.EJBManagerImpl.bindToJNDI(EJBManagerImpl.java:580)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:226)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <EJB> Cannot intialize Mail Session
    resources because could not get JNDI context: javax.naming.NoInitialContextException:
    Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
    [Root exception is java.security.AccessControlException: access
    denied (java.lang.RuntimePermission getClassLoader )]
    Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 EJB jar files loaded,
    containing 0 EJBs
    Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 deployed, 0 failed to
    deploy.
    Wed Feb 28 12:55:36 EST 2001:<E> <Service>
    java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
    access denied (java.lang.RuntimePermission setContextClassLoader
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(Compiled Code)
    at java.security.AccessControlException.<init>(Compiled Code)
    at java.security.AccessControlContext.checkPermission(Compiled
    Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.Thread.setContextClassLoader(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(Compiled
    Code)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
    Code)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
    Code)
    at weblogic.jndi.Environment.getContext(Environment.java:122)
    at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
    at weblogic.io.common.internal.T3FileSystemProxyImpl.installFileSystems(Compiled
    Code)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    Wed Feb 28 12:55:36 EST 2001:<E> <ServletContext-General> cannot
    make temp directory '/opt/weblogic/myserver/public_html/_tmp_war',
    will not be able to compile JSPs
    Wed Feb 28 12:55:36 EST 2001:<E> <HTTP> Cannot intialize httpd
    URL resources because could not get JNDI context: javax.naming.NoInitialContextException:
    Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
    [Root exception is java.security.AccessControlException: access
    denied (java.lang.RuntimePermission getClassLoader )]
    Lot of thanks for your help.

Maybe you are looking for