New user to Caciocacallo

Nathan Anderson nanderson at sum-ware.com
Tue May 8 15:31:05 PDT 2012


Greetings all, 


I'm new to Cacio and didn't have much success in my first attempt at getting my FEST project to run under Cacio-TTA. I suspect my setup is unusual so let me start with explaining what I am trying to do so someone can tell me if it should even work in theory ;) 


My project uses FEST to script the interaction with a Java Applet. The applet is developed by another company and is the only interface we have to interact with a remote system. Because I'm scripting the interaction with the applet rather than testing an UI I have built a stand alone application that doesn't use any test framework, but instead I just create my own AppletViewer, FrameFixture and Robot and manipulate them as needed. 


For a while I was able to develop in Eclipse (Helios) on my Windows 7 64-bit workstation, and deploy to Ubuntu 10.04 Gnome. However the most recent version of the applet no longer renders correctly in Ubuntu (certain critical AWT elements are not visible when they should be). 


What I have tried to do with Cacio so far is to use it on my Windows environment: 
Downloaded Oracle JDK7 
Configured Eclipse to be aware of Oracle JDK7 
Configured the project to use Oracle JDK7 
Downloaded cacio-shared-1.1.jar and cacio-tta-1.1.jar from the maven central repository 
Added the .jars to my project 
Added the JVM arguments: 

-Dawt.toolkit=net.java.openjdk.cacio.ctc.CTCToolkit 
-Djava.awt.graphicsenv=net.java.openjdk.cacio.ctc.CTCGraphicsEnvironment 
-Djava.awt.headless=false 


I'm getting a few errors: 


1) 
CacioComponentPeer::setZOrder: NOT YET IMPLEMENTED 


2) 

java.lang.ClassCastException: my.package.Applet cannot be cast to java.awt.Window 
at sun.awt.peer.cacio.CacioWindowPeer.handlePeerEvent(CacioWindowPeer.java:229) 
at sun.awt.peer.cacio.managed.FocusManager.focusGained(FocusManager.java:159) 
at sun.awt.peer.cacio.managed.FocusManager.setFocusedWindow(FocusManager.java:131) 
at sun.awt.peer.cacio.managed.FocusManager.setVisible(FocusManager.java:103) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:352) 
at sun.awt.peer.cacio.CacioComponentPeer.setVisible(CacioComponentPeer.java:660) 
at java.awt.Component.show(Component.java:1618) 
at java.awt.Window.show(Window.java:1042) 


3) 


Exception in thread "main" java.lang.ClassCastException: java.awt.Panel cannot be cast to java.awt.Window 
at sun.awt.peer.cacio.CacioWindowPeer.handlePeerEvent(CacioWindowPeer.java:229) 
at sun.awt.peer.cacio.managed.FocusManager.focusGained(FocusManager.java:159) 
at sun.awt.peer.cacio.managed.FocusManager.setFocusedWindow(FocusManager.java:131) 
at sun.awt.peer.cacio.managed.FocusManager.hideWindow(FocusManager.java:113) 
at sun.awt.peer.cacio.managed.FocusManager.setVisible(FocusManager.java:105) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:352) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:349) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:349) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:349) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:349) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:349) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:349) 
at sun.awt.peer.cacio.managed.ManagedWindow.setVisible(ManagedWindow.java:349) 
at sun.awt.peer.cacio.CacioComponentPeer.setVisible(CacioComponentPeer.java:660) 
at java.awt.Component.hide(Component.java:1688) 
at java.awt.Window.hide(Window.java:1116) 
at java.awt.Window$1DisposeAction.run(Window.java:1188) 
at java.awt.Window.doDispose(Window.java:1205) 
at java.awt.Window.dispose(Window.java:1147) 
at org.fest.swing.hierarchy.ExistingHierarchy.dispose(ExistingHierarchy.java:108) 
at org.fest.swing.hierarchy.NewHierarchy.dispose(NewHierarchy.java:156) 
at org.fest.swing.core.BasicRobot.dispose(BasicRobot.java:352) 


4) 

org.fest.swing.exception.EdtViolationException: EDT violation detected 
at java.lang.Thread.getStackTrace(Thread.java:1567) 
at org.fest.util.StackTraces.stackTraceInCurrentThread(StackTraces.java:47) 
at org.fest.swing.edt.CheckThreadViolationRepaintManager.checkThreadViolations(CheckThreadViolationRepaintManager.java:78) 
at org.fest.swing.edt.CheckThreadViolationRepaintManager.addDirtyRegion(CheckThreadViolationRepaintManager.java:69) 
at org.fest.swing.edt.FailOnThreadViolationRepaintManager.addDirtyRegion(FailOnThreadViolationRepaintManager.java:31) 
at javax.swing.JComponent.repaint(JComponent.java:4795) 
at java.awt.Component.repaint(Component.java:3286) 
at javax.swing.plaf.basic.BasicComboBoxUI$Handler.contentsChanged(BasicComboBoxUI.java:1841) 
at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:118) 
at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:94) 
at javax.swing.DefaultComboBoxModel.removeElementAt(DefaultComboBoxModel.java:146) 
at sun.awt.peer.cacio.CacioChoicePeer.removeAll(CacioChoicePeer.java:105) 
at java.awt.Choice.removeAll(Choice.java:355) 


I can try this on Ubuntu, but I wanted to get an idea if I should even try. 


Thanks, 
Nathan 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/caciocavallo-dev/attachments/20120508/217c1da1/attachment.html 


More information about the caciocavallo-dev mailing list