2011-12-14 2 views
0

Я получаю исключение в Eclipse.
Я пытаюсь создать проект веб-приложений с помощью плагина GWT. Я создал составной (имя: браузер). После этого я пытаюсь добавить композицию браузера в классе (имя: Home_Page) с помощью опции Choose Component.Исключение незавершенного цикла в Eclipse

Когда я добавляю его дать мне ошибку на взгляде конструкции:

Исключение при создании браузера. Подробнее см. Журнал ошибок.

Пожалуйста, помогите мне исправить эту проблему.

public class Browse extends Composite { 
    static HorizontalSplitPanel RepositoryDisplayPanel = new HorizontalSplitPanel(); 

public Browse() { 
    //RootPanel rootPanel = RootPanel.get(); 
      RepositoryDisplayPanel.setSplitPosition("200px"); 
      //rootPanel.add(RepositoryDisplayPanel); 
      RepositoryDisplayPanel.setSize("762", "450"); 
      getObjectStoreTree(); 
      getObjectStoreCellTable(); 

} 
public void getObjectStoreTree() { 
    Tree repositories =new Tree(); 

    String repo[]={"ecm","ctmos","fhko","zert"}; 
    for(int i=0;i<4;i++){ 

     TreeItem reposiItem = new TreeItem(); 
     reposiItem.setText(repo[i]); 
     reposiItem.setStyleName("cmis-TreeItem-objectstore"); 
     repositories.addItem(reposiItem); 


    } 
    RepositoryDisplayPanel.add(repositories); 

} 
public void getObjectStoreCellTable(){ 

    final CellTable<ContentofObjectStore> table = new CellTable<ContentofObjectStore>(); 
    table.setPageSize(3); 

    // Create name Coloumn 
    TextColumn<ContentofObjectStore> versionColumn = new TextColumn<ContentofObjectStore>() { 
      @Override 
      public String getValue(ContentofObjectStore object) { 
      return object.version; 
      } 
     }; 


    TextColumn<ContentofObjectStore> nameColumn = new TextColumn<ContentofObjectStore>() { 
      @Override 
      public String getValue(ContentofObjectStore object) { 
      return object.name; 
      } 
     }; 


    TextColumn<ContentofObjectStore> sizeColumn = new TextColumn<ContentofObjectStore>() { 
      @Override 
      public String getValue(ContentofObjectStore object) { 
       return object.size; 
      } 
     }; 

    TextColumn<ContentofObjectStore> modified_byColumn = new TextColumn<ContentofObjectStore>() { 
      @Override 
      public String getValue(ContentofObjectStore object) { 
       return object.modified_by; 
      } 
     }; 


     DateCell dateCell = new DateCell(); 
     Column<ContentofObjectStore, Date> dateColumn = new Column<ContentofObjectStore,Date>(dateCell){ 
      @Override 
      public Date getValue(ContentofObjectStore object){ 
       return object.modified_on; 
      } 

     }; 


    TextColumn<ContentofObjectStore> major_versionColumn = new TextColumn<ContentofObjectStore>() { 
      @Override 
      public String getValue(ContentofObjectStore object) { 
       return object.major_version; 
      } 
     }; 
     // Add the columns. 
     table.addColumn(nameColumn, "Name"); 
     table.addColumn(versionColumn, "Version"); 
     table.addColumn(sizeColumn, "Size"); 
     table.addColumn(modified_byColumn, "Modified By"); 
     table.addColumn(dateColumn,"Modified On"); 
     table.addColumn(sizeColumn, "Major Version"); 

     RepositoryDisplayPanel.add(table); 
     table.setHeight("188px"); 

} 

}

в журнале ошибках ИТС говорит:

исключения необработанной петли «java.lang.StackOverflowError на org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java : 84) в org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1053) в org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1077) в org.eclipse.swt .widgets.Widget.sendEvent (Widget.java:1058) в org.eclipse.swt.widgets.Text.wmCommandChild (Text.java:2610) в org.eclipse.swt.widgets.Control.WM_COMMAND (Control.java:4669) в org.eclipse.swt.widgets.Control .windowProc (Control.java:4531) в org.eclipse.swt.widgets.Display.windowProc (Display.java:4972) в org.eclipse.swt.internal.win32.OS.CallWindowProcW (собственный метод) в org.eclipse.swt.internal.win32.OS.CallWindowProc (OS.java:2425) в org.eclipse.swt.widgets.Text.callWindowProc (Text.java:255) в org.eclipse.swt.widgets. Control.windowProc (Control.java:4623) в org.eclipse.swt.widgets.Text.windowProc (Text.java:2254) в org.eclipse.swt.widgets.Display.windowProc (Display.java:4972) по адресу org.eclipse.swt.i nternal.win32.OS.SetWindowTextW (собственный метод) в org.eclipse.swt.internal.win32.OS.SetWindowText (OS.java:3446) в org.eclipse.swt.widgets.Text.setText (Text.java : 1977) в org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor.updateControlsFromValue (AbstractTextButtonValueEditor.java:96) в org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor.access $ 1 (AbstractTextButtonValueEditor.java:89) в org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor $ 3.changed (AbstractTextButtonValueEditor.java:82) на org.eclipse.wb.internal.css.semantics. AbstractValue.notifyListeners (AbstractValue.java:52) по адресу org.eclipse.wb.internal.css.semantics.SimpleValue.setValue (SimpleValue.java:75) at org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor $ 1.modifyText (AbstractTextButtonValueEditor.java:64) на org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:179) в org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java:84) в org.eclipse.swt. widgets.Widget.sendEvent (Widget.java:1053) в org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1077) в org.eclipse.swt.widgets.Widget.sendEvent (Widget.java: 1058) в org.eclipse.swt.widgets.Text.wmCommandChild (текст.java: 2610) в org.eclipse.swt.widgets.Control.WM_COMMAND (Control.java:4669) в org.eclipse.swt.widgets.Control.windowProc (Control.java:4531) в org.eclipse. swt.widgets.Display.windowProc (Display.java:4972) в org.eclipse.swt.internal.win32.OS.CallWindowProcW (собственный метод) в org.eclipse.swt.internal.win32.OS.CallWindowProc (ОС .java: 2425) на org.eclipse.swt.widgets.Text.callWindowProc (Text.java:255) на org.eclipse.swt.widgets.Control.windowProc (Control.java:4623) на org.eclipse .swt.widgets.Text.windowProc (Text.java:2254) в org.eclipse.swt.widgets.Display.windowProc (Display.java:4972) в org.eclipse.swt.internal.win32.OS.SetWindowTextW (Родной метод) по адресу org.eclipse.swt.internal.win32.OS.SetWindowText (OS.java:3446) на org.eclipse.swt.widgets.Text.setText (Text.java:1977) на org.eclipse.wb.internal .css.dialogs.style.AbstractTextButtonValueEditor.updateControlsFromValue (AbstractTextButtonValueEditor.java:96) на org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor.access $ 1 (AbstractTextButtonValueEditor.java:89) на орг. eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor $ 3.changed (AbstractTextButtonValueEditor.java:82) на org.eclipse.wb.internal.css.semantics.AbstractValue.notifyListeners (AbstractValue.java:52) в org.eclipse.wb.internal.css.semantics.SimpleValue.setValu е (SimpleValue.java:75) в org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor $ 1.modifyText (AbstractTextButtonValueEditor.java:64) в org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:179) at org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1053) в org .eclipse.swt.widgets.Widget.sendEvent (Widget.java:1077) в org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1058) в org.eclipse.swt.widgets.Text.wmCommandChild (Text.java:2610) в org.eclipse.swt.widgets.Control.WM_COMMAND (Control.java:4669) по адресу org.eclipse.swt.widgets.Control .windowProc (Control.java:4531) в org.eclipse.swt.widgets.Display.windowProc (Display.java:4972) в org.eclipse.swt.internal.win32.OS.CallWindowProcW (собственный метод) в org.eclipse.swt.internal.win32.OS.CallWindowProc (OS.java:2425) в org.eclipse.swt.widgets.Text.callWindowProc (Text.java:255) в org.eclipse.swt.widgets. Control.windowProc (Control.java:4623) в org.eclipse.swt.widgets.Text.windowProc (Text.java:2254) в org.eclipse.swt.widgets.Display.windowProc (Display.java:4972) на org.eclipse.swt.internal.win32.OS.SetWindowTextW (нативный метод) при org.eclipse.swt.internal.win32.OS.SetWindowText (OS.java:3446)

+0

было бы неплохо увидеть ваш код тоже ... потому что смотреть только в стеке, чтобы сказать, в чем проблема ... –

+0

привет, я поставил код.Плз проверить и помочь мне. – NewCodeLearner

ответ

1

Stack overflow errors (первая строка в вашей трассе стека) не имеет очень много причин. Наиболее вероятный сценарий заключается в том, что когда вы добавляете композит, который вы каким-то образом выполняете бесконечную рекурсию (то есть метод, вызывающий себя, который вызывает себя, который вызывает себя, который вызывает себя ...).

Посмотрите на спецификации для того, что вы используете, и убедитесь, что вы правильно добавляете композит. Это может быть просто опечатка где-то, но похоже, что проблема будет близка к точке ввода.

Смежные вопросы