PDA

View Full Version : Cannot add Gxt form



Amith
29 Sep 2011, 9:33 PM
Dear friends i cannot add a gxt form while doing so it cause shell failed in dostartupServer method day before yesterday it works well.......but then i downloaded apache maven will it cause any problem. am working with eclipse ide. helios-3.6 can anybody help me plzzzzzzzzzzz ........ i cannot implement any of gxt forms from pallete
plz help me...........


FormPanel frmpnlNewFormpanel = new FormPanel(); this line cause errorrrr


thanks for your valuable replies........................

catalin.ciobanu
29 Sep 2011, 11:08 PM
post your code ... post the exact message of error

Amith
29 Sep 2011, 11:39 PM
Thanks for your reply my friend..............
onModuleLoad() threw an exception
Exception while loading module com.mycompany.project.client.Viewer. See Development Mode for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.VerifyError: (class: com/extjs/gxt/ui/client/widget/Container, method: adjustIndex signature: (Lcom/extjs/gxt/ui/client/widget/Component;I)I) Illegal constant pool index
at com.mycompany.project.client.Viewer.onModuleLoad(Viewer.java:25)
... 9 more








ononModuleLoad() threw an exception

Exception while loading module com.mycompany.project.client.Viewer. See Development Mode for details.
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Unknown Source)Caused by: java.lang.VerifyError: (class: com/extjs/gxt/ui/client/widget/Container, method: adjustIndex signature: (Lcom/extjs/gxt/ui/client/widget/Component;I)I) Illegal constant pool index at com.mycompany.project.client.Viewer.onModuleLoad(Viewer.java:25) ... 9 more




ModuleLoad() threw an exception
Exception while loading module com.mycompany.project.client.Viewer. See Development Mode for details.
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Unknown Source)Caused by: java.lang.VerifyError: (class: com/extjs/gxt/ui/client/widget/Container, method: adjustIndex signature: (Lcom/extjs/gxt/ui/client/widget/Component;I)I) Illegal constant pool index at com.mycompany.project.client.Viewer.onModuleLoad(Viewer.java:25) ... 9 more

catalin.ciobanu
29 Sep 2011, 11:43 PM
you didn't get all of my message.
please post your code too .. and try to use [ code ] your code here [ /code ] TAGS

Amith
29 Sep 2011, 11:58 PM
This is ma code.............................

package com.mycompany.project.client;


import com.google.gwt.core.client.EntryPoint;


/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class ImageViewer implements EntryPoint {
private Button clickMeButton;
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();


clickMeButton = new Button();
rootPanel.add(clickMeButton);
clickMeButton.setText("Click me!");

FormPanel frmpnlNewFormpanel = new FormPanel();
frmpnlNewFormpanel.setHeading("New FormPanel");
frmpnlNewFormpanel.setCollapsible(true);
rootPanel.add(frmpnlNewFormpanel);
rootPanel.setWidgetPosition(frmpnlNewFormpanel, 81, 90);
frmpnlNewFormpanel.setSize("300px", "200px");
clickMeButton.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
Window.alert("Hello, GWT World!");
}
});
}
}
..............................................................

My Exception in crome....................


onModuleLoad() threw an exception
Exception while loading module com.mycompany.project.client.ImageViewer. See Development Mode for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.VerifyError: (class: com/extjs/gxt/ui/client/widget/Container, method: adjustIndex signature: (Lcom/extjs/gxt/ui/client/widget/Component;I)I) Illegal constant pool index
at com.mycompany.project.client.ImageViewer.onModuleLoad(ImageViewer.java:23)
... 9 more


Exception in development console............................


[ERROR] [com.mycompany.project.ImageViewer] - Unable to load module entry point class com.mycompany.project.client.ImageViewer (see associated exception for details)


[ERROR] [com.mycompany.project.ImageViewer] - Failed to load module 'com.mycompany.project.ImageViewer' from user agent 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1' at localhost:1220




[ERROR] [com.mycompany.project.ImageViewer] - Unable to load module entry point class com.mycompany.project.client.ImageViewer (see associated exception for details)
[ERROR] [com.mycompany.project.ImageViewer] - Failed to load module

'com.mycompany.project.ImageViewer' from user agent 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1' at localhost:1220


Thank you ............................

catalin.ciobanu
30 Sep 2011, 12:14 AM
Try this

import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;

public class ImageViewer implements EntryPoint {

private Button clickMeButton;

public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();

clickMeButton = new Button();
rootPanel.add(clickMeButton);
clickMeButton.setText("Click me!");

FormPanel frmpnlNewFormpanel = new FormPanel();
frmpnlNewFormpanel.setHeading("New FormPanel");
frmpnlNewFormpanel.setCollapsible(true);
rootPanel.add(frmpnlNewFormpanel);
rootPanel.setWidgetPosition(frmpnlNewFormpanel, 81, 90);
frmpnlNewFormpanel.setSize("300px", "200px");
clickMeButton
.addSelectionListener(new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
Window.alert("Hello world!");

}
});
}
}

With the gxt Button you have to use SelectionListner .. not clicklistner, you also need to import all resources you use :)

Amith
30 Sep 2011, 12:21 AM
Thanks yaarrrrrrrrr....................
thank you for spending your valuable time.......... thank a lot