AuthPermission doAsPrivileged hangs SJSAS 9.1

We're running SJSAS 9.1_01 on JDK 1.5.0_14 on GNU/Linux.
We deploy an application which uses Acegi. It needs the following permisson:
permission javax.security.auth.AuthPermission "doAsPrivileged";
(if you don't give it it would crash saying so).
The problem is server hangs, sooner or later. With 'sooner or later' we mean 'someday', since it can work for days (light load) before hanging.
'Hanging' here means 'browser waits forever (well, not forever but some minutes) for server response, but it never arrives'.
When it's hung you can trace its state with jstack, and here's what you get:
Thread 17080: (state = BLOCKED)
- java.lang.Class.forName0(java.lang.String, boolean, java.lang.ClassLoader) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) @bci=32, line=242 (Compiled frame)
- sun.security.provider.PolicyFile.getPermissions(java.security.Permissions, java.security.CodeSource, java.security.Principal[]) @bci=49, line=1324 (Compiled frame)
- sun.security.provider.PolicyFile.getPermissions(java.security.Permissions, java.security.ProtectionDomain) @bci=55, line=1287 (Compiled frame)
- sun.security.provider.PolicyFile.implies(java.security.ProtectionDomain, java.security.Permission) @bci=34, line=1178 (Compiled frame)
- java.io.File.exists() @bci=13, line=700 (Compiled frame)
- org.apache.naming.resources.FileDirContext.getAttributes(java.lang.String, java.lang.String[]) @bci=2, line=468 (Interpreted frame)
- org.apache.naming.resources.BaseDirContext.getAttributes(java.lang.String) @bci=3, line=755 (Interpreted frame)
- org.apache.naming.resources.ProxyDirContext.revalidate(org.apache.naming.resources.CacheEntry) @bci=51, line=1500 (Interpreted frame)
- org.apache.naming.resources.ProxyDirContext.cacheLookup(java.lang.String) @bci=92, line=1456 (Compiled frame)
- org.apache.naming.resources.ProxyDirContext.lookupCache(java.lang.String) @bci=2, line=1381 (Interpreted frame)
- org.apache.catalina.servlets.DefaultServlet.serveResource(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) @bci=85, line=742 (Interpreted frame)
- org.apache.catalina.servlets.DefaultServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=4, line=349 (Interpreted frame)
- javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=35, line=747 (Compiled frame)
- javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=30, line=860 (Interpreted frame)
- sun.reflect.GeneratedMethodAccessor5246.invoke(java.lang.Object, java.lang.Object[]) @bci=48 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=25 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=111, line=585 (Interpreted frame)
- org.apache.catalina.security.SecurityUtil$1.run() @bci=12, line=249 (Interpreted frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext) @bci=0 (Compiled frame)
- javax.security.auth.Subject.doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedExceptionAction, java.security.AccessControlContext) @bci=60, line=517 (Compiled frame)
- org.apache.catalina.security.SecurityUtil.execute(java.lang.reflect.Method, java.lang.Object, java.lang.Object[], java.security.Principal) @bci=136, line=282 (Interpreted frame)
- org.apache.catalina.security.SecurityUtil.doAsPrivilege(java.lang.String, javax.servlet.Servlet, java.lang.Class[], java.lang.Object[], java.security.Principal) @bci=70, line=165 (Compiled frame)
- org.apache.catalina.core.ApplicationFilterChain.access$000(org.apache.catalina.core.ApplicationFilterChain, javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=3, line=55 (Compiled frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=22, line=157 (Compiled frame)
- org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=344, line=190 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=120, line=210 (Compiled frame)
- org.apache.catalina.core.ApplicationFilterChain.access$000(org.apache.catalina.core.ApplicationFilterChain, javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=3, line=55 (Compiled frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=22, line=157 (Compiled frame)
- es.jcyl.ita.fwk2.base.web.ITAFiltro.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=253, line=153 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=120, line=210 (Compiled frame)
- org.apache.catalina.core.ApplicationFilterChain.access$000(org.apache.catalina.core.ApplicationFilterChain, javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=3, line=55 (Compiled frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=22, line=157 (Compiled frame)
- org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.FilterChain) @bci=89, line=183 (Interpreted frame)
- org.springframework.web.filter.OncePerRequestFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=90, line=77 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=120, line=210 (Compiled frame)
- org.apache.catalina.core.ApplicationFilterChain.access$000(org.apache.catalina.core.ApplicationFilterChain, javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=3, line=55 (Compiled frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=22, line=157 (Compiled frame)
- org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(org.acegisecurity.intercept.web.FilterInvocation) @bci=87, line=107 (Interpreted frame)
- org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=15, line=72 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=37, line=110 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=144, line=125 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=313, line=142 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=143, line=81 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.ui.AbstractProcessingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=141, line=229 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.ui.logout.LogoutFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=164, line=106 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.ui.AbstractProcessingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=141, line=229 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=390, line=286 (Interpreted frame)
- org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=185, line=275 (Compiled frame)
- org.acegisecurity.util.FilterToBeanProxy.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=18, line=98 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=120, line=210 (Compiled frame)
- org.apache.catalina.core.ApplicationFilterChain.access$000(org.apache.catalina.core.ApplicationFilterChain, javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=3, line=55 (Compiled frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=22, line=157 (Compiled frame)
- org.springframework.web.filter.RequestContextFilter.doFilterInternal(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.FilterChain) @bci=67, line=63 (Interpreted frame)
- org.springframework.web.filter.OncePerRequestFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=90, line=77 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=120, line=210 (Compiled frame)
- org.apache.catalina.core.ApplicationFilterChain.access$000(org.apache.catalina.core.ApplicationFilterChain, javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=3, line=55 (Compiled frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
- org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=22, line=157 (Compiled frame)
- org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=77, line=551 (Compiled frame)
- org.apache.catalina.core.StandardContextValve.invokeInternal(org.apache.catalina.Wrapper, org.apache.catalina.Request, org.apache.catalina.Response) @bci=174, line=225 (Interpreted frame)
- org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=228, line=173 (Interpreted frame)
- org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=77, line=551 (Compiled frame)
- org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=90, line=170 (Interpreted frame)
- org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=77, line=551 (Compiled frame)
- org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) @bci=6, line=933 (Interpreted frame)
- com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor.process(org.apache.catalina.core.StandardHost, java.lang.String[], byte[][], int[], org.apache.catalina.core.StandardContext, java.lang.String, org.apache.catalina.core.StandardWrapper, java.lang.String, java.lang.String) @bci=534, line=234 (Compiled frame)
- com.sun.enterprise.web.HttpServiceWebContainer.service(long, com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor, org.apache.catalina.core.StandardHost, java.lang.String[], byte[][], int[], org.apache.catalina.core.StandardContext, java.lang.String, org.apache.catalina.core.StandardWrapper, java.lang.String, java.lang.String) @bci=168, line=2160 (Compiled frame)
As you see, HttpServiceWebContainer.service is blocked at java.security.AccessController.doPrivileged while reading server.policy file (sun.security.provider.PolicyFile.getPermissions).
Any ideas?
Edited by: JuanIgnacioSanchez on Jun 16, 2008 9:47 AM

All,
A server restart resolved the issue. I didn't do antthing specifically.
Thx

Similar Messages

  • Javax.security.auth.AuthPermission createLoginContext.Userpass

    Hi,
    I am working on authentication using JAAS.
    I have created small application and calling it in one of the jsp file. When I try to access the jsp I am getting the following error:
    createLoginContext.Userpass : access denied
    (javax.security.auth.AuthPermission createLoginContext.Userpass)
    When i run the java application it is authenticating the user but when I try to run it by calling it from JSP it is giving the above error.
    I have java.policy file and I have modified that too and it is able to give permissions to all the jar file accept the one which I have created.
    Can any body suggest how to give permission to (javax.security.auth.AuthPermission createLoginContext.Userpass).
    Edited by: Vaibhav818 on Jun 30, 2008 2:54 AM

    The error occurs because you don't grant createLoginContext permission to the Sample jar file in your policy file or you do but you don't specify your policy file. Below is example for authorization sample.
    grant codebase "file:./SampleAzn.jar" {
    permission javax.security.auth.AuthPermission "createLoginContext.Sample";
    permission javax.security.auth.AuthPermission "doAsPrivileged";
    Cheers
    Zi

  • Help, Authentication failed

    I am having a very difficult time making a simple login program work
    I am using Java SDK 1.4.2_02 on a Windows 2000 host, the DS is on the same host
    My Directory Server is Sun One Directory Server 5.2
    I am using the JAAS package, with a JndiLoginModule
    When I use a bogus uid I get a �user not found� message so I know I am contacting the DS correctly
    The Access log looks like this
    [09/Dec/2003:13:09:52 -0600] conn=1606 op=0 msgId=1 - BIND dn="" method=128 version=3
    [09/Dec/2003:13:09:52 -0600] conn=1606 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
    [09/Dec/2003:13:09:52 -0600] conn=1606 op=1 msgId=2 - SRCH base="ou=people,dc=auto-trol,dc=com" scope=0 filter="(objectClass=*)" attrs=ALL
    [09/Dec/2003:13:09:52 -0600] conn=1606 op=1 msgId=2 - RESULT err=0 tag=101 nentries=1 etime=0
    [09/Dec/2003:13:09:52 -0600] conn=1606 op=2 msgId=3 - SRCH base="ou=people,dc=auto-trol,dc=com" scope=1 filter="(uid=jpsb)" attrs=ALL
    [09/Dec/2003:13:09:52 -0600] conn=1606 op=2 msgId=3 - RESULT err=0 tag=101 nentries=1 etime=0
    [09/Dec/2003:13:09:52 -0600] conn=1606 op=3 msgId=4 - ABANDON targetop=NOTFOUND msgid=3
    My config file looks like this
    Sample
    com.sun.security.auth.module.JndiLoginModule required debug=true
         user.provider.url="ldap://localhost:4661/ou=People,dc=auto-trol,dc=com"
         group.provider.url="ldap//localhost:4661/ou=Group,dc=auto-trol,dc=com";
    The error I get is this:
    [JndiLoginModule] user provider: ldap://localhost:4661/ou=People,dc=auto-trol,dc=com
    [JndiLoginModule] group provider: ldap//localhost:4661/ou=Group,dc=auto-trol,dc=com
    ldap username: jpsb
    ldap password: jim
    [JndiLoginModule] attemptAuthentication() failed
    [JndiLoginModule] regular authentication failed
    [JndiLoginModule]: aborted authentication failed
    Authentication failed:
    Login incorrect
    A stack trace looks like this
    javax.security.auth.login.FailedLoginException: Login incorrect
    at com.sun.security.auth.module.JndiLoginModule.attemptAuthentication(JndiLoginModule.java:552)
    at com.sun.security.auth.module.JndiLoginModule.login(JndiLoginModule.java:310)
    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:324)
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
    at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
    at LoginJaas.main(LoginJaas.java:93)
    It appears to me that there must be some kind password problem, I can login from the 5.2 console or switch user ids from the console so I know the user and Directory Server are OK.
    Can anyone help? I�ve been pounding on this for a few days and it is getting frustrating.
    Thanks in advance
    Jim

    Here it is along with some bat files to make and run. I can't understand why it does not work. It is mostly a slightly modified example from Sun. I'm using Sun code, a Sun Directory Server and a Sun's JndiLoginModule so why the damn thing does not work is a mystery. I have looked EVERYWHERE for a sample JAAS/LDAP Authenicate code and can't find a thing. Makes me think there isn't any and JAAS is not the way to go. I and going to try with a different DS maybe open LDP or active Directory and if that doesn't work I'll forget JAAS and use JNDI instead.
    Any help would be greatly appreciated.
    thanks in advance
    jim
    Start LoginJass.java
    * @(#)LoginJaas.java
    * Copyright 2001-2002 Sun Microsystems, Inc. All Rights Reserved.
    * Redistribution and use in source and binary forms, with or
    * without modification, are permitted provided that the following
    * conditions are met:
    * -Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    * -Redistribution in binary form must reproduct the above copyright
    * notice, this list of conditions and the following disclaimer in
    * the documentation and/or other materials provided with the
    * distribution.
    * Neither the name of Sun Microsystems, Inc. or the names of
    * contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    * This software is provided "AS IS," without a warranty of any
    * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
    * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
    * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
    * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
    * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
    * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
    * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
    * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
    * THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN
    * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    * You acknowledge that Software is not designed, licensed or
    * intended for use in the design, construction, operation or
    * maintenance of any nuclear facility.
    import javax.security.auth.Subject;
    import javax.security.auth.callback.*;
    import javax.security.auth.login.*;
    import com.sun.security.auth.callback.TextCallbackHandler;
    import java.security.PrivilegedAction;
    * This LoginJaas application attempts to authenticate a user
    * and reports whether or not the authentication was successful.
    * If successful, it then sets up subsequent execution of
    * code in the run method of the SampleAction class such that
    * access control checks for security-sensitive operations will be
    * based on the user running the code.
    public class LoginJaas
         private static Subject mySubject;
         public static void main(String[] args)
              // Obtain a LoginContext, needed for authentication. Tell it
              // to use the LoginModule implementation specified by the
              // entry named "JaasSample" in the JAAS login configuration
              // file and to also use the specified CallbackHandler.
              LoginContext lc = null;
              try
                   lc = new LoginContext("Sample", new TextCallbackHandler());
              catch (LoginException le)
                   System.err.println("le:Cannot create LoginContext. "
                   + le.getMessage());
                   le.printStackTrace();
                   System.exit(-1);
              catch (SecurityException se)
                   System.err.println("se:Cannot create LoginContext. "
                   + se.getMessage());
                   se.printStackTrace();
                   System.exit(-1);
              try
                   // attempt authentication
                   lc.login();
              catch (LoginException le)
                   System.err.println("Authentication failed:");
                   System.err.println(" " + le.getMessage());
                   le.printStackTrace();
                   System.exit(-1);
              System.out.println("Authentication succeeded!");
              // now try to execute the SampleAction as the authenticated Subject
              Subject mySubject = lc.getSubject();
              PrivilegedAction action = new SampleAction();
              Subject.doAsPrivileged(mySubject, action, null);
    End LoginJass.java
    Start MyCallbackHandler.java
    import java.io.*;
    import javax.security.auth.*;
    import javax.security.auth.callback.*;
    public class MyCallbackHandler implements CallbackHandler
         public void handle(Callback callbacks[]) throws IOException, UnsupportedCallbackException
              for(int i=0;i<callbacks.length;i++)
                   if(callbacks[i] instanceof NameCallback)
                   NameCallback nc = (NameCallback) callbacks[0];
                   System.err.print(nc.getPrompt());
                   System.err.flush();
                   String name = (new BufferedReader(new InputStreamReader(System.in))).readLine();
                   nc.setName(name);
                   else
                   throw(new UnsupportedCallbackException(callbacks,
                             "Callback handler not support"));
    End MyCallbackHandler.java
    Start Sample.java
    * @(#)Sample.java     1.19 00/01/11
    * Copyright 2000-01 Sun Microsystems, Inc. All rights reserved.
    * Copyright 2000-01 Sun Microsystems, Inc. Tous droits reserves.
    import java.io.*;
    import java.util.*;
    import java.security.Principal;
    import javax.security.auth.*;
    import javax.security.auth.callback.*;
    import javax.security.auth.login.*;
    import javax.security.auth.spi.*;
    import com.sun.security.auth.*;
    * <p> This Sample application attempts to authenticate a user
    * and executes a SampleAction as that user.
    * <p> If the user successfully authenticates itself,
    * the username and number of Credentials is displayed.
    * @version 1.19, 01/11/00
    public class Sample {
    * Attempt to authenticate the user.
    * <p>
    * @param args input arguments for this application. These are ignored.
    public static void main(String[] args) {
         // use the configured LoginModules for the "Sample" entry
         LoginContext lc = null;
         try {
         lc = new LoginContext("Sample", new MyCallbackHandler());
         } catch (LoginException le) {
         le.printStackTrace();
         System.exit(-1);
         // the user has 3 attempts to authenticate successfully
         int i;
         for (i = 0; i < 3; i++) {
         try {
              // attempt authentication
              lc.login();
              // if we return with no exception, authentication succeeded
              break;
         } catch (AccountExpiredException aee) {
              System.out.println("Your account has expired. " +
                        "Please notify your administrator.");
              System.exit(-1);
         } catch (CredentialExpiredException cee) {
              System.out.println("Your credentials have expired.");
              System.exit(-1);
         } catch (FailedLoginException fle) {
              System.out.println("Authentication Failed");
              try {
              Thread.currentThread().sleep(3000);
              } catch (Exception e) {
              // ignore
         } catch (Exception e) {
              System.out.println("Unexpected Exception - unable to continue");
              e.printStackTrace();
              System.exit(-1);
         // did they fail three times?
         if (i == 3) {
         System.out.println("Sorry");
         System.exit(-1);
         // let's see what Principals we have
         Iterator principalIterator = lc.getSubject().getPrincipals().iterator();
         System.out.println("Authenticated user has the following Principals:");
         while (principalIterator.hasNext()) {
         Principal p = (Principal)principalIterator.next();
         System.out.println("\t" + p.toString());
         System.out.println("User has " +
                   lc.getSubject().getPublicCredentials().size() +
                   " Public Credential(s)");
         // now try to execute the SampleAction as the authenticated Subject
         Subject.doAs(lc.getSubject(), new SampleAction());
         System.exit(0);
    End Sample.java
    Start SampleAction.java
    * @(#)SampleAction.java     1.4 00/01/11
    * Copyright 2000-01 Sun Microsystems, Inc. All rights reserved.
    * Copyright 2000-01 Sun Microsystems, Inc. Tous droits reserves.
    import java.io.File;
    import java.security.PrivilegedAction;
    * <p> This is a Sample PrivilegedAction implementation, designed to be
    * used with the Sample application.
    * @version 1.4, 01/11/00
    public class SampleAction implements PrivilegedAction {
    * <p> This Sample PrivilegedAction performs the following operations:
    * <ul>
    * <li> Access the System property, <i>java.home</i>
    * <li> Access the System property, <i>user.home</i>
    * <li> Access the file, <i>foo.txt</i>
    * </ul>
    * @return <code>null</code> in all cases.
    * @exception SecurityException if the caller does not have permission
    *          to perform the operations listed above.
    public Object run() {
         System.out.println("\nYour java.home property: "
                   +System.getProperty("java.home"));
         System.out.println("\nYour user.home property: "
                   +System.getProperty("user.home"));
         File f = new File("foo.txt");
         System.out.print("\nfoo.txt does ");
         if (!f.exists())
         System.out.print("not ");
         System.out.println("exist in the current working directory.");
         return null;
    End SampleAction.java
    Start princible/SamplePrincipal.java
    package principal;
    * @(#)SamplePrincipal.java     1.4 00/01/11
    * Copyright 2000-01 Sun Microsystems, Inc. All rights reserved.
    * Copyright 2000-01 Sun Microsystems, Inc. Tous droits reserves.
    import java.security.Principal;
    * <p> This class implements the <code>Principal</code> interface
    * and represents a Sample user.
    * <p> Principals such as this <code>SamplePrincipal</code>
    * may be associated with a particular <code>Subject</code>
    * to augment that <code>Subject</code> with an additional
    * identity. Refer to the <code>Subject</code> class for more information
    * on how to achieve this. Authorization decisions can then be based upon
    * the Principals associated with a <code>Subject</code>.
    * @version 1.4, 01/11/00
    * @see java.security.Principal
    * @see javax.security.auth.Subject
    public class SamplePrincipal implements Principal, java.io.Serializable {
    * @serial
    private String name;
    * Create a SamplePrincipal with a Sample username.
    * <p>
    * @param name the Sample username for this user.
    * @exception NullPointerException if the <code>name</code>
    *               is <code>null</code>.
    public SamplePrincipal(String name) {
         if (name == null)
         throw new NullPointerException("illegal null input");
         this.name = name;
    * Return the Sample username for this <code>SamplePrincipal</code>.
    * <p>
    * @return the Sample username for this <code>SamplePrincipal</code>
    public String getName() {
         return name;
    * Return a string representation of this <code>SamplePrincipal</code>.
    * <p>
    * @return a string representation of this <code>SamplePrincipal</code>.
    public String toString() {
         return("SamplePrincipal: " + name);
    * Compares the specified Object with this <code>SamplePrincipal</code>
    * for equality. Returns true if the given object is also a
    * <code>SamplePrincipal</code> and the two SamplePrincipals
    * have the same username.
    * <p>
    * @param o Object to be compared for equality with this
    *          <code>SamplePrincipal</code>.
    * @return true if the specified Object is equal equal to this
    *          <code>SamplePrincipal</code>.
    public boolean equals(Object o) {
         if (o == null)
         return false;
    if (this == o)
    return true;
    if (!(o instanceof SamplePrincipal))
    return false;
    SamplePrincipal that = (SamplePrincipal)o;
         if (this.getName().equals(that.getName()))
         return true;
         return false;
    * Return a hash code for this <code>SamplePrincipal</code>.
    * <p>
    * @return a hash code for this <code>SamplePrincipal</code>.
    public int hashCode() {
         return name.hashCode();
    End princible/SamplePrincipal.java
    Start ample_jaas.config
    /** Login Configuration for the JAAS Sample Application **/
    Sample
         //SampleLoginModule required debug=true;
         com.sun.security.auth.module.JndiLoginModule required debug=true
         user.provider.url="ldap://localhost:4661/ou=People,dc=testing,dc=com"
         group.provider.url="ldap//localhost:4661/ou=Group,dc=testing,dc=com";
    End Sample_jaas.config
    Start sample.policy
    /** Java 2 Access Control Policy for the JAAS Sample Application **/
    /** Code-Based Access Control Policy for LoginJaas **/
    grant codebase "file:./sample.jar
    permission javax.security.auth.AuthPermission
    "createLoginContext.JaasSample";
    permission javax.security.auth.AuthPermission "doAsPrivileged";
    permission java.security.AllPermission; //darf alles
    /** User-Based Access Control Policy for the LoginAction class
    ** instantiated by LoginJaas
    grant     codebase "file:./SampleAction.jar", Principal principal.SamplePrincipal "jimshi"
    permission java.util.PropertyPermission "java.home", "read";
    permission java.util.PropertyPermission "user.home", "read";
    permission java.io.FilePermission "foo.txt", "read";
    End sample.policy
    Start makelogin.bat
    REM
    javac LoginJaas.java principal/SamplePrincipal.java
    jar -cvf LoginJaas.jar LoginJaas.class principal/SamplePrincipal.java
    REM
    javac SampleAction.java
    jar -cvf SampleAction.jar SampleAction.class
    REM
    REM javac SampleLoginModule.java
    REM jar -cvf sample_module.jar SampleLoginModule.class
    REM
    javac Sample.java
    REM jar -cvf sample.jar MyCallbackHandler.class Sample.class
    javac com/sun/security/auth/module/*.java
    End makelogin.bat
    Start run.bat
    REM java -classpath ./;SampleAction.jar;LoginJaas.jar -Djava.security.manager -Djava.security.policy=sample.policy -Djava.security.auth.login.config=sample_jaas.conf LoginJaas
    java -classpath ./;SampleAction.jar;LoginJaas.jar -Djava.security.auth.login.config==D:\STUFF\LDAP\loginJim\sample_jaas.config LoginJaas
    End run.bat

  • JAAS: Access denial error

    Hi all:
    I am trying to use JAAS for the authentication purpose.
    In the login() method implemented in LoginModule class, I am trying to access objects from external custom jars.
    viz. soapclient12.jar.This jar inturn uses Axis1.4 jar.
    I have granted access to all the jars.
    I am getting following error while accessing object from soapclient12.jar.
    Exception in thread "main" java.lang.ExceptionInInitializerError
         at org.apache.commons.discovery.log.DiscoveryLogFactory._newLog(DiscoveryLogFactory.java:141)
         at org.apache.commons.discovery.log.DiscoveryLogFactory.<clinit>(DiscoveryLogFactory.java:104)
         at org.apache.commons.discovery.resource.DiscoverResources.<clinit>(DiscoverResources.java:82)
         at org.apache.commons.discovery.tools.ResourceUtils.getResource(ResourceUtils.java:122)
         at org.apache.commons.discovery.tools.ResourceUtils.loadProperties(ResourceUtils.java:175)
         at org.apache.commons.discovery.tools.PropertiesHolder.getProperties(PropertiesHolder.java:102)
         at org.apache.commons.discovery.tools.DiscoverClass.find(DiscoverClass.java:360)
         at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
         at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
         at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
         at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
         at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
         at org.apache.axis.description.TypeDesc.<clinit>(TypeDesc.java:61)
         at com.aspace.ftress.interfaces.ftress.DTO.ALSI.<clinit>(ALSI.java:106)
         at com.acti.jaas.ftress.authentication.CheckCredentials.testAccess(CheckCredentials.java:29)
         at com.acti.jaas.ftress.authentication.CheckCredentials.main(CheckCredentials.java:15)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.commons.discovery.log.level read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at org.apache.commons.discovery.log.SimpleLog.<clinit>(SimpleLog.java:155)
         ... 18 more
    by looking at the error it seems like we have to grant access to some specific jars/file.
    We have tried giving all the permissions but the problem still persists.
    Can anyone please tell the solution
    Here is my policy file.
    /* grant the sample LoginModule permissions */
    grant codebase "file:///C:/Projects/AI/TestJavaSamples/JAASLoginModule/bin" {
    permission javax.security.auth.AuthPermission "createLoginContext.FtressLoginModule";
    permission javax.security.auth.AuthPermission "modifyPrincipals";
    permission javax.security.auth.AuthPermission "modifyPublicCredentials";
    permission javax.security.auth.AuthPermission "modifyPrivateCredentials";
    permission javax.security.auth.AuthPermission "doAs";
    permission javax.security.auth.AuthPermission "doAsPrivileged";
    permission java.security.SecurityPermission "setPolicy";
    permission java.security.SecurityPermission "getPolicy";
    /* grant the sample all the soapclient12.jar*/
    grant codebase "file:///C:/Projects/AI/TestJavaSamples/JAASLoginModule/lib/soapclient12.jar" {
    permission java.lang.RuntimePermission     "createClassLoader";
    permission java.lang.RuntimePermission     "getClassLoader";
    permission java.util.PropertyPermission     "org.apache.commons.discovery.log.level", "read";
    permission java.util.PropertyPermission     "axis.EngineConfigFactory","read";
    permission java.util.PropertyPermission     "org.apache.axis.EngineConfigurationFactory","read";
    permission java.util.PropertyPermission     "axis.ClientConfigFile","read";
    permission java.util.PropertyPermission     "axis.ServerConfigFile","read";
    permission java.util.PropertyPermission     "axis.xml.reuseParsers","read";
    permission java.util.PropertyPermission     "axis.attachments.implementation","read";
    /* grant the sample all the jars present in axis1.4 */
    grant codebase "file:///C:/Projects/ActiveIdentity/axis-1_4/lib" {
    permission java.security.AllPermission;
    permission java.lang.RuntimePermission     "createClassLoader";
    permission java.lang.RuntimePermission     "getClassLoader";
    permission java.util.PropertyPermission     "org.apache.commons.discovery.log.level", "read";
    permission java.util.PropertyPermission     "axis.EngineConfigFactory","read";
    permission java.util.PropertyPermission     "org.apache.axis.EngineConfigurationFactory","read";
    permission java.util.PropertyPermission     "axis.ClientConfigFile","read";
    permission java.util.PropertyPermission     "axis.ServerConfigFile","read";
    permission java.util.PropertyPermission     "axis.xml.reuseParsers","read";
    permission java.util.PropertyPermission     "axis.attachments.implementation","read";
    permission java.util.PropertyPermission     "http.nonProxyHosts","read";
    permission java.util.PropertyPermission     "http.proxyHost","read";
    permission java.util.PropertyPermission     "axis.byteBuffer.cacheIncrement","read";
    permission java.util.PropertyPermission     "axis.byteBuffer.residentMaxSize","read";
    permission java.util.PropertyPermission     "axis.byteBuffer.workBufferSize","read";
    permission java.util.PropertyPermission     "axis.byteBuffer.backing","read";
    permission java.util.PropertyPermission     "axis.attachments.implementation","read";
    permission java.util.PropertyPermission     "axis.attachments.implementation","read";
    permission java.util.PropertyPermission "axis.http.client.maximum.connections.per.host","read";
    permission java.util.PropertyPermission "axis.http.client.maximum.total.connections","read";
    permission java.util.PropertyPermission "axis.http.client.connection.default.connection.timeout","read";
    permission java.util.PropertyPermission "axis.http.client.connection.default.so.timeout","read";
    permission java.util.PropertyPermission "axis.http.client.connection.pool.timeout","read";
    permission java.util.PropertyPermission     "java.protocol.handler.pkgs","read";
    permission java.util.PropertyPermission     "java.protocol.handler.pkgs","write";
    Thanks in advance,
    - Vidya

    Hi,
    I am using JBOSS-4.0.4GA .
    Do you have any idea how to configure JAAS on Jobss?

  • RDBMS Authentication Example Error

    When I test the code
    weblogic.security.acl.CachingRealm realm = (weblogic.security.acl.CachingRealm)
    weblogic.security.acl.Security.getRealm();
    The Error was raised:
    java.lang.ClassCastException: weblogic.security.acl.internal.FileRealm
    It is a example in book 'J2EE Application and BEA WebLogic Server'

    I got it...my policy file needed more to work in NT. Here is the entire file:
    grant Principal com.sun.security.auth.NTUserPrincipal "s156898"
         permission java.io.FilePermission "ProtectedFile.txt", "read";
    grant {
    //Allow everything for now
    //permission java.security.AllPermission;
         permission javax.security.auth.AuthPermission "createLoginContext.JAASConfig"     permission java.io.FilePermission "ProtectedFile.txt", "read";
         permission javax.security.auth.AuthPermission "modifyPrincipals";
         permission javax.security.auth.AuthPermission "doAsPrivileged";
         permission javax.security.auth.AuthPermission "getSubject";
    However, I am trying to also do my work on a Solaris/Unix machine. I get an error that tells me that only Principal-based entries are allow. Anyone know how to give permission to all users in a Principal statemtent. The same setup as the above, using Unix Principals, will not work. Seems like I have to always have a grant and Principal for every set of permissions.
    Lemme know if you can help. Thanks!

  • AccessControlException: applet, BC4J(as session bean),oracle db, on same server.

    my enviroment
    jdev9i_902
    JDK1.3
    oracle 9i
    oc4j(Jdeveloper oc4j)
    everything is on the same machine.
    I have a BC4J deployed as Session Bean(BMT) on stanalone oc4j(jdeveloper oc4j)
    an applet deployed to oc4j.
    ( I have gone through the HOW TO: Applet Deployment for JDev 3.1)
    when I try to run the applet from IE (http://myhomeURL:8888/myroot/applet.html), I get the following error:(seems like that applet thinks that oracle db is on a different server than the app-server)
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.lang.Boolean.getBoolean(Unknown Source)
         at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.remoteLookup(AmHomeImpl.java:101)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.initRemoteHome(AmHomeImpl.java:68)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>(AmHomeImpl.java:41)
         at oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome(InitialContextImpl.java:17)
         at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:72)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:102)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:62)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:1431)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1082)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:269)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject(JUMetaObjectManager.java:345)
         at mypackage6.AppletBestill1View.init(AppletBestill1View.java:88)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    cheers
    Russel

    Russel,
    You are seeing bug 2087789. During JNDI lookup, certain system properties are being read. Since you are
    running in a sandvox environment, AccessControl exception is being thrown.
    You will have to either sign your jar files or provide a policy file on the client side which will relax
    some of the restriction.
    Sample Java2 policy file follows
    /** Java2 policy for JAZN/OC4J **/
    /** INSTRUCTIONS **/
    @ /** - set ${oracle.ons.oraclehome} to your $ORACLE_HOME **/
    /** this is automatically set by OPMN **/
    @ /** - set ${localhost.ip} to your OC4J machine's IP address **/
    @ /** - set ${oidhost.ip} to your Oid machine's IP address **/
    @ grant codebase "file:${oracle.ons.oraclehome}/-" {
    permission java.lang.RuntimePermission "createSecurityManager";
    permission java.lang.RuntimePermission "setSecurityManager";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.util.PropertyPermission "*","read";
    permission java.io.SerializablePermission "enableSubstitution";
    /* JAAS */
    grant codebase "file:${java.home}/jre/lib/ext/jaas.jar" {
    permission java.security.AllPermission;
    @ /* JAAS Login Modules */
    grant codebase "file:${java.home}/jre/lib/ext/jaasmod.jar" {
    permission java.security.AllPermission;
    /* JAZN */
    @ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/jazn.jar" {
    permission java.security.AllPermission;
    /* OC4J */
    @ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/oc4j.jar" {
    permission java.security.AllPermission;
    /* DMS - J2EE */
    @ grant codebase "file:${oracle.ons.oraclehome}/lib/dms.jar" {
    permission java.security.AllPermission;
    /* DMS - IAS */
    @ grant codebase "file:${oracle.ons.oraclehome}/dms/lib/dms.jar" {
    permission java.security.AllPermission;
    /* ONS */
    @ grant codebase "file:${oracle.ons.oraclehome}/opmn/lib/ons.jar" {
    permission java.security.AllPermission;
    /* JDBC */
    @ grant codebase "file:${oracle.ons.oraclehome}/jdbc/lib/classes12.jar" {
    permission java.security.AllPermission;
    /* OJSP */
    @ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/lib/ojsp.jar" {
    permission java.security.AllPermission;
    /* tools.jar - for compiling JSPs */
    @ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/tools.jar" {
    permission java.security.AllPermission;
    /* J2EE/home */
    @ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/-" {
    /* DMS grants */
    @ permission java.io.FilePermission "${oracle.ons.oraclehome}/j2ee/-
    ", "write,delete";
    permission java.util.PropertyPermission "oracle.*", "read,write";
    permission java.util.PropertyPermission "java.protocol.handler.pkgs",
    "read,write";
    permission java.util.PropertyPermission "transaction.log", "read";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "setContextClassLoader";
    permission java.util.PropertyPermission "http.singlethreaded.maxsize",
    "read";
    permission java.util.PropertyPermission "*", "read,write";
    /* Default Grants to get things going */
    permission java.security.SecurityPermission "*";
    permission java.io.FilePermission "<<ALL FILES>>", "read";
    permission java.lang.RuntimePermission "getProtectionDomain";
    permission java.lang.RuntimePermission "getClassLoader";     
    permission java.lang.RuntimePermission "loadLibrary.ldapjclnt9";     
    @ permission javax.security.auth.AuthPermission "createLoginContext";
    permission javax.security.auth.AuthPermission "doAs";
    permission javax.security.auth.AuthPermission "doAsPrivileged";
    permission javax.security.auth.AuthPermission "getSubject";     
    permission javax.security.auth.AuthPermission
    "getSubjectFromDomainCombiner";     
    @ permission javax.security.auth.AuthPermission "getLoginConfiguration";
    permission javax.security.auth.AuthPermission "getPolicy";
    permission javax.security.auth.AuthPermission "modifyPrincipals";
    permission java.util.PropertyPermission "java.home", "read";     
    permission java.util.PropertyPermission "user.home", "read";
    permission java.util.PropertyPermission "user.dir", "read,write";
    permission java.util.PropertyPermission "java.security.auth.policy",
    "read,write";
    @ permission java.net.SocketPermission "*.us.oracle.com",
    "accept,resolve";
    @ permission java.net.SocketPermission "127.0.0.1",
    "accept,connect,resolve";
    @ permission java.net.SocketPermission "${localhost.ip}",
    "accept,connect,resolve";
    @ permission java.net.SocketPermission "${oidhost.ip}",
    "accept,connect,resolve";
    /* JAZN Permissions */
    permission oracle.security.jazn.JAZNPermission "getCredentials";
    permission oracle.security.jazn.JAZNPermission "setCredentials";
    permission oracle.security.jazn.JAZNPermission "getClearCredentials";
    permission oracle.security.jazn.JAZNPermission
    "setClearCredentialsNoCheck";
    permission oracle.security.jazn.JAZNPermission "getProperty.*";
    permission oracle.security.jazn.JAZNPermission "getPolicy";
    permission oracle.security.jazn.JAZNPermission "getRealmManager";
    permission oracle.security.jazn.policy.AdminPermission
    "java.io.FilePermission$/tmp/*$read,write";
    permission oracle.security.jazn.policy.AdminPermission
    "java.io.FilePermission$/teams/jazn/*$read,write";
    permission oracle.security.jazn.policy.AdminPermission
    "oracle.security.jazn.realm.RealmPermission$*$createRealm,dropRealm,createR
    ole,dropRole,modifyRealmMetaData";
    permission oracle.security.jazn.realm.RealmPermission "*",
    "createRealm";
    permission oracle.security.jazn.realm.RealmPermission "*",
    "dropRealm";     
    permission oracle.security.jazn.realm.RealmPermission "*",
    "createRole";
    permission oracle.security.jazn.realm.RealmPermission "*", "dropRole";
    permission oracle.security.jazn.realm.RealmPermission "*",
    "modifyRealmMetaData";
    permission oracle.security.jazn.policy.RoleAdminPermission "*";
    permission oracle.security.jazn.policy.AdminPermission
    "oracle.security.jazn.policy.RoleAdminPermission$*";      
    my enviroment
    jdev9i_902
    JDK1.3
    oracle 9i
    oc4j(Jdeveloper oc4j)
    everything is on the same machine.
    I have a BC4J deployed as Session Bean(BMT) on stanalone oc4j(jdeveloper oc4j)
    an applet deployed to oc4j.
    ( I have gone through the HOW TO: Applet Deployment for JDev 3.1)
    when I try to run the applet from IE (http://myhomeURL:8888/myroot/applet.html), I get the following error:(seems like that applet thinks that oracle db is on a different server than the app-server)
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.lang.Boolean.getBoolean(Unknown Source)
         at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.remoteLookup(AmHomeImpl.java:101)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.initRemoteHome(AmHomeImpl.java:68)
         at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>(AmHomeImpl.java:41)
         at oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome(InitialContextImpl.java:17)
         at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:72)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:102)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:62)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:1431)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1082)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:269)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject(JUMetaObjectManager.java:345)
         at mypackage6.AppletBestill1View.init(AppletBestill1View.java:88)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    cheers
    Russel

  • JAAS-File policy not effect !

    I were read "the JAAS tutorial". If I use command line, all things ok ! But when I use Eclipse to compile, file policy not effect ! Do I need modify file "java.security" inside jre/lib/security" ?.
    The file policy is : sampleazn.policy :
    ========
    grant codebase "file:/C:/Documents and Settings/quoc thai/Auth/bin/sample/module/*" {
    permission javax.security.auth.AuthPermission "modifyPrincipals";
    grant codebase "file:/C:/Documents and Settings/quoc thai/Auth/bin/sample/*" {
    permission javax.security.auth.AuthPermission "createLoginContext.Sample";
    permission javax.security.auth.AuthPermission "doAsPrivileged";
    grant codebase "file:/C:/Documents and Settings/quoc thai/Auth/bin/sample/*",
         Principal sample.module.SamplePrincipal "testUser" {
    permission java.util.PropertyPermission "java.home", "read";
    permission java.util.PropertyPermission "user.home", "read";
    =========
    The file config :
    Sample {
    sample.module.SampleLoginModule required debug=true;
    ==========
    Please help me to configure file policy !!!
    Thank every one !!

    Dave,
    I just tried this on my test zlm server and that work the following way:
    1. create a text file policy with the following parameters:
    file name: /etc/login.defs
    change name: modify login.defs
    Change mode: Search file
    Search string: ^PASS_MAX_DAYS 99999
    Take care that there is a tab between the PASS.. and the number ! If you are not sure if you have just white spaces there or a tab, open it with a editor and check it. The character ^ stands for the beginning of the line, so this will match just the one line with that string. This is a normal regular expression. If you have systems with different entries you can also just enter ^PASS_MAX_DAYS and it will match all of them, then it is independent if there are tabs or white spaces there in.
    Result action: Replace line
    New string: PASS_MAX_DAYS 12345
    The rest of the parameters can remain on the default values. Assign it and after the next refresh of the device, the policy should be applied and you should see the new valu.
    Rainer

  • JAAS Authentication Example Error

    I am working with the JAAS Authentication example provided by Sun at the following link:
    http://java.sun.com/j2se/1.4.1/docs/guide/security/jgss/tutorials/index.html
    I am working with Windows NT. I am using a NTLoginModule in my config file. I would like to create a simple Login that uses the current OS's user ID. Once I add the security.manager and a policy file that includes anything besides full permisions (permission java.security.AllPermission;), I get a Security Exception, and more specifically a "java.security.AccessControlException:access denied...".
    I am using the following config:
    JaasConfig {
    com.sun.security.auth.module.NTLoginModule required debug="true";
    I would like to use a policy file that gives permission to a file for the current user. I would like to do something similar to the following, but get the error once this is added....
    grant Principal com.sun.security.auth.NTUserPrincipal "user"
    //Allow everything for now
    //permission java.security.AllPermission;
    permission java.io.FilePermission "ProtectedFile.txt", "read , write";
    What am I doing wrong? Any help is very much appreciated!
    Thanks!

    I got it...my policy file needed more to work in NT. Here is the entire file:
    grant Principal com.sun.security.auth.NTUserPrincipal "s156898"
         permission java.io.FilePermission "ProtectedFile.txt", "read";
    grant {
    //Allow everything for now
    //permission java.security.AllPermission;
         permission javax.security.auth.AuthPermission "createLoginContext.JAASConfig"     permission java.io.FilePermission "ProtectedFile.txt", "read";
         permission javax.security.auth.AuthPermission "modifyPrincipals";
         permission javax.security.auth.AuthPermission "doAsPrivileged";
         permission javax.security.auth.AuthPermission "getSubject";
    However, I am trying to also do my work on a Solaris/Unix machine. I get an error that tells me that only Principal-based entries are allow. Anyone know how to give permission to all users in a Principal statemtent. The same setup as the above, using Unix Principals, will not work. Seems like I have to always have a grant and Principal for every set of permissions.
    Lemme know if you can help. Thanks!

  • Indeterminant JProgressBar with JDK1.3

    Hi,
    I want to use an indeterminant progress bar in my application, but the JDK we are using is 1.3 and I can't change that. Has anyone managed to develop an indeterminant progress bar for 1.3?

    Hi,
    Create a policy.conf file containing something like this
    grant codebase "file:./*" {
    permission javax.security.auth.AuthPermission "createLoginContext";
    permission javax.security.auth.AuthPermission "modifyPrincipals";
    permission javax.security.auth.AuthPermission "doAsPrivileged";
    grant codebase "file:./*", Principal ExamplePrincipal "usernamedet" {
    permission java.io.FilePermission "max.txt", "read";
    HTH,
    Seetesh

  • Facelets + tomahawk + SJSAS

    Hi
    I had posted this in the wrong forum. So I apologise if this looks familiar to some of you.
    I am creating a JSF application using Facelets and tomahawk, deploying on SJSAS 8.1.
    I have noticed some weird behavior:
    1. If there is a problem with a tomahawk component, it is not registered in the log. For example, if I specify an invalid EL expression, normal HTML components will register this as an error in the log, tomahawk components do not.
    2. I have an action that gets a record for the database and fills a Javabean (using OJB) or will create a new object. It will then navigate to a new page. If I add invalid information to a page, it registers the validation message in a messages component. However, if I redeploy the application and try opening a new record, I get the following error:
    javax.faces.FacesException: #{promotionSelectPage.editPromotion}: javax.faces.el.EvaluationException: /promoSearch.xjsf @16,89 action="#{promotionSelectPage.editPromotion}": java.lang.IllegalStateException
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
    javax.faces.component.UICommand.broadcast(UICommand.java:312)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:225)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:193)
    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:249)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    java.security.AccessController.doPrivileged(Native Method)
    org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    3. Probably related to the previous issue, the tomahawk messages component (which I am using) is meant to display the label of the offending field. However, this does not work for me.
    Any ideas of what could be wrong or how to debug this?
    Cheers.

    Apologies, wrong forum. I would remove this, if I knew how.
    Message was edited by:
    KamBha

  • Browser hang occasionally when upload a file through the af:inputFile

    i try to upload a file through the <af:inputFile>, the browser hang occasionally. i can see following error in the weblogic.
    i'm using safari 5.1 on mac, and jdev 11.1.1.15
    <Aug 11, 2011 2:42:31 PM CST> <Error> <org.apache.myfaces.trinidadinternal.config.upload.CompositeUploadedFileProcessorImpl> <BEA-000000> <
    java.net.ProtocolException: EOF after reading only: '5152' of: '5877' promised bytes, out of which at least: '-1' were already buffered
         at weblogic.servlet.internal.PostInputStream.complain(PostInputStream.java:93)
         at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:139)
         at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:216)
         at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler._readLine(MultipartFormHandler.java:279)
         at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler.access$100(MultipartFormHandler.java:49)
         at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler$MultipartFormItemImpl$MultipartInputStream.readLine(MultipartFormHandler.java:696)
         at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler$MultipartFormItemImpl$MultipartInputStream.read(MultipartFormHandler.java:737)
         at org.apache.myfaces.trinidadinternal.config.upload.UploadedFileImpl._fillBuffer(UploadedFileImpl.java:304)
         at org.apache.myfaces.trinidadinternal.config.upload.UploadedFileImpl.loadFile(UploadedFileImpl.java:177)
         at org.apache.myfaces.trinidadinternal.config.upload.CompositeUploadedFileProcessorImpl._processFile(CompositeUploadedFileProcessorImpl.java:313)
         at org.apache.myfaces.trinidadinternal.config.upload.CompositeUploadedFileProcessorImpl.processFile(CompositeUploadedFileProcessorImpl.java:95)
         at org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl._doUploadFile(FileUploadConfiguratorImpl.java:222)
         at org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl.beginRequest(FileUploadConfiguratorImpl.java:150)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:562)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:212)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:155)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:276)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    <Aug 11, 2011 2:42:31 PM CST> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    javax.faces.FacesException: Broken pipe
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:804)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:276)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: java.net.SocketException: Broken pipe
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:568)
         at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:539)
         at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:427)
         at weblogic.servlet.internal.CharsetChunkOutput.flush(CharsetChunkOutput.java:298)
         at weblogic.servlet.internal.ChunkOutputWrapper.flush(ChunkOutputWrapper.java:188)
         at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:121)
         at weblogic.servlet.internal.ServletResponseImpl.flushBuffer(ServletResponseImpl.java:186)
         at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:224)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:276)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    i found the exception posted in my first post is shown after i close the file upload dialog manually which hangs for a long time(more than 5 minutes).
    so, yes, you're right , the 'broken pipe' exception means the browser drop the file (since i close it manually)
    during the browser hang ,i don't see any exception in weblogic.
    we use SSO, is the browser occasionally hang related with SSO?
    Edited by: ken wang on 2011-8-11 上午1:24

  • Custom Realm for SJSAS 9.x using JAAS documentation too vague

    Hello there,
    I am trying to implement a custom realm for a particular web application on my SJSAS 9.x server. So far I have been unsuccessful and receive the following message in my server.log:
    [#|2006-10-20T13:51:56.390-0300|INFO|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=11;_ThreadName=httpWorkerThread-8080-1;javious;|SEC5046: Audit: Authentication refused for [javious].|#]
    The documentation I have been using for reference is at:
    http://docs.sun.com/app/docs/doc/819-3659/6n5s6m58k?a=view#beabs
    However, I have a number of questions.
    First of all, this section referenced by the URL above is identified as "Creating a custom realm". Then the second sentence of this section states "Note that client-side JAAS login modules are not suitable for use with the Application Server". Does this not mean that JAAS login modules are not suitable for use with SJSAS web applications since they are components of the Application Server? Is there a reason for providing information on creating a custom realm for this application server in which it is not suitable for? Why isn't it suitable for the application server? What if I want to implement my own realm for my web application so that I can maintain my application users separately in another application?
    Secondly, this section explains that I can create a custom realm simply by creating a custom JAAS login module and a custom realm class. It then goes on to explain how to construct these classes and what to include in them. Notably, the documentation states the following:
    The authenticateUser() method must end with the following sequence:
    String[] grpList;
    // populate grpList with the set of groups to which
    // _username belongs in this realm, if any
    return commitUserAuthentication(_username, _password,
      _currentRealm, grpList);Having looked at the API for authenticateUser I discovered that it is a void method, however the documentation states to return a value from "commitUserAuthentication(..). Also, my commitUserAuthentication method only excepts a single argument of type String[] representing a list of group names, therefore I am unable to supply the additional arguments as documented. This is confusing.
    Once finished reading the documentation, I am left hanging with hardly a clue as to what to do with these two new classes. Now having implemented a custom login module on Tomcat 5.x in earlier days, I did happen to have some experience to know to edit the security.properties, policy, and login.conf files. So anyhow from here I end up stumbling blindly through configuration of my domain1/login.conf and domain1/server.policy files. I also attempted to add my new realm within the admin console under security/realms and dropped my new jar file (with two classes) into the app server lib directory.
    All in all, this completely fails to work. I have even placed System.out.println statements in all of my implemented methods and none of this actually shows up in my server.log file. Why is this section so vague? Why isn't there a step-by-step example from start to finish of how to implement a simple custom realm in SJSAS9?
    Does anybody have any helpful suggestions?

    Well, once again, I'm going to have to provide my own answer.
    After much waiting and then deciding to invest much time researching documentation and tracking down information to assist in my solution, I have manage to find the golden egg for my own recipe of a solution.
    In addition to the very helpful info I have found at:
    http://developers.sun.com/prodtech/appserver/reference/techart/as8_authentication/index.html
    I have mange to get my custom realm to work with the additional configuration of my sun-application.xml for my ear file. Even though I only wanted to specify my custom realm for my web.xml file, it turns out that in addition to this, I had to also define it in my sun-application.xml file (manually in XML text mode - within Netbeans 5.5) as follows:
    <sun-application>
        <realm>mycustrealm</realm>
        <security-role-mapping>
            <role-name>mycust_role</role-name>
            <group-name>mycust_group</group-name>
        </security-role-mapping>
    </sun-application>

  • My Excel with PowerPivots acts weird, it hangs when i try to change font color

    Hi 
    I am facing a weird issue using PowerPivot in my workbook, there is a worksheet named Charts in my workbook and all the charts i am using resides in that worksheet. Whenever i try to change the font color in that sheet, my excel's color palette goes blur
    and then everything just freezes and turns black. This problem is happening only with Charts worksheet, when i try to change the color in other sheets, it works just, the problem is only with Charts sheet. File
    size is 16 MB, there are just 10 pivot tables with some calculations and some calculated fields. There are no add-ins other than PowerPivot. 
    Thanks,
    Shanker

    Hi,
    In regarding of the issue, please provide us more information to assist you better.
    Do you receive any error message?
    Which Excel version are you using?  Excel 2013 or other?
    Which workbook format are you using? XLS or XLSX?
    Are you performing any specific task?
    According to your description, this issue seems only occur with the special worksheet "Charts".
    Firstly, I recommend we copy all of the content to a new/blank Excel file to test.
    If it works fine, this issue might be caused by the "Charts" workbook itself. We'd better check the "Charts" workbook. Or re-build the file with a new workbook.
    If it still makes Excel hang with a new file, this issue might due to the content. Please check the content first.
    Secondly, we could follow below KB to troubleshoot this issue:
    https://support2.microsoft.com/kb/2758592/en-us?wa=wsignin1.0
    Thirdly, if the issue still exists, we may try to collect the Event log and App crash dump file to do advanced troubleshooting.
    Event log:
    http://windows.microsoft.com/en-US/windows7/Open-Event-Viewer
    App crash dump file:
    First enable app crash dump collection by copying following words into notepad, saving it as dump.reg and importing
    it:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\localdumps\EXCEL.EXE]
    "DumpFolder"=hex(2):63,00,3a,00,5c,00,63,00,72,00,61,00,73,00,68,00,64,00,75,\
      00,6d,00,70,00,73,00,00,00
    "DumpCount"=dword:00000010
    "DumpType"=dword:00000001
    "CustomDumpFlags"=dword:00000000
    Then, open Excel
    to repro the issue. If crash issue appeared, please find the crashdump file under c:\.
    To further help you, please upload this file into Skydrive and shared the link here.
    Also, you can try to analyze dump by yourself if you would like to:
    How to analyze app crash dump file:
    http://blogs.technet.com/b/askperf/archive/2007/05/29/basic-debugging-of-an-application-crash.aspx
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Just installed Firefox 4. It hangs when I open any website and type in, for example, an ID, or even just click on something, for example, "Compose", in my webmail site.

    Here's the detail of what happens.
    1. Turn on computer and then click on Firefox icon on desktop.
    2. Firefox opens. Everything looks OK. Mr Bunsen's graphic is working fine.
    3. Click on any webpage link. For example, a newspaper or an online webmail page. All looks OK until
    4. Click on anything or type anything, such as in ID in a box, and bingo, the top line of Firefox goes from dark blue to very pale blue and the computer is hung. You cannot get out of Firefox or get Firefox to work.
    5. Switch off computer.
    Is this perhaps due to a clash of Add-ons. I run Avast anti-virus. McAfee came with Firefox 4 and I did not reject it. Is it conflicting wth something in my system and causing it to hang?

    You can modify the pref <b>keyword.URL</b> on the <b>about:config</b> page to use Google's "I'm Feeling Lucky" or Google's "Browse By Name".
    * Google "I'm Feeling Lucky": http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=
    * Google "Browse by Name": http://www.google.com/search?ie=UTF-8&sourceid=navclient&gfns=1&q=
    * http://kb.mozillazine.org/keyword.URL
    * http://kb.mozillazine.org/Location_Bar_search

  • I upgraded to the latest version of Firefox but it hangs when I use a search site such as Google or Bing. How can I fix this?

    putting a search option in the search box to the right of the address bar opens up the full search window but then Firefox hangs.

    Your UserAgent string in Firefox is messed up by another program that you installed, and those websites don't know you are running Firefox 3.6.3 (which is what you do have installed).
    [http://en.wikipedia.org/wiki/User_Agent]
    type '''about:config''' in the URL bar and hit Enter
    ''If you see the warning, you can confirm that you want to access that page.''
    Filter = '''general.useragent.'''
    Right-click the preferences that are '''bold''', one line at a time, and select '''''Reset''''',
    Then restart Firefox

Maybe you are looking for