Boa tarde, estou com o seguinte problema e gostaria de uma ajuda
tenho um servidor que tem uma coleçao de aplicações e estou tentando listar essa coleçao deaplicaçoes de acordo com o servidor, porem nao estou conseguindo se alguem puder me ajudar estou tentando preencher assim, quando dou um clique na tabela servidor a tabela aplicaçao é preenchida
private void fillTableApp() {
tableApp.removeAll();
String serverName = tableServer.getItem(tableServer.getSelectionIndex()).getText(0);
Server s = serverDao.getServer(Integer.parseInt(tableServer.getItem(tableServer.getSelectionIndex()).getData(serverName).toString()));
//Aqui da o erro
Collection<Application> itemsApplication = s.getApplications();
for (Application a : itemsApplication) {
itemApp = new TableItem(tableApp, SWT.NONE);
itemApp.setText(new String[] { a.getName(),a.getDescription()});
itemApp.setData(a.getName(), a.getCode());
}
}
java.lang.ClassCastException: br.com.gi.pojo.Server cannot be cast to br.com.gi.pojo.Application
at br.com.gi.dialogs.SystemApplicationDialog.fillTableApp(SystemApplicationDialog.java:140)
at br.com.gi.dialogs.SystemApplicationDialog.access$4(SystemApplicationDialog.java:131)
at br.com.gi.dialogs.SystemApplicationDialog$3.widgetSelected(SystemApplicationDialog.java:96)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at br.com.gi.dialogs.SystemApplicationDialog.main(SystemApplicationDialog.java:186)