"Invalid cast exception" thrown when assigned the AutoCompleteStringCollection AutoCompleteCustomSource of TextBox property

Hello

I built a .NET c# wrapper around the TestStand users management module.

When the application works as a stand-alone Windows Application, there is no exceptions or thrown errors. However, when the dll is integrated with TestStand and called from the FrontEndCallbacks movie file, I got up an invalid "Cast" exception when the AutoCompleteStringCollection is assigned to the textBox AutoCompleteCustomSource property.

As stated earlier, it works perfectly well when it is a standalone application. I am at a loss to figure why this is happening. I would appreciate if someone could shed some light on this behavior.

Thank you

Arun

Thanks for posting your example. The problem seems to be caused by the fact that your form is created in a thread of execution TestStand using the MTA COM threading model. .NET Windows forms must always be created son marked with the model STA thread. Probably your standalone application uses the STAThread attribute. Here are some references (rule FxCop, STAThread)

You can work around this problem by creating a new STA thread in TestStand using a sequence of appeal step. Set Options to run to use new discussion and check the box Use Single-Threaded Apartment.

Tags: NI Software

Similar Questions

  • BlackBerry Smartphones eception exception error when entering the "Messages".

    I have a client who uses a Blackberry World Edition (8830) and when it tries to go in Messages (by clicking on the Messages icon) it gets this error message all the time: uncaught Exception: java.lang.null.pointer

    I tried 2 types of resets, alt + Cap + del and tried to remove the battery when the BB is running and the same thing, I did a hard reset, that is wiping the BB and customer has left me a message this morning that he always gets the same error message.

    My BES Console (synchronize us with Domino servers on a Lotus Notes platform), I see that he has the

    version of the 3.0.0.81 platform

    The BlackBerry version: 4.2.2.196

    His blackberry had a Bell Mobility service.

    At present, the only other thing I can think of is to download the operating system and reload it on the BB using Desktop Manager.

    Can someone help me with this please.  I appreciate all the help.

    Robert Goupil

    BES administrator

    * Update - my client turned on his blackberry with the BES this morning and sent a message that, after activation, the problem seems to be resolved.  Now, is there something different that can be done in case this happens again, we have more than 800 users of blackberry and most of them have the 8830 model.

    Hello

    Your troubleshooting actions have been directly on the money, I see.

    HRT is the host Routing Tables. It's entries sent by the carrier.

    When you highlight the entry above and you click on register now, he recorded with the wireless network. Update the details of the device on the relay of the rim and down icons specific carrier or applicants

    I think that the problem existed in an application corrupted on the smartphone users, by recording the phone, the application

    has been refreshed. It's the first time I've seen this particular exception message solved without device

    reload. (Just for reference I read messages 133150).

    Thank you

    Don't forget to adjust your thread. Put the check mark in the green box containing your answer! Thank you

  • Exception thrown when install lib OSM7 unresolved references

    Hello
    I use jdevstudio11113install.exe to install the WL + ADF server.
    During the OSM 7.0.3 installation, I get an exception like

    < 17 October 2012 16:53:31 IST > < error > < hats > < BEA-149265 > < error has occurred in the execution of the request for deployment with the ID ' 1350473008281 'for task ' 0'. Error is: "weblogic.management.DeploymentException: [J2EE:160149] * error during the processing of library reference." Application library references, defined in pending *.
    * weblogic - application.xml: [Extension name: adf.oracle.domain, exact match: false], [name of the Extension: oracle.jsp.next, exact match: fake]. *'weblogic.management.DeploymentException: [J2EE:160149] error in the processing of library reference. References application library, defined in weblogic pending - application.xml: [Extension name: adf.oracle.domain, exact match: false], [name of the Extension: oracle.jsp.next, exact match: false].
    at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
    to weblogic.application.internal.BaseDeployment$ 1.next(BaseDeployment.java:1221)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
    Truncated. check the log file full stacktrace
    >

    However, I have checked the application.xml file - weblogic and did not find any entry for the extension name. Can someone help me solve this problem please?

    Thank you and best regards,
    Angèle

    You have not successfully created domain WebLogic. OSM is developed using the framework of the ADF and you select "Oracle JRF - 11.1.1.0 [Oracle_common]" & "JJRF Asynchronous services - 11.1.1.0 WEbServices Oracle [oracle _common]" while creating the WebLogic domain.

  • Do WLST exception like ' target the exception that is thrown when the application deployment: no such file or directory found in the location of the specified application: "all administration server application deployment

    Hi all

    I'm trying to deploy an application to the administrator of the server using WLST and I had followed steps below.

    (1) I ran setDomainEnv.cmd

    It was performed without error.

    (2) connect to the Server Admin

    Connect ('USERNAME', 'PASSWORD', ' t3: / / localhost:7001', adminServerName = "AdminServer")

    (3) to deploy the application

    deploy ('benefits', 'C:\Users\suhas\Desktop\benefits.war' target = 'AdminServer')

    Traceback (innermost last):

    Folder "system <>", line 1, in?

    File '< iostream >", line 246, to deploy

    File "< iostream >", line of 1848, in raiseWLSTException

    WLSTException: Error occurred when executing deploy: target the exception that is thrown when the application deployment: no such file or directory found in the location of the specified application: C:\Users\suhas\Desktoenefits.war : no such file or directory found in the location of the specified application: C:\Users\suhas\Desktoenefits.war

    DumpStack() to view the full stacktrace

    WLS: serverConfig/test_domain / >

    I'm the exception above, I gave the exact war file path while the deploy command of race but represented except the application path refers to a path that does not exist.

    I, e. instead of display C:\Users\suhas\Desktop\benefits.war C:\Users\suhas\Desktoenefits.war appear

    Please help me solve this problem.

    Thank you and best regards,

    Suhas

    You can use the script here

    Automation of the deployment of the application on Oracle Weblogic Server

    Use a backslash instead of the forward slash... and type it instead of copy paste...

  • Illegal state Exception when running the code at startup

    Here's my main method:

        public static void main(String[] args)
        {
            if (args.length == 1 && args[0].equals("startup"))
            {
                Criteria locationCriteria = new Criteria();
                locationCriteria.setCostAllowed(false);
                LocationProvider mlocationProvider;
                Location mLocation = null;
                try
                {
                    mlocationProvider = LocationProvider
                            .getInstance(locationCriteria);
                    mLocation = mlocationProvider.getLocation(-1);
                }
                catch (LocationException e) {
                }
                catch (InterruptedException e) {
                }
                QualifiedCoordinates mQC = mLocation.getQualifiedCoordinates();
            }
            else
            {
                MyApp theApp = new MyApp();
                theApp.enterEventDispatcher();
            }
        }
    

    The method

     mlocationProvider = LocationProvider.getInstance(locationCriteria); 
    

    throws the illegal state exception

    When I check the debug information, I found this exception are thrown to the line when he calls Application.getApplication ();

    When I move this code to run in a normal life to screen it works fine. !

    Any help?

    There may be a number of issues here:

    (1) until your Application is actually running, you can't really do any processing.  Your Application does not start running until you

    'enterEventDispatcher() '.

    Hand, all you should do is instantiate your Application.  Manufacturer of your Application should not do anything complicated either, since it works as part of main().

    You can do some activities, for example to add listeners, in main() code that is, in some respects, unfortunate because it lulls people into thinking they can do anything.  ,

    (2) get the location as you do, is a blocking call.  If you need to do it on a background Thread.  You c a get away with that on the Simulator because GPS simulated returns immediately with a location.  So it does not actually block.  But on a real device, code as you can force your application to break.

    (3) you seem to try to do something in the commissioning.  You must be aware, this start-up up is called as part of the start-up of the device and before the unit is fully active.  In fact, I think on a real device that this code will fail because the device is not ready to provide a location in the beginning upward.

    You will find find article, informative and useful for (1) and (3).

    http://supportforums.BlackBerry.com/T5/Java-development/write-safe-initialization-code/Ta-p/444795

    I suspect you want to start and get a location at first upward, in which case you might find this useful:

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-background-application/Ta-p/445226

  • Bug in the MAF/JDev - Exception thrown in the preview

    Hi, I just started to develop for MAF on my local PC.

    I was recently in London attending a practice for mobile, so I opted to try the same tutorial, we had here on my PC.

    In the tutorial, you just create 2 features, a workflow and a local HTML help page.

    Then, you create a JAVA bean to be a data controller.

    The created workflow originally has 2 views - EmpList and graphic with a transition of ran.

    After that the data controller is created, I started creating the first view: empList, when I click on preview, JDeveloper encounters an Exception, and my UI is broken.

    The Application browser is empty, and the only solution that worked to restore my user interface is as follows:

    https://community.Oracle.com/thread/1009459?start=0 & tstart = 0

    It's really annoying to do it every time

    Kind regards

    Ognjen

    I paste the error details here - NPE in o.j.model.ApplicationContent:62:

    Execution of null action (959) [AdfcDiagramEditor] [for (EmpsTaskFlow.xml, ViewController.jpr, Employees.jws)]

    NULL: Jul 13, 2015 10:31:21 oracle.bali.inspector.multi.MultiObjectModel _updateProperties

    INFO: SelectionModel has no selected items

    Call to order: [for (empList.amx, < none >, < any >)]

    Call to order: initialize the contents of the file [for (empList.amx, < none >, < any >)]

    Calling command: Insert panelPage with activated facets [for (empList.amx, < none >, < any >)]

    NULL: Jul 13, 2015 10:31:26 oracle.bali.inspector.multi.MultiObjectModel _updateProperties

    INFO: SelectionModel has no selected items

    Command: all pages

    13 July 2015 10:31:34 oracle.bali.xml.model.XmlContext deliverSetupEventHelper

    GRAVE: Exception thrown during the execution of installation hook oracle.adfmf.amx.dt.editor.databinding.AMXXmlContextSetupHook@23aa90f4 context JDevXmlContext@540205355 (home.amx, null, null)!

    java.lang.NullPointerException

    at oracle.jdeveloper.model.ApplicationContent.getInstance(ApplicationContent.java:62)

    at oracle.adfmf.common.util.McAppUtils.getApplicationAdfMetaInfUrl(McAppUtils.java:408)

    at oracle.adfmf.common.util.McAppUtils.getApplicationXmlURL(McAppUtils.java:371)

    at oracle.adfmf.common.util.McAppUtils.getApplicationControllerProject(McAppUtils.java:1984)

    at oracle.adfmf.common.util.McAppUtils.getDefinedDataControls(McAppUtils.java:1854)

    at oracle.adfmf.amx.util.AMXUtils.registerDataControls(AMXUtils.java:609)

    at oracle.adfmf.amx.dt.editor.databinding.AMXXmlContextSetupHook.setup(AMXXmlContextSetupHook.java:69)

    at oracle.bali.xml.model.XmlContext.deliverSetupEventHelper(XmlContext.java:1391)

    at oracle.bali.xml.model.XmlContext.deliverSetupEventAtXmlContextCreation(XmlContext.java:1342)

    at oracle.bali.xml.gui.jdev.JDevXmlContext.deliverSetupEventAtXmlContextCreation(JDevXmlContext.java:834)

    at oracle.bali.xml.model.XmlContext._initializeModel(XmlContext.java:326)

    at oracle.bali.xml.model.XmlContext._setSourceModel(XmlContext.java:2328)

    at oracle.bali.xml.model.XmlContext.setModel(XmlContext.java:346)

    at oracle.bali.xml.addin.XMLSourceNode._createAndInitXmlContext(XMLSourceNode.java:1782)

    at oracle.bali.xml.addin.XMLSourceNode._getXmlContext(XMLSourceNode.java:1732)

    at oracle.bali.xml.addin.XMLSourceNode.getXmlContext(XMLSourceNode.java:192)

    at oracle.adfmf.common.util.McAppUtils.getXmlModelFromXmlSourceNode(McAppUtils.java:877)

    at oracle.adfmf.amx.dt.editor.PreviewEditor.resolveCellFormatHeight(PreviewEditor.java:790)

    at oracle.adfmf.amx.dt.editor.PreviewEditor.updateAMXToStage(PreviewEditor.java:509)

    at oracle.adfmf.amx.dt.editor.PreviewEditor.editorShown(PreviewEditor.java:280)

    at com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.riseEditorShown(SplitPane.java:1914)

    at com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.doLayoutBottomTabs(SplitPane.java:757)

    at com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.doLayout(SplitPane.java:615)

    at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.whenCurrentEditorChanges(NbEditorManager.java:1612)

    at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.whenCurrentEditorChanges(TabGroup.java:1026)

    at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.whenCurrentEditorChanges(TabGroup.java:1021)

    at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.whenCurrentEditorChanges(TabGroupState.java:811)

    at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.setCurrentSplitPanePos(TabGroupState.java:192)

    at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.activateEditor(TabGroupState.java:496)

    at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.activateEditor(TabGroup.java:464)

    at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.focusEditor(NbEditorManager.java:1476)

    at com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.whenEditorTabMousePressed(SplitPane.java:1523)

    at com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.mousePressed(SplitPane.java:1511)

    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)

    at java.awt.Component.processMouseEvent(Component.java:6502)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)

    at java.awt.Component.processEvent(Component.java:6270)

    at java.awt.Container.processEvent(Container.java:2229)

    at java.awt.Component.dispatchEventImpl(Component.java:4861)

    at java.awt.Container.dispatchEventImpl(Container.java:2287)

    at java.awt.Component.dispatchEvent(Component.java:4687)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)

    at java.awt.Container.dispatchEventImpl(Container.java:2273)

    at java.awt.Window.dispatchEventImpl(Window.java:2719)

    at java.awt.Component.dispatchEvent(Component.java:4687)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)

    at $200 (EventQueue.java:103) java.awt.EventQueue.access

    in java.awt.EventQueue$ 3.run(EventQueue.java:694)

    in java.awt.EventQueue$ 3.run(EventQueue.java:692)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.ProtectionDomain$ 1.doIntersectionPrivilege(ProtectionDomain.java:76)

    in java.security.ProtectionDomain$ 1.doIntersectionPrivilege(ProtectionDomain.java:87)

    in java.awt.EventQueue$ 4.run(EventQueue.java:708)

    in java.awt.EventQueue$ 4.run(EventQueue.java:706)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.ProtectionDomain$ 1.doIntersectionPrivilege(ProtectionDomain.java:76)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)

    at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)

    at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

    java.lang.NullPointerException

    o.j.model.ApplicationContent.getInstance(ApplicationContent.java:62)

    o.adfmf.common.util.McAppUtils.getApplicationAdfMetaInfUrl(McAppUtils.java:408)

    o.adfmf.common.util.McAppUtils.getApplicationXmlURL(McAppUtils.java:371)

    o.adfmf.common.util.McAppUtils.getApplicationControllerProject(McAppUtils.java:1984)

    o.adfmf.common.util.McAppUtils.getDefinedDataControls(McAppUtils.java:1854)

    o.adfmf.amx.util.AMXUtils.registerDataControls(AMXUtils.java:609)

    o.adfmf.amx.dt.editor.databinding.AMXXmlContextSetupHook.setup(AMXXmlContextSetupHook.java:69)

    o.bali.xml.model.XmlContext.deliverSetupEventHelper(XmlContext.java:1391)

    o.bali.xml.model.XmlContext.deliverSetupEventAtXmlContextCreation(XmlContext.java:1342)

    o.bali.xml.gui.jdev.JDevXmlContext.deliverSetupEventAtXmlContextCreation(JDevXmlContext.java:834)

    o.bali.xml.model.XmlContext._initializeModel(XmlContext.java:326)

    o.bali.xml.model.XmlContext._setSourceModel(XmlContext.java:2328)

    o.bali.xml.model.XmlContext.setModel(XmlContext.java:346)

    o.bali.xml.addin.XMLSourceNode._createAndInitXmlContext(XMLSourceNode.java:1782)

    o.bali.xml.addin.XMLSourceNode._getXmlContext(XMLSourceNode.java:1732)

    o.bali.xml.addin.XMLSourceNode.getXmlContext(XMLSourceNode.java:192)

    o.adfmf.common.util.McAppUtils.getXmlModelFromXmlSourceNode(McAppUtils.java:877)

    o.adfmf.amx.dt.editor.PreviewEditor.resolveCellFormatHeight(PreviewEditor.java:790)

    o.adfmf.amx.dt.editor.PreviewEditor.updateAMXToStage(PreviewEditor.java:509)

    o.adfmf.amx.dt.editor.PreviewEditor.editorShown(PreviewEditor.java:280)

    com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.riseEditorShown(SplitPane.java:1914)

    com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.doLayoutBottomTabs(SplitPane.java:757)

    com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.doLayout(SplitPane.java:615)

    com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.whenCurrentEditorChanges(NbEditorManager.java:1612)

    com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.whenCurrentEditorChanges(TabGroup.java:1026)

    com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.whenCurrentEditorChanges(TabGroup.java:1021)

    com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.whenCurrentEditorChanges(TabGroupState.java:811)

    com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.setCurrentSplitPanePos(TabGroupState.java:192)

    com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.activateEditor(TabGroupState.java:496)

    com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.activateEditor(TabGroup.java:464)

    com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.focusEditor(NbEditorManager.java:1476)

    com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.whenEditorTabMousePressed(SplitPane.java:1523)

    com.oracle.jdeveloper.nbwindowsystem.editor.SplitPane.mousePressed(SplitPane.java:1511)

    j.a.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)

    j.a.Component.processMouseEvent(Component.java:6502)

    jx.s.JComponent.processMouseEvent(JComponent.java:3320)

    j.a.Component.processEvent(Component.java:6270)

    j.a.Container.processEvent(Container.java:2229)

    j.a.Component.dispatchEventImpl(Component.java:4861)

    j.a.Container.dispatchEventImpl(Container.java:2287)

    j.a.Component.dispatchEvent(Component.java:4687)

    j.a.LightweightDispatcher.retargetMouseEvent(Container.java:4832)

    j.a.LightweightDispatcher.processMouseEvent(Container.java:4489)

    j.a.LightweightDispatcher.dispatchEvent(Container.java:4422)

    j.a.Container.dispatchEventImpl(Container.java:2273)

    j.a.Window.dispatchEventImpl(Window.java:2719)

    j.a.Component.dispatchEvent(Component.java:4687)

    j.a.EventQueue.dispatchEventImpl(EventQueue.java:735)

    j.a.EventQueue.access$ 200 (EventQueue.java:103)

    j.a.EventQueue$ 3.run(EventQueue.java:694)

    j.a.EventQueue$ 3.run(EventQueue.java:692)

    j.security.AccessController.doPrivileged (Native Method)

    j.security.ProtectionDomain$ 1.doIntersectionPrivilege(ProtectionDomain.java:76)

    j.security.ProtectionDomain$ 1.doIntersectionPrivilege(ProtectionDomain.java:87)

    j.a.EventQueue$ 4.run(EventQueue.java:708)

    j.a.EventQueue$ 4.run(EventQueue.java:706)

    j.security.AccessController.doPrivileged (Native Method)

    j.security.ProtectionDomain$ 1.doIntersectionPrivilege(ProtectionDomain.java:76)

    j.a.EventQueue.dispatchEvent(EventQueue.java:705)

    o.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)

    o.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)

    j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)

    j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)

    j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)

    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)

    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)

    j.a.EventDispatchThread.run(EventDispatchThread.java:91)

    Just a little update:

    I upgraded MAF 2.1.3 and now I do not get the exception more.

    Kind regards

    Ognjen

  • Assignment of roles to the user when creating the user

    Hi all

    I gave a roll deposited (< dsp:input bean = "ProfileFormHandler.value.roles.role" maxsize = "30" size = "30" type = "text" / > on the registration page.) After registration, each field in db except role (table dps_role).
    Pls let me know what I am doing wrong.

    Thank you

    You should not assign roles to the user as 'ProfileFormHandler.value.roles.role' of 's profile. You can link formhandler property to which you can pass the name or id of the role that you want to assign role assignment must always route through safety ATG API in order to properly update the mappings of Homeland Security. Because of these dependencies, you should not try the role of simply call profile.setPropertyValue ('roles',...) The code cannot fail this way, but if you assign the role in this way then it may not work as expected when checking for role based privileges. Here's one possible way to do it:

    1. in your file properties formhandler declare a dependency on the directory of the default user, which by default points to the profile database:

    userDirectory = / atg/userprofiling/ProfileUserDirectory

    So, in the form Manager, you declare corresponding setUserDirectory() and getUserDirectory().

    2 then in the formhandler, get the DirectoryPrincipal objects associated with the user profile and the role you want to assign and then assign the role to the user:

    import atg.userdirectory.UserDirectory;
    import atg.userdirectory.DirectoryPrincipal;
    import atg.userdirectory.User;
    import atg.userdirectory.Role;
    import atg.userdirectory.DirectoryModificationException;
    
    import java.util.Collection;
    import java.util.Iterator;
    
    ..
    ..
    
    private boolean assignRoleToUser(String roleName, String userId) {
    
      UserDirectory userDirectory = getUserDirectory();
      DirectoryPrincipal userPrincipal = userDirectory.findUserByPrimaryKey(userId);
      DirectoryPrincipal rolePrincipal = userDirectory.getRoleByPath(roleName);
    
      User user = (User)userPrincipal;
    
      Collection collection = userDirectory.getRoles();
    
      boolean status = false;
    
      Iterator iter = collection.iterator();
      while(iter.hasNext())
      {
        Object obj = iter.next();
        if(obj instanceof Role) {
          Role role = (Role)obj;
          if(roleName.equals( role.getName() ) && user!=null) {
            try {
              status = user.assignRole(role);    //will return true if the role was added otherwise false
            }
            catch (DirectoryModificationException e) {
           //handle exception
            }
            break;
          }
        }
      }
      return status;
    }
    

    In the code above 'roleName' parameter is the name of the role to be assigned to the profile with the id as "userId". If you want to do the role assignment when creating the user, then you can do the things above in postCreateUser() so that you can get the Principal associated with the profile. For more information about the interfaces and classes used here, you can refer to the documentation of the API of the ATG.

    http://docs.Oracle.com/CD/E26180_01/platform.94/APIDoc/ATG/userDirectory/package-summary.html

  • When I replaced a hard drive, I wanted the same drive letter, but he wants me to take another. How can I assign the drive letter, I replaced?

    When I replaced a hard drive, I wanted the same drive letter, but he wants me to take another. How can I assign the drive letter, that I replaced. The letter is now used by another device?

    Open disk management, find the drive using the drive letter you want to use, change the drive letter of this to 'Z', find the new drive, change the drive letter that you want, and then change the drive letter of the drive you have labeled it 'Z' to a drive letter of your taste.

    Jim

  • Exception thrown by SsoUtil: failure of the SSO admin service

    I'm diagnosing a problem in an improved environment related modes running 6.0 Update 1 (2 vCenters, same domain) where I'm getting the following exception when calling UserSessionService.getUserSession ():

    [ERROR] data-service-pool-2704 70000426 100010 200005 c.vmware.vsphere.client.usersession.impl.UserSessionServiceImpl there was a problem when retrieving the list of system fields com.vmware.vise.vim.security.sso.exception.SsoServiceException: failure of the SSO admin service

    at com.vmware.vise.vim.security.sso.SsoUtil.getAdminService(SsoUtil.java:256)

    at com.vmware.vsphere.client.usersession.impl.UserSessionServiceImpl.extractSystemDomains(UserSessionServiceImpl.java:179)

    at com.vmware.vsphere.client.usersession.impl.UserSessionServiceImpl.getUserSession(UserSessionServiceImpl.java:156)

    at sun.reflect.GeneratedMethodAccessor496.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)

    at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)

    at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

    to com.sun.proxy. $Proxy503.getUserSession (unknown Source)

    Someone at - it guidance on this diagnosis?  I couldn't find much information about this error in the SDK documentation.  Thank you

    -Mike

    Cool! Now what remains is to you or your client to file a SR. I already logged bugs for these fixes and bugs are scheduled for update 3, which will come in February 2017. If you want to speed up the fix and get a warm official patch, connect the SR.

    I enclose the latest patches:

    1. for version 6.0 Patch 2:

    UserSessionServiceImpl_class_60p02_build3271482.zip

    class_loading_patch_for_60p02_build3271482.zip

    2. for version 6.0 Update 2

    UserSessionServiceImpl_class_60u2_build3617395.zip

    class_loading_patch_for_60u2_build3617395.zip

  • Failure of advanced/shared navigation of the actions to run when assigned by leaving. Why?

    After numerous tests, it seems that the bottom line is as described in topic - too far go that responsive projects. The question is not present for the empty projects I can say. I am running 8.0.1.242 on Windows 8 Captivate.

    Maybe I can work around this problem by writing in a JS event listener, but I see no other way to have trigger actions conditional navigation to specific times instead of via the interaction of the user - that is a user clicks on one of the 2 icons on slide 1 to view more details, taking to the slide where this detail is covered , after which they returned to slide 1, UNLESS they saw all the slides in detail, in which case they are sent to the end/next section slide.

    Is this a known bug? Is it still a bug? You can reproduce it? See nature projects reactive with advanced navigation actions attributed to work out very well for you? Any information would be appreciated, I would go to the bottom of this. I'd be happy to post more details if this case works for you - it looks like a bug here if so I prefer not to bother in the first place.

    Thank you!

    Hi Lieve,

    Thank you for your response. I saw your article mention - you have an great Google visibility when it comes to Captivate. It's a shame that you are one of the only good resources that - and Rod of course (I know you're out there too). It seems rather odd to me that always Captivate gets out with out-of-the-box features that do not work, and support is pretty limited. I can usually find a way around them, but it always adds a lot of time to my projects of debugging to find that the problem is of Captivate and not mine... not ideal. Makes me wonder if Adobe requires releases annual no matter where is their Cp dev team.

    In this case, the same on the output function that failed in my responsive project worked when assigned in the same way in a project of standard and white - at least in this one case alone is not a general question "exit does not work as I want to." I'm not trying to run everything must happen ON the slide came out, I just need to run - at some point. I determined that all sorts of actions work in my project for leaving: I can increment variable, show and hide objects, etc., etc. - the only thing falling down (and it will fail 100% of the time for me in reactive projects) use navigation in the context of shared or advanced actions, if go to slide and other slides at base of navigation , or GotoFrameAndResume or another framework based "micronavigation" (thank you for giving me the initial end on this point, moreover - it has served me well).

    Unfortunately, I could not add the action for my enter on to the slide later, as in my case, I need to my function leaving kicker users back to the beginning or to the slide at the end of the project, so if to sign they would ever get see the content of the slide. I end up doing something similar: adding brief slides 'redirect' between my content slides, that have the same feature set to enter. Looks like a stupid work-around for me, but my JS solutions were not well behave and I got tired of debugging.

    If you want to, I would be grateful if you could check if it seems like a bug you as well and maybe even if it persists in Captivate 9 (I recall that have this you). I still get nagging that I'm something I just straight up found no clearing of doubts, although this one seems, as it has nothing to do with me. Thanks again.

  • I get the "invalid personalization information" error when I start my photoshop cs8. I can't find my disc of origin of re - install, but do not have the serial number. Can I download a trial version and then enter my serial number?

    I get the "invalid personalization information" error when I start my photoshop cs8. I can't find my disc of origin of re - install, but do not have the serial number. Can I download a trial version and then enter my serial number?

    If this is the first version of CS, then you will need to check the following.  In my view, that it applies to CS also even if it specifies CS2...

    Error: Unavailable activation server | CS2, Acrobat 7, hearing 3 - l http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm

  • Show the exception thrown from the business layer

    All,

    In my AMImpl class, I have the following code:
        public void checkPasswordByEname(String ename,String pwd_form){        
            Statement stmt=null;
            ResultSet rset=null;
            String pwd;
            try  {
               DBTransaction trans = getDBTransaction();
               stmt = trans.createStatement(1);
               rset = stmt.executeQuery("select pwd from employees where first_name = '" + ename + "'");
               if(rset.next()){
                   pwd = rset.getString(1);
                   if(!pwd_form.equals(pwd)){
                       System.out.println("password didnt match");
                       throw new JboException("Password didnt match");
                   }
               }else{
                   System.out.println("username doesn't exist");
                   throw new JboException("username doesn't exist");
               }                                       
            } catch (Exception ex)  {
                ex.printStackTrace();     
                throw new JboException(ex.getMessage());
            }finally{
                try  {
                    rset.close();
                    stmt.close();                
                } catch (Exception ex)  {
                    ex.printStackTrace();
                } finally  {
                }        
            }
                    
        }
    Call this method in my grain of support
        public String doLogin() {
            BindingContainer bindings = getBindings();
            
            OperationBinding operationBinding = bindings.getOperationBinding("checkPasswordByEname");
            Object result = operationBinding.execute();
             if (!operationBinding.getErrors().isEmpty()) {
               //show the exception thrown from the Business layer
                return "error";
            }
            return "success";
        }
    How can I display the exception thrown from the business layer?

    thnks
    11.1.1.5 JDev

    Hello

    Your support of bean, after the execution of the method of model try something like:

    if(!oper.getErrors().isEmpty()){
          FacesMessage msg =new FacesMessage(FacesMessage.SEVERITY_ERROR, oper.getErrors().get(0), "");
          FacesContext.getCurrentInstance().addMessage(null, msg);
    }
    

    Gabriel.

  • You can change the color of the lower bar to play on a slide when you assign the cpCmndShowPlaybar to 0

    You can change the color of the lower bar to play on a slide when you assign the cpCmndShowPlaybar to 0. When I assign the slide this action it shows a gray shape down to hide PlayBar controls, but I would make this white color to blend in with the white background on my Web page. How to change the color?

    It is not possible to change the color of the border by an (Advanced) action, sorry. If you don't mind, you can choose white color for the bottom border from the outset. When the play bar is visible, as it it stretched, it will cover the bottom edge.

    Lilybiri

  • Exception when accessing the content a sample page

    Hello

    Please help me in the deployment and access an application in WebLogic Server 10.3 (standalone).

    The steps I have taken in the deployment:

    An example of application Triniad, I had downloaded of the site Web of MyFaces Trinidad. for example: Blank.War

    Deployment of the file. War on WebLogic Server 10.3 via the WebLogic Server Console of Administration. But, when I am tring to access the page - http://140.84.129.205:7001/blank/faces/page1.jspx
    He started me special suite.

    I added the contents of the file file and web.xml Exception and Faces - config.xml as file... You can you please point out what I jumped. Thanks in advance.

    Error 500 - Internal server error

    java.lang.UnsupportedOperationException
    + javax.faces.context.ExternalContext.setRequest(ExternalContext.java:368) +.
    + org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._isSetRequestBugPresent(GlobalConfiguratorImpl.java:543) +.
    + org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(GlobalConfiguratorImpl.java:325) +.
    + org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$ CacheRenderKit. (FacesContextFactoryImpl.java:86) +.
    + org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64) +.
    + javax.faces.webapp.FacesServlet.service(FacesServlet.java:260) +.
    + weblogic.servlet.internal.StubSecurityHelper$ (StubSecurityHelper.java:227) ServletServiceAction.run +.
    + weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) +.
    + weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) +.
    + weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) +.
    + weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) +.
    + org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238) +.
    + org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195) +.
    + org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138) +.
    + org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) +.
    + weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) +.
    + weblogic.servlet.internal.WebAppServletContext$ (WebAppServletContext.java:3496) ServletInvocationAction.run +.
    + weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) +.
    + weblogic.security.service.SecurityManager.runAs (Unknown Source) +.
    + weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180) +.
    + weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086) +.
    + weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406) +.
    + weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) +.
    + weblogic.work.ExecuteThread.run(ExecuteThread.java:173) +.



    Content of the file faces - config.xml is:



    <? XML version = "1.0"? >
    <!--
    Licensed to the Apache Software Foundation (ASF), under a
    or several contributor license agreements. See the NOTICE
    distributed with this work for more information
    with regard to copyright. The ASF licenses this file
    you under the Apache License, Version 2.0 (the
    "License"); You may not use this file except in compliance
    with the license. You can get a copy of the license at

    www.Apache.org/licenses/license-2.0

    Unless required by law applicable or agreed to in writing,
    software distributed under the license is distributed on an
    "LIKE WHAT" BASIS, WITHOUT WARRANTY OR CONDITION OF ANY
    KIND, express or implied. See the license for the
    specific language governing permissions and limitations
    under the terms of the license.

    ->
    <! DOCTYPE PUBLIC faces-config
    "- //Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0 / / IN".
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd" >
    <>faces-config

    < application >
    <! - use the Trinity RenderKit -
    < default rendering-kit-id >
    org. Apache.MyFaces.Trinidad.Core
    < / default rendering-kit-id >
    < / application >

    <!-global preferences oppose that proxies to others->
    < managed-bean >
    helloWorldBacking < managed-bean-name > < / managed-bean-name >
    < managed-bean-class >
    org.apache.myfaces.trinidad.blank.HelloWorldBacking
    < / managed-bean-class >
    < managed-bean-scope >
    request
    < / managed-bean-scope >
    < / managed-bean >

    <! - rules of navigation for index.jspx - >
    < navigation-rule >
    Page1.jspx < of view - id > < /-view-id >
    <>navigation-case
    success of < from outcome > < / de-results >
    Page2.jspx < to view - id > < / to-view-id >
    < / navigation-case >
    < / navigation-rule >

    <! - rules of navigation for page2.jspx - >
    < navigation-rule >
    Page2.jspx < of view - id > < /-view-id >
    <>navigation-case
    < from outcome > back < / de-results >
    Page1.jspx < to view - id > < / to-view-id >
    < / navigation-case >
    < / navigation-rule >

    < / faces-config >


    Content of the Web.XML file is:*.


    <? XML version = "1.0" encoding = "ISO-8859-1'? >
    <!--
    Licensed to the Apache Software Foundation (ASF), under a
    or several contributor license agreements. See the NOTICE
    distributed with this work for more information
    with regard to copyright. The ASF licenses this file
    you under the Apache License, Version 2.0 (the
    "License"); You may not use this file except in compliance
    with the license. You can get a copy of the license at

    www.Apache.org/licenses/license-2.0

    Unless required by law applicable or agreed to in writing,
    software distributed under the license is distributed on an
    "LIKE WHAT" BASIS, WITHOUT WARRANTY OR CONDITION OF ANY
    KIND, express or implied. See the license for the
    specific language governing permissions and limitations
    under the terms of the license.

    ->
    < web - app xmlns = "http://java.sun.com/xml/ns/javaee."
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd".
    version "2.5" = >
    <!-use the State economy on the client side. In Trinidad, it's a
    optimized, mechanism based on chips which is almost always a
    better choice than the economy of State standard JSF server side. ->
    < context-param >
    javax.faces.STATE_SAVING_METHOD < param-name > < / param-name >
    customer of < param-value > < / param-value >
    <!-param-value > server < / param-value->
    < / context-param >

    <!-Trinidad by default uses an optimized economy State on the client side
    mechanism. To disable that, uncomment the following->
    <!-context-param >
    org.apache.myfaces.trinidad.CLIENT_STATE_METHOD < param-name > < / param-name >
    < param-value > all < / param-value >
    < / context-param->

    <!-Trinidad also supports a strategy optimized for caching of some
    View State to the application level, which improves
    scalability. However, it makes it more difficult to develop (updates to)
    pages will not be noticed until the server restarts) and in
    a few rare cases, cannot be used for certain pages (see Trinidad
    documentation for more information) - >
    < context-param >
    org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE < param-name > < / param-name >
    < param-value > false < / param-value >
    < / context-param >

    <!-if this setting is enabled, Trinidad will be automatically
    check the date of the change of your JSP pages and throw saved
    State when they change. This makes development easier,
    but fresh General adds that should be avoided when your application
    is deployed->
    < context-param >
    org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION < param-name > < / param-name >
    < param-value > true < / param-value >
    < / context-param >

    <!-persistence of change allows a session scope. By default,.
    Persistence of change is cleared completely. The ChangeManager is
    an API that can persist changes to component (like,
    is a showDetail or tree expanded or collapsed). For the provision
    a custom persistence of change implementation inherit from the
    The API of Trinidad ChangeManager class. As the value you
    to use the fullqualified class name. ->
    < context-param >
    org.apache.myfaces.trinidad.CHANGE_PERSISTENCE < param-name > < / param-name >
    session of < param-value > < / param-value >
    < / context-param >

    < filter >
    < name of filter > Trinidad < / filter-name >
    > class filter < org.apache.myfaces.trinidad.webapp.TrinidadFilter < / class filter >
    < / filter >

    < filter mapping >
    < name of filter > Trinidad < / filter-name >
    faces of < servlet name > - < / servlet-name >
    < / filter-mapping >

    <! - faces Servlet - >
    < servlet >
    faces of < servlet name > - < / servlet-name >
    > the servlet class < javax.faces.webapp.FacesServlet < / servlet-class >
    < / servlet >

    <! - resource loader servlet - >
    < servlet >
    resources < name of the servlet > - < / servlet-name >
    > the servlet class < org.apache.myfaces.trinidad.webapp.ResourceServlet < / servlet-class >
    < / servlet >

    <! - faces Servlet mappings - >
    < servlet-mapping >
    faces of < servlet name > - < / servlet-name >
    < url-pattern > /visages / * < / url-pattern >
    < / servlet-mapping >

    < servlet-mapping >
    resources < name of the servlet > - < / servlet-name >
    < url-pattern > /adf / * < / url-pattern >
    < / servlet-mapping >


    <! - welcome files - >
    < Welcome-file-list >
    Welcome < file > index.html < / welcome-file >
    < / Welcome-file-list >

    < / web - app >



    Thank you
    -Afif

    What version of Trinidad you trying to use? It is possible that requires a newer version of JEE is provided by WebLogic 10.3.

  • Error: LifeCam.exe - the exception unknown software exception (0xe0434f4d) occurred in the application at location 0x7c812afb when trying to install Microsoft Lifecam HD-5000

    Original title: application with microsoft lifecam hd-5000 error.  My operating system is XP Sp3.

    I tried to download it from the microsoft site and I have the same problem.  After installation, I click on the lifecam 5000 and I get the following message:

    "LifeCam.exe - the exception unknown software exception (0xe0434f4d) occurred in the application at location 0x7c812afb.

    If I anwser or not it then closes.  How can I fix this problem?

    Hi ChristopherBell,

    I recommend contacting Microsoft Hardware support for assistance.


    Reference:
    Troubleshooting

    Hope the helps of information.

Maybe you are looking for