IsCallerInRole(String Role) is always FALSE

I have an ejb deployed on SunOne App Server 8.1 via an EAR file with a Web and EJB modules included. I call a session EJB bean from a client Servlet and able to envoke methods on the EJB. I can authenticate fine and can get the principal in the EJBContainer using getCallerPrincipal(). Now my problem is this, isCallerInRole(String Role) is always FALSE. My application descriptor files are follows. Any help on what I'm doing wrong is greatly appreciated.
Sun-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 EJB 2.1//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-1.dtd">
<sun-ejb-jar>
<security-role-mapping>
<role-name>consultant_role</role-name>
<group-name>cn=Consultant,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>generic_role</role-name>
<group-name>cn=Generic,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>designer_role</role-name>
<group-name>cn=Designer,o=GROUPS</group-name>
</security-role-mapping>
<enterprise-beans/>
</sun-ejb-jar>
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>testapp-EJBModule</display-name>
<enterprise-beans>
<session>
<display-name>UserManagementSB</display-name>
<ejb-name>UserManagementBean</ejb-name>
<local-home>aus.UserManagementLocalHome</local-home>
<local>aus.UserManagementLocal</local>
<ejb-class>aus.UserManagementBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<security-role-ref>
<role-name>consultant_role</role-name>
</security-role-ref>
<security-role-ref>
<role-name>generic_role</role-name>
</security-role-ref>
<security-role-ref>
<role-name>designer_role</role-name>
</security-role-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<security-role>
<role-name>consultant_role</role-name>
</security-role>
<security-role>
<role-name>generic_role</role-name>
</security-role>
<security-role>
<role-name>designer_role</role-name>
</security-role>
<container-transaction>
<method>
<ejb-name>UserManagementBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
application.xml
<?xml version="1.0" encoding="UTF-8"?>
<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>testapp</display-name>
<module>
<web>
<web-uri>testapp-WebModule.war</web-uri>
<context-root>/testapp-WebModule</context-root>
</web>
</module>
<module>
<ejb>testapp-EJBModule.jar</ejb>
</module>
<security-role>
<role-name>sysadmin_role</role-name>
</security-role>
<security-role>
<role-name>consultant_role</role-name>
</security-role>
<security-role>
<role-name>generic_role</role-name>
</security-role>
<security-role>
<role-name>designer_role</role-name>
</security-role>
<security-role>
<role-name>library_admin_role</role-name>
</security-role>
</application>
sun-application.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/appserver/dtds/sun-application_1_4-0.dtd">
<sun-application>
<web>
<web-uri>testapp-WebModule.war</web-uri>
<context-root>/testapp-WebModule</context-root>
</web>
<security-role-mapping>
<role-name>sysadmin_role</role-name>
<group-name>cn=System_Admin,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>consultant_role</role-name>
<group-name>cn=Consultant,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>generic_role</role-name>
<group-name>cn=Generic,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>designer_role</role-name>
<group-name>cn=Designer,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>library_admin_role</role-name>
<group-name>cn=Library_Admin,o=GROUPS</group-name>
</security-role-mapping>
<realm>ldap</realm>
</sun-application>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<servlet>
<servlet-name>IsSecureServlet</servlet-name>
<servlet-class>IsSecureServlet</servlet-class>
</servlet>
<servlet>
<display-name>formauth</display-name>
<servlet-name>formauth</servlet-name>
<jsp-file>/index.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>IsSecureServlet</servlet-name>
<url-pattern>/IsSecureServlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<error-page>
<error-code>403</error-code>
<location>/accessDenied.jsp</location>
</error-page>
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/admin/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>sysadmin_role</role-name>
<role-name>library_admin_role</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/users/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>consultant_role</role-name>
<role-name>generic_role</role-name>
<role-name>designer_role</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>ldap</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>sysadmin_role</role-name>
</security-role>
<security-role>
<role-name>consultant_role</role-name>
</security-role>
<security-role>
<role-name>generic_role</role-name>
</security-role>
<security-role>
<role-name>designer_role</role-name>
</security-role>
<security-role>
<role-name>library_admin_role</role-name>
</security-role>
<ejb-local-ref>
<ejb-ref-name>ejb/UserManagementBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>aus.UserManagementLocalHome</local-home>
<local>aus.UserManagementLocal</local>
<ejb-link>testapp-EJBModule.jar#UserManagementBean</ejb-link>
</ejb-local-ref>
</web-app>
sun-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
<sun-web-app error-url="">
<context-root>/testapp-WebModule</context-root>
<security-role-mapping>
<role-name>sysadmin_role</role-name>
<group-name>cn=System_Admin,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>consultant_role</role-name>
<group-name>cn=Consultant,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>generic_role</role-name>
<group-name>cn=Generic,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>designer_role</role-name>
<group-name>cn=Designer,o=GROUPS</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>library_admin_role</role-name>
<group-name>cn=Library_Admin,o=GROUPS</group-name>
</security-role-mapping>
<class-loader delegate="true"/>
<jsp-config>
<property value="true" name="classdebuginfo">
<description>Enable debug info compilation in the generated servlet class</description>
</property>
<property value="true" name="mappedfile">
<description>Maintain a one-to-one correspondence between static content and the generated servlet class' java code</description>
</property>
</jsp-config>
</sun-web-app>

Hi,
Thanks for letting us know. This was indeed a bug on our side which I have fixed now, and it will be up updated in the next drop. If you are linking the source, these are the changes you need to do.
The functions that needs to be updated in SharedProperty are
         * Determines whether the specified user can edit the property.
         * @param p_userID The user to query regarding whether they can edit.
         public function canUserEdit(p_userID:String):Boolean
            return (_collectionNode.canUserPublish(p_userID,_nodeNameText));
         * Allows the current user with an owner role to grant the specified user
         * the ability to edit the property.
         * @param p_userID The userID of the user being granted editing privileges.
        public function allowUserToEdit(p_userID:String):void
            // If I can't configure, cancel.
            if(!_collectionNode.canUserConfigure(userManager.myUserID,_nodeNameText)){
                return;
            _collectionNode.setUserRole(p_userID, UserRoles.PUBLISHER, _nodeNameText);
Thanks again. We depend on your feedbacks for improving our framework.
Regards
Hironmay Basu

Similar Messages

  • SharedProperty.canUserEdit is always FALSE

    im successfully creating a session like this:
    _authenticator = new AdobeHSAuthenticator();
    _authenticator.addEventListener(AuthenticationEvent.AUTHENTICATION_FAILURE, _onAuthenticationError);
    _authenticator.addEventListener(AuthenticationEvent.AUTHENTICATION_SUCCESS, _onAuthenticationSuccess);
    _connectSession = new ConnectSession();
    _connectSession.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, _onConnectSessionSync);
    _connectSession.roomManager.addEventListener(RoomManagerEvent.ROOM_STATE_CHANGE, _onConnectSessionRoomStateChange);
    _connectSession.authenticator = _authenticator;
    then once its sync'ed i'm doing this:
    someProp = new SharedProperty();
    someProp.sharedID = "sharedTranscriptID";
    someProp.connectSession = _connectSession;
    someProp.subscribe();
    someProp.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, _onSomePropSync);
    someProp.addEventListener(CollectionNodeEvent.MY_ROLE_CHANGE, _onSomePropCanEdit);
    if (localUser.role == UserRoles.OWNER) someProp.allowUserToEdit(localUser.userID);
    localUser is just the chat OWNER's UserDescription. it doesn't matter how many events i listen to or where or when i call:
    _transcriptID.allowUserToEdit(localUser.userID);
    the result is always the same: SharedProperty.canUserEdit is always FALSE.
    i'm going to use a SharedCollection because i know i can just do 'addItemAt' and it'll just work, until/unless someone can suggest quite why SharedProperty.canUserEdit is always FALSE.

    Hi,
    Thanks for letting us know. This was indeed a bug on our side which I have fixed now, and it will be up updated in the next drop. If you are linking the source, these are the changes you need to do.
    The functions that needs to be updated in SharedProperty are
             * Determines whether the specified user can edit the property.
             * @param p_userID The user to query regarding whether they can edit.
             public function canUserEdit(p_userID:String):Boolean
                return (_collectionNode.canUserPublish(p_userID,_nodeNameText));
             * Allows the current user with an owner role to grant the specified user
             * the ability to edit the property.
             * @param p_userID The userID of the user being granted editing privileges.
            public function allowUserToEdit(p_userID:String):void
                // If I can't configure, cancel.
                if(!_collectionNode.canUserConfigure(userManager.myUserID,_nodeNameText)){
                    return;
                _collectionNode.setUserRole(p_userID, UserRoles.PUBLISHER, _nodeNameText);
    Thanks again. We depend on your feedbacks for improving our framework.
    Regards
    Hironmay Basu

  • File exists always false

    I'm making a mobile app for iOS and I have files in both the applicationDirectory (inside the app) and the cacheDirectory.
    No matter what I do a check on file.exists always returns false even though it is there - it's a video and it can play so it's there alright.
    What is going on?
    I have a string representing the path eg. "/assets/video.mp4"
    var f:File = File.applicationDirectory.resolvePath(filePath);
    trace(f.exists) //false

    When I trace the nativePath of the file I am trying to find it shows "C:\Users\User\AppData\Roaming\Arakaron.debug\Local Store". This is the exact path I am following in Explorer. Now, instead of applicationStorageDirectory I can do documentsDirectory and it reads that the file is in fact there. With the applicationStorageDirectory it only registers that the file exists after I copy from the embedded db file. 

  • The case structure is not working well on comaring two strings using true or false string matching VI

    I need an execution of commands after the reply from the instrument matches with the string I provided for that i used true or false string match VI on which the true string the matching command and the string is the reply from the instrument. And I put the further executionable commands in frame after frame of sequence loop in the true of the case structure. Amd finally I given all the output strings to the concatenate string to get all the replies as one loop. But when I execute the program the desired result is not available. So kindly please help me to overcome this problem.  
    Attachments:
    basic serial with changes.vi ‏24 KB

    You VI makes absolutely no sense and I would recommend you start with a few simple LabVIEW tutorials before trying to tackle this.
    What is the point of the FOR loop with 1 iteration, it might as well not even be there, same difference.
    Why is there an abort primitive in the FOR loop, this mean the program will unconditionally stop abort before any downstream code will ever go into action. The program will never get past the FOR loop.
    You created a circular data dependency and LabVIEW inserted a feedback node automatically, making things even worse. (see also)
    You need to learn about dataflow, execution order, and data dependency.
    You need to learn about the various types of tunnels (plain, autoindexing, etc.)
    There is a tremendous amount of duplicate code. Large code sections are the same, differeing only by a string. You should only have one copy of that code inside a proper state machine. Have a look at the design templates and examples that ship with LabVIEW.
    LabVIEW Champion . Do more with less code and in less time .

  • Wlconfig with custom role mapper always fails FIRST time only

    WLS 8.1 sp2.
    I have a very strange problem, where I'm "coldstarting" a server and
    configuring it, much like the ant build script for medrec. Only I have a
    custom role mapper (medrec has a custom authentication provider). Anyway,
    the first time I execute this task (after a clean), it consistently fails
    like so:
    [wlconfig] OK
    [wlconfig] OK
    BUILD FAILED
    file:P:/dgs/build.xml:186: Unable to create mbean:
    weblogic.management.MBeanCreationException: - with nested exception:
    [java.lang.ClassNotFoundException:
    weblogic.management.configuration.com.combinenet.security.CNRoleMapperProvid
    erMBean]
    (that class looks bogus to me, BTW, as my provider class is
    com.combinenet.security.CNRoleMapperProvider)
    Now, the SECOND time I execute "coldstart", which runs wlconfig, the server
    starts up fine, and my custom role mapper is loaded successfully. So,
    obviously I figured something was left around the first time which somehow
    helped matters, but the strange thing is that I delete the entire domain
    directory before "coldstarting" the server, and I also re-copy the role
    mapper provider jar into the mbeantypes directory, so I'm very puzzled. I'm
    copying the coldstart task below (and the clean).
    Can anyone tell me what's wrong with this task that would make it fail the
    first time through after a clean? Is this a bug? And why would it succeed on
    all subsequent attempts (without a clean)? I just don't see anything wrong
    with what I'm doing.
    TIA,
    Miles
    <target name="coldstart"
    description="Start a new DGS Server with an empty config"
    depends="configServerEnv,startPointBase,configPointBase,dist" >
    <delete dir="${dgs.root}" quiet="true"/>
    <mkdir dir="${dgs.root}"/>
    <wlserver
    beahome="${bea.home}"
    dir="${dgs.root}"
    domainname="${dgs.domain}"
    host="${dgs.host}"
    port="${dgs.port}"
    servername="${dgs.serverName}"
    username="${wl.username}"
    password="${wl.password}"
    productionmodeenabled="false"
    generateconfig="true"
    action="start">
    </wlserver>
    <wlconfig url="t3://${dgs.host}:${dgs.port}"
    username="${wl.username}"
    password="${wl.password}">
    <query domain="${dgs.domain}" type="Server"
    name="${dgs.serverName}"
    property="dgs.server"/>
    <create type="JDBCConnectionPool"
    name="DgsPool"
    property="dgs.pool">
    <set attribute="CapacityIncrement" value="1"/>
    <set attribute="DriverName"
    value="com.pointbase.jdbc.jdbcUniversalDriver"/>
    <set attribute="InitialCapacity" value="1"/>
    <set attribute="MaxCapacity" value="10"/>
    <set attribute="Password" value="${pointbase.password}"/>
    <set attribute="Properties" value="user=${pointbase.username}"/>
    <set attribute="RefreshMinutes" value="0"/>
    <set attribute="ShrinkPeriodMinutes" value="15"/>
    <set attribute="ShrinkingEnabled" value="true"/>
    <set attribute="TestConnectionsOnRelease" value="false"/>
    <set attribute="TestConnectionsOnReserve" value="false"/>
    <set attribute="URL" value="jdbc:pointbase:server://localhost/demo"/>
    <set attribute="Targets" value="${dgs.server}"/>
    </create>
    <create type="JDBCTxDataSource" name="DGS Tx DataSource">
    <set attribute="JNDIName" value="DgsTxDataSource"/>
    <set attribute="PoolName" value="DgsPool"/>
    <set attribute="Targets" value="${dgs.server}"/>
    </create>
    <create type="JMSConnectionFactory" name="Queue">
    <set attribute="JNDIName" value="jms/QueueConnectionFactory"/>
    <set attribute="XAServerEnabled" value="true"/>
    <set attribute="Targets" value="${dgs.server}"/>
    </create>
    <create type="JMSJDBCStore" name="DgsJDBCStore"
    property="dgs.jdbcstore">
    <set attribute="ConnectionPool" value="${dgs.pool}"/>
    <set attribute="PrefixName" value="Dgs"/>
    </create>
    <create type="JMSServer" name="DgsJMSServer">
    <set attribute="Store" value="${dgs.jdbcstore}"/>
    <set attribute="Targets" value="${dgs.server}"/>
    <create type="JMSQueue" name="Registration Queue">
    <set attribute="JNDIName" value="jms/REGISTRATION_MDB_QUEUE"/>
    </create>
    </create>
    <create type="MailSession" name="Dgs Mail Session">
    <set attribute="JNDIName" value="mail/DgsMailSession"/>
    <set attribute="Properties"
    value="mail.user=joe;mail.host=mail.mycompany.com"/>
    <set attribute="Targets" value="${dgs.server}"/>
    </create>
    <create type="StartupClass" name="StartBrowser">
    <set attribute="Arguments" value="port=${dgs.port}"/>
    <set attribute="ClassName" value="com.combinenet.test.StartBrowser"/>
    <set attribute="FailureIsFatal" value="false"/>
    <set attribute="Notes" value="Automatically starts a browser on
    server boot."/>
    <set attribute="Targets" value="${dgs.server}"/>
    </create>
    <set mbean="Security:Name=myrealmDefaultAuthenticator"
    attribute="ControlFlag" value="SUFFICIENT"/>
    <set mbean="Security:Name=myrealmDefaultAuthenticator"
    attribute="MinimumPasswordLength" value="10"/>
    <set mbean="Security:Name=myrealm"
    attribute="DeployPolicyIgnored" value="false"/>
    <set mbean="Security:Name=myrealm" attribute="DeployRoleIgnored"
    value="false"/>
    <set mbean="Security:Name=myrealm"
    attribute="FullyDelegateAuthorization" value="true"/>
    <set mbean="Security:Name=myrealm"
    attribute="AuthenticationProviders"
    value="Security:Name=myrealmDefaultAuthenticator|Security:Name=myrealmDefaul
    tIdentityAsserter"/>
    <set mbean="Security:Name=myrealm" attribute="RoleMappers"
    value="Security:Name=myrealmDefaultRoleMapper|Security:Name=myrealmCNRoleMap
    perProvider"/>
    <create type="com.combinenet.security.CNRoleMapperProvider"
    domain="Security" name="myrealmCNRoleMapperProvider"/>
    <set mbean="Security:Name=myrealmCNRoleMapperProvider"
    attribute="Realm" value="Security:Name=myrealm"/>
    <query domain="${dgs.domain}" type="Server" name="DgsServer">
    <set attribute="StdoutEnabled" value="true"/>
    <set attribute="StdoutSeverityLevel" value="64"/>
    <set attribute="ListenAddress" value=""/>
    <set attribute="ListenPort" value="${dgs.port}"/>
    </query>
    <query domain="${dgs.domain}" type="WebServer" name="DgsServer">
    <set attribute="LogFileName" value="logs/access.log"/>
    </query>
    </wlconfig>
    <copy file="${dist}/lib/dgs.ear" todir="${dgs.root}"/>
    <wldeploy action="deploy"
    source="${dgs.root}/dgs.ear"
    name="dgsapp"
    user="${wl.username}"
    password="${wl.password}"
    verbose="true"
    adminurl="t3://localhost:7001"
    debug="true"
    targets="${dgs.serverName}"/>
    <!-- unfortunately BEA's wlserver task exits when ant's jvm
    exits -->
    <sleep hours="10"/>
    </target>
    <target name="clean"
    description="Clean the build tree(s)"
    depends="init">
    <delete dir="${build}" verbose="true"/>
    <delete dir="${dist}" verbose="true"/> (dist is where the ear file is
    created)
    </target>

    g_wolfman wrote:
    Are you using Parallels?
    Wolfman, thats a good hint!
    Additional info at --> http://reviews.cnet.com/8301-13727_7-20106682-263/macbook-airs-double-booting-wi th-parallels-and-filevault-enabled/
    Thanks for the input.
    Lupunus

  • ItemPressed Event ActionSuccess is always false when in Add Mode

    Hi experts,
    i have a question regarding the ActionSuccess property in the ItemPressed Event.
    When working with a UserForm and an Ok Button (ID = 1) then the ActionSuccess never gets true when pressing the Button when the UserForm is in Add-Mode.
    Is this normal behaviour or a bug?
    Thank you for your help
    Matthias

    Hi Edy,
    yes, the form was in add mode.
    I'm in the ItemPressed Event, BeforeAction=true.
    There the addon does it's work and after that I set the FormMode to OK.
    This closes the form!
    Why I'm in BeforeAction=true? Because i have to know if the form is in add mode or in update mode, because I do different things regarding to the form mode.
    @Eric:
    That's halfway true. B1 sets the FormMode to OK when the form was in update mode, but not, when the form was in the add mode.
    Thank you
    Matthias

  • Casting string as int always makes it zero?

    Hi
    I've had to make
    _myID = event.selectedRow.getData("my_id");
    into
    _myID= event.selectedRow.getData("my_id") as int;
    so that it stops causing a warning when my buddy loads it into FlashDevelop (I'm working in Pro)
    Since then, every myID becomes 0. eg if event.selectedRow.getData("request_id") contains "29" it turns 29 into into zero.
    What should I do so that "29" becomes 29?
    Thanks for taking a look.

    You can also use parseInt and parseFloat, which have the advantage of letting you check for isNaN if the cast fails (but the variable type needs to be Number for this to work--I don't think int can be NaN).

  • RDBMS Security realm 6.1-8.1 migration

    I am trying to migrate a RDBMS security realm from WLS6.1 to WLS8.1.
    Having followed the instructions in http://e-docs.bea.com/wls/docs81/upgrade/upgrade6xto81.html#1066711
    I am now able to boot WLS8.1 and see encouraging signs such as the 'Compatibility
    Security' node appearing in the left-hand console pane. The contents of the Users
    and Groups nodes visible under this node look correct (ie as defined in the underlying
    database).
    However, to get to this point I had to initially hardwire the values for the database
    driver, url, user and password as these were null when obtained from the associated
    RDBMSRealmMBean object, causing the server to fail to start. This enabled me
    to bootstrap the process so that I could use the console to enter these values
    on the Database tab for the Realm I had defined for Compatibility Security. I
    see no mention of this step in the instructions referred to above and therefore
    missed out this vital step.
    When WLS8.1 starts it displays:
    <date&time> <Notice> <Security> <BEA-090082> <Security initializing using security
    realm myrealm.>
    myrealm is a Realm listed under Security but I would have expected the realm to
    be the specially-defined realm associated with Compatibility Security. So, question
    number 1 - does this output from WLS indicate that it is using the Compatibility
    Security realm or the default realm?
    Although the console displays the expected set of users and groups , my application
    is failing to associate a user with a 'role' - the Groups node shows that user
    U is in group G but when the application invokes the SessionContext method isCallerInRole(String
    role) where the caller is U and the role is G the result of the invocation is
    false. Question number 2 - why does this not return true in this case?
    Note, this code (that I have inherited) worked fine in WLS6.1 and the only significant
    change I needed to make for WLS8.1 is in the wrapper classes, in particular the
    code to get the required RDBMSRealmMBean. Having now successfully got hold of
    this object I would have expected the rest of the code to work fine (ok, 'expected'
    is a bit optimisitic - but I'm not aware that there are any functional differences
    beyond obtaining the RDBMSRealmMBean object).
    Many thanks in advance for any assistance with this.
    David

    Mehrshad
    I wasn't involved in the original WL6.1 code development but this is based on
    the example code that BEA provide with the WLS6.1 installation - it should therefore
    be visible at ~bea/wlserver6.1/samples/examples/security/rdbmsrealm
    HTH
    David
    "Mehrshad Setayesh" <[email protected]> wrote:
    >
    David:
    I am trying to do the same thing and can not find which RealmClassName
    to use
    in 8.1. In our previous version, 6.1, I was using com.bea.wlpi.rdbmsrealm.RDBMSRealm.
    What is the mapping
    Java class in 8.1? Thanks.
    Regards
    Mehrshad
    "David Franklin" <[email protected]> wrote:
    I am trying to migrate a RDBMS security realm from WLS6.1 to WLS8.1.
    Having followed the instructions in http://e-docs.bea.com/wls/docs81/upgrade/upgrade6xto81.html#1066711
    I am now able to boot WLS8.1 and see encouraging signs such as the 'Compatibility
    Security' node appearing in the left-hand console pane. The contents
    of the Users
    and Groups nodes visible under this node look correct (ie as defined
    in the underlying
    database).
    However, to get to this point I had to initially hardwire the values
    for the database
    driver, url, user and password as these were null when obtained from
    the associated
    RDBMSRealmMBean object, causing the server to fail to start. This enabled
    me
    to bootstrap the process so that I could use the console to enter these
    values
    on the Database tab for the Realm I had defined for Compatibility Security.
    I
    see no mention of this step in the instructions referred to above and
    therefore
    missed out this vital step.
    When WLS8.1 starts it displays:
    <date&time> <Notice> <Security> <BEA-090082> <Security initializingusing
    security
    realm myrealm.>
    myrealm is a Realm listed under Security but I would have expected the
    realm to
    be the specially-defined realm associated with Compatibility Security.
    So, question
    number 1 - does this output from WLS indicate that it is using the Compatibility
    Security realm or the default realm?
    Although the console displays the expected set of users and groups ,
    my application
    is failing to associate a user with a 'role' - the Groups node shows
    that user
    U is in group G but when the application invokes the SessionContextmethod
    isCallerInRole(String
    role) where the caller is U and the role is G the result of the invocation
    is
    false. Question number 2 - why does this not return true in this case?
    Note, this code (that I have inherited) worked fine in WLS6.1 and the
    only significant
    change I needed to make for WLS8.1 is in the wrapper classes, in particular
    the
    code to get the required RDBMSRealmMBean. Having now successfully got
    hold of
    this object I would have expected the rest of the code to work fine(ok,
    'expected'
    is a bit optimisitic - but I'm not aware that there are any functional
    differences
    beyond obtaining the RDBMSRealmMBean object).
    Many thanks in advance for any assistance with this.
    David

  • Boolean.getBoolean(String str) always return false

    I'm on macOSX (Tiger), using JSDK 1.5.
    The function Boolean.getBoolean() return always false.
    I try Boolean.getBoolean("true");
    Boolean.getBoolean(Boolean.toString(Boolean.TRUE));
    always false.
    Is it a bug only on macOS, or does I do something wrong?
    so i just made mybooleanVar.equals("true"); done the right result, but it's just strange that the Boolean.getBoolean(...) function did not return the right value... And I can't send this bug to sun, because they don't assure support for macOSX platform... :s

    Yeah, some of the the least intuitive methods in the
    API are this one and its equivalents from the other
    basic type wrapper classes. Confusingly named methods
    in the wrong classes (they should have placed those
    methods in System, if anywhere at all).My vote goes to not anywhere at all.
    Boolean.getBoolean("property");is equivalent to
    Boolean.parseBoolean(System.getProperty("property"));Not worth a method for the saved keystrokes vs the problem in readability. Especially a misnamed method.

  • Why string compare is false?

    Hello,
    I've been confused for a while, could you mind helping?
    This small code compare two strings, not know why but always false.
    ==
    String date_zero = "0000-00-00";
    out.println("cs is "+date_claim_set); // print "cs is 0000-00-00" on screen
    out.println("result is "+date_claim_set.equals(date_zero)); // print "result is false" on screen
    if ( ! date_claim_set.equals(date_zero) ) {
    out.println("strings not equal"); // printed
    ==
    why the two strings are not equal?
    Hope you can help, thanks in advance.
    Rgds, Dove

    masijade. wrote:
    Well, most of his questions lately, have been about MySQL, and "0000-00-00" is the way that MySQL (per default) represents invalid dates, and "YYYY-MM-DD" is the toString() pattern for a java.sql.Date instance. ;-)Sorry for keeping your guys waiting, but I've spent sometimes for reading more material as I can. Now the problem fixed.
    The solution is liked this.
    1) MySQL document said '0000-00-00' is a valid value for date in DB, but a wrong value for JDBC.
    Detail:
    http://dev.mysql.com/doc/refman/5.0/en/connector-j-installing-upgrading.html#connector-j-installing-upgrading-3-0-to-3-1
    2) It is recognized as a problem, so it has been fixed. Instead of using old JDBC Connector/J, new version with re-configuration of zeroDateTimeBehavior can solve.
    I configure it to convertToNull, so in Java I see all value 0000-00-00 from DB as null, works fine.
    Many thanks the ideas from all of you.
    Rgds, Dove

  • PartialPageUtils.isPartialRequest(fctx) always return false

    Hi All ,
    I am using Jdeveloper 11g and i can't solve the problem with getting always false from
    PartialPageUtils.isPartialRequest(fctx);
    If i use partialSubmit="true" PartialPageUtils.isPartialRequest(fctx) return false.
    If i don't use partialSubmit PartialPageUtils.isPartialRequest(fctx) return false.
    Could you please give me a solution.
    Thanks in advance,
    JavaDeveLoper

    Hi Mr. Frank Nimphius
    I have a creation form with 7 input text fields. 3 of them are required fields.
    These 3 fields have valueChangeListener , validator and autoSubmit="true".
    The problem is that when i enter info in field 1 and tab to the next field after passing the validator for field1 i get error message, because i've entered nothing in the other required fields.
    Also i've ovveride public void validateModelUpdates(LifecycleContext lifecycleContext) {...}
    public void validateModelUpdates(LifecycleContext lifecycleContext) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    boolean isPPR = PartialPageUtils.isPartialRequest(fctx);
    if (isPPR) {
    System.out.println("No Refresh");
    } else {
    super.validateModelUpdates(lifecycleContext);
    This method always return false.

  • Programmatic security using isCallerInRole(roleName) doesn't work

    Hi,
    I am developing an EJB application on WebAS 6.40 SP16 and try to use declarative and programmatic security combined. I have conducted the following steps to map a UME group to an j2ee ejb role:
    - Mapped a new Security Role (SR_ProductAdmin) to the UME Administrators group using the Visual Administrator(Services/Security Provider/Security Roles).
    - Mapped the Security Role to an EJB Application Security Role in ejb-j2ee-engine.xml
    <ejb-j2ee-engine>
      <security-permission>
        <security-role-map>
          <role-name>ProductAdmin</role-name>
          <server-role-name>SR_ProductAdmin</server-role-name>
        </security-role-map>
      </security-permission>
    </ejb-j2ee-engine>
    - Added the role in ejb-jar.xml/Assembly/security-role
    - Enforced descriptive security in ejb-jar.xml/Assembly/method-permission on my EJB. This works as expected, only members of the administrators group can access the EJB.
    - Added another role mapped to the J2EE Security Role "all" and added it to  ejb-jar.xml/Assembly/method-permission to allow some methods of the EJB to be invoked by everyone, security checking is based on parameters and done programmatically at runtime.
    - I have mapped the ProductAdmin in ejb-jar.xml/Enterprise Beans/session beans/security-role-ref as described in the Developer Studio manual.
    <security-role-ref>
      <role-name>ProductAdminInternal</role-name>
      <role-link>ProductAdmin</role-link>
    </security-role-ref>
    - I should be able to check the role of the caller using the Context.isCallerInRole(String roleName) but it always returns false for roleName="ProductAdminInternal". In the same context I can invoke Context.getCallerPrincipal().getName() and get (correctly) the user name "Administrator".
    Thanks in advance,
    Stefan

    Hi Frank,
    When using the Must value authentication worked but when using the Auth value it didn't.
    Now I've found what the problem was.
    I had to define the users and role in %JDEV_HOME%\j2ee\home\config\system-jazn-data.xml. I had setup my users in several jazn files but this one. It's pretty hard to find in which xml file you have to define users and roles. I don't understand either why switching from Must to Auth makes the authentication using different jazn files...
    Now I have to test in an OC4J standalone instance.
    Thanks,
    Seb.

  • Problems with string comparison using

    I have a problem using the > and < comparison operators.
    When the xsl:if test uses numeric values the comparison works OK. If the
    test uses string values it always returns a false result.
    The style sheet below shows an example (which should run against any
    XML doc with a root element)
    Note - the spurious
    tags are just for debugging- I write the
    output to an HTML page and IE happens to recognise them
    even though the rest of the HTML tags are missing !!
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:template match="/">
    <xsl:for-each select="*">
    Starting numeric test :
    <xsl:if test="(1 < 2)">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished numeric test :
    Starting alpha test :
    <xsl:if test="('a' < 'b')">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished alpha test :
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    null

    Having looked at the XPath spec I believe what I am trying to do (compare strings with gt and lt type tests) is not supported. The spec indicates that they can only be used for node sets or numerics. Presumably the processor is attempting to convert the values to numbers but evaluating them both as NaN (not a number). Can someone confirm this.
    I find this restriction quite strange, is this a situation where an extension function is required ? If so can someone point me to some (Java) examples.
    null

  • Comparing text box with empty string

    Here is the procedure how to do it - but it does not work for me.
    http://blogs.adobe.com/captivate/2010/12/few-tips-on-%E2%80%98advanced-actions%E2%80%99.ht ml
    Could someone please confirm if the procedure mentioned in the blog is working or not, and if it's working, then what did I mess up in the first case below?
    In summary, I created a variable stringEmpty and created Advanced Action with condition associated with a button. I also created variable varUserName and associated it with a text box.
    There are 3 cases and 3 different behaviours.
    First case:
    stringEmpty =
    advanced action condition: varUserName; not equal to; stringEmpty (variable)
    After clicking the button, the result is as if the condition was always false (i.e. as if the string in the text box was always equal to stringEmpty)
    Second case:
    stringEmpty = aaa
    advanced action condition: varUserName; not equal to; stringEmpty (variable)
    After clicking the button, the condition is met when user enters "bbbbbbb" (which is OK). However, if he does not enter anything, only clicks the button, the condition is not met (which is incorrect behaviour, because "" <> "aaa" so the condition is met)
    Third case:
    advanced action condition: varUserName; not equal to; cccc (literal)
    In the third case all is OK.

    Hello,
    Each entry in a TEB has to be confirmed before it will get into the variable associated with it. This can be done with the Submit button or you can assign a shortcut key to it or use both. So I would really recommend to check if the variable is populated before you trigger your advanced action. You can do that by inserting temporarily a Text Caption that shows this user variable. Working with 2 TEB's on a slide: I tried to explain the workflow in another blog post:
    One submit button for multiple Text Entry Boxes
    To check if somewhere a scored object has been slipping in: check the Advanced Interaction view (F9)  which gives you an overview of all scored things.
    Lilybiri

  • Doubt in String Equals

    Doubt in String Equals_
    if(filePath != "") {
         getExcelData(filePath);
    }same as
    if(!filePath.equals("")) {
         getExcelData(filePath);
    }The can both be used interchangeably right ?

    kajbj wrote:
    (You should really open a textbook and read about Strings, or google)fortunatly i know this :)
    if you do
    String str = "abc"
    str =="abc" // will always return true.
    but str==(new String("abc")) // will always return false.
    But as per the query posted i am referring to the first case :)

Maybe you are looking for

  • Function SO_OBJECT_ARCHIVE_READ

    Dear Reader, I am attempting to write a program which will automatically download all files in the General folder in SAP office onto the harddrive. I use the function SO_OBJECT_DOWNLOAD to download the files after i have read them. The function SO_OB

  • How to solve Photoshop install errors ?

    Can you help please ? This message was received when I tried to download and install Photoshop CS6, 64 bit system, Windows XP: Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DF023, DW063 ... WARNI

  • So many errors

    I am always getting these errors when I build a Blu-ray disc. error 6 It was suggested to update XLM file from MS but that hasn't helped. This is so frustrating. It was suggested it has something to do with the button routing but i have been trying s

  • Compras na AppStore

    A fatura das compras na AppStore, em dólares, vem transformadas em real no cartão da gente?

  • I am experiencing an issue with font size on a calender... see below

    Apple discovered an issue with the file you submitted. The font is inconsistent in places, and we want to make sure your calendar turns out just the way you designed it.  We've canceled your order- you won't be charged, and we have some suggestions f