Eclipse 中未处理的循环异常
我在 Eclipse 中遇到异常。
我正在尝试使用 GWT 插件创建 Web 应用程序项目。我创建了一个组合(名称:浏览器)。之后,我尝试使用 Choose Component
选项在类(名称:Home_Page)中添加浏览器组合。
当我添加它时,设计视图上会出现错误:
创建浏览器时出现异常。有关详细信息,请参阅错误日志。
请帮助我纠正这个问题。
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 at 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.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) 在 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) 在 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(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) 在 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) 在 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(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)
I'm getting an exception in Eclipse.
I am trying to create web application project using the GWT plugin. I have created a composite (name: Browser). After that I am trying to add browser composite in class (name: Home_Page) using Choose Component
option.
When I add it give me error on design view:
Exception during creation of browser. See error log for detail.
Please help me to rectify this problem.
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");
}
}
in error log its says:
unhandled loop exception "java.lang.StackOverflowError at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at
org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2610) at
org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4669) at
org.eclipse.swt.widgets.Control.windowProc(Control.java:4531) at
org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at
org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at
org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2425) at
org.eclipse.swt.widgets.Text.callWindowProc(Text.java:255) at
org.eclipse.swt.widgets.Control.windowProc(Control.java:4623) at
org.eclipse.swt.widgets.Text.windowProc(Text.java:2254) at
org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at
org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method) at
org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:3446) at
org.eclipse.swt.widgets.Text.setText(Text.java:1977) at
org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor.updateControlsFromValue(AbstractTextButtonValueEditor.java:96)
at
org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor.access$1(AbstractTextButtonValueEditor.java:89)
at
org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor$3.changed(AbstractTextButtonValueEditor.java:82)
at
org.eclipse.wb.internal.css.semantics.AbstractValue.notifyListeners(AbstractValue.java:52)
at
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)
at
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) at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at
org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2610) at
org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4669) at
org.eclipse.swt.widgets.Control.windowProc(Control.java:4531) at
org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at
org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at
org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2425) at
org.eclipse.swt.widgets.Text.callWindowProc(Text.java:255) at
org.eclipse.swt.widgets.Control.windowProc(Control.java:4623) at
org.eclipse.swt.widgets.Text.windowProc(Text.java:2254) at
org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at
org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method) at
org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:3446) at
org.eclipse.swt.widgets.Text.setText(Text.java:1977) at
org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor.updateControlsFromValue(AbstractTextButtonValueEditor.java:96)
at
org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor.access$1(AbstractTextButtonValueEditor.java:89)
at
org.eclipse.wb.internal.css.dialogs.style.AbstractTextButtonValueEditor$3.changed(AbstractTextButtonValueEditor.java:82)
at
org.eclipse.wb.internal.css.semantics.AbstractValue.notifyListeners(AbstractValue.java:52)
at
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)
at
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) at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at
org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2610) at
org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4669) at
org.eclipse.swt.widgets.Control.windowProc(Control.java:4531) at
org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at
org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at
org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2425) at
org.eclipse.swt.widgets.Text.callWindowProc(Text.java:255) at
org.eclipse.swt.widgets.Control.windowProc(Control.java:4623) at
org.eclipse.swt.widgets.Text.windowProc(Text.java:2254) at
org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at
org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method) at
org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:3446)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
堆栈溢出错误(堆栈跟踪中的第一行)没有太多原因。最可能的情况是,当您添加复合时,您会以某种方式进行无限递归(即,一个方法调用自身,该方法调用自身,该方法调用自身,该方法调用自身......)。
查看您所使用的任何产品的规格,并确保正确添加复合材料。这可能只是某个地方的拼写错误,但听起来问题似乎出在插入点附近。
Stack overflow errors (the first line in your stack trace) don't have very many causes. The most likely scenario is that when you're adding the composite that you're somehow doing infinite recursion (that is, a method calling itself, which calls itself, which calls itself, which calls itself...).
Look at the specs for whatever you're using and make sure you're adding the composite correctly. It could just be a typo somewhere, but it sounds like the issue is going to be near the insertion point.