Forum Discussion

startapprentice's avatar
New Contributor
7 years ago

java.lang.reflect.InvocationTargetException TestComplete 12.41



I am trying to automate a Java Web Start Application (jnlp) and struggling to even login using TestComplete 12.41. 

I am get the following error message when TestComplete tries to login using either script or via Keyword Tests. 


Stack Trace:
java.awt.EventQueue.invokeAndWait(Unknown Source)
java.awt.EventQueue.invokeAndWait(Unknown Source)
javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.sun.javaws.Launcher.executeApplication(Unknown Source)
com.sun.javaws.Launcher.executeMainClass(Unknown Source)
com.sun.javaws.Launcher.doLaunchApp(Unknown Source) Source) Source)
null Source) Source)
java.awt.Component.setVisible(Unknown Source)
java.awt.Window.setVisible(Unknown Source)
java.awt.Dialog.setVisible(Unknown Source)
java.awt.event.InvocationEvent.dispatch(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$500(Unknown Source)
java.awt.EventQueue$ Source)
java.awt.EventQueue$ Source) Method)$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source) Source)




I can login to the application manually, but not via Testcomplete. 


Does anyone have any ideas or insight into how to I can resolve this. 


Any any help would be highly appreciated. 



5 Replies

  • cunderw's avatar
    Community Hero

    Without seeing your script or keyword tests and how you're running the application it will be very hard to determine the problem, can you provide screenshots of these?


    Do any actions work on the application? 

    • startapprentice's avatar
      New Contributor


      As requested this is the script which I have written


      function launnchApp() {
      var app = TestedApps.Application.Run();


      function login() {

      • cunderw's avatar
        Community Hero

        So I've seen issues before with custom java classes for text fields where SetText causes issues. Can you try using keys there instead?


        Unrelated, but I would definitely take a closer look at name mapping and aliases. As it looks now it appears you have gone with keeping the default auto namemapping. This is great for exploring / seeing your object hierarchy, but will not be reliable if changes are made to your application. You aliases should also be more human friendly. RootPane.null_layeredPane.Panel.CurvesPanel.Panel is unneeded for your aliases as you will never by interacting directly with these objects.