Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8639171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:56:04+00:00 2026-06-12T10:56:04+00:00

I have built my first GWT app. giving no compilation errors neither run-time errors.

  • 0

I have built my first GWT app. giving no compilation errors neither run-time errors. However, when the application is loaded into the browser (using Interner Explorer) and I enter username and password field to validate the user, it throws exceptions. Using GWT-RPC method, entire code and interfaces are provided.
I’m using HSQL for database connection(back end).

——————CODE (CLIENT)

package com.vin.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;

public class HelloWorld implements EntryPoint{
    private UserServiceAsync UserService = (UserServiceAsync) GWT.create(UserService.class);
    public void onModuleLoad() {
        Button click=new Button("Click Here");
        Label name=new Label("Enter Name");
        Label passwrd=new Label("Enter Password");
        final TextBox t_name=new TextBox();
        final PasswordTextBox t_passwrd=new PasswordTextBox();
        click.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent ev) {
            String temp_user=t_name.getText();
            String temp_pass=t_passwrd.getText();
                 UserService.loginuser(temp_user, temp_pass, new AsyncCallback<String>() {
                     public void onFailure(Throwable caught) {
                             Window.alert("Please enter valid details");
                      }
                     public void onSuccess(String result) {
                         Window.alert("Welcome");
//                         Window.open("http://127.0.0.1:8888/ExWid.html?gwt.codesvr=127.0.0.1:9997", "Dem", null);
                     }
                 });
            }
        });
        RootPanel.get().add(name);
        RootPanel.get().add(t_name);
        RootPanel.get().add(passwrd);
        RootPanel.get().add(t_passwrd);
        RootPanel.get().add(click);
}
}

—————————–CLIENT INTERFACE (1)

package com.vin.client;

import com.google.gwt.user.client.rpc.RemoteService;

public interface UserService extends RemoteService {
    public String loginuser(String username, String password);
}

—————————-CLIENT ASYNC INTERFACE

package com.vin.client;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface UserServiceAsync {
    public void loginuser(String username, String password, AsyncCallback<String> callback);
}

————————–IMPLEMENTATION OF CLIENT USERSERVICE (SERVER)…DATABASE CONNECTION

package com.vin.server;

import java.sql.DriverManager;
import java.sql.ResultSet;
import com.google.gwt.dev.generator.ast.Statement;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.vin.client.UserService;

public class UserServiceImpl extends RemoteServiceServlet implements UserService{
    private static final long serialVersionUID = 1L;

    public String loginuser(String username,String password) {
        try {
            java.sql.Connection con = null;
            Class.forName("org.hsqldb.jdbcDriver");
            con = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/", "SA", "");
            Statement st=(Statement) con.createStatement();
            ResultSet rs=((java.sql.Statement) st).executeQuery("select username,password from lgfrm");
            String user=rs.getString(1);
            String pass=rs.getString(2);
            if(username.equals(user) && password.equals(pass)) {
                Window.alert("success");
            }
        }
    catch (Exception ae) {}
        return "success";
    }
}

——————THE EXCEPTION LIST WHILE I’M TRYING TO VALIDATE A USER

15:22:54.583 [ERROR] [helloworld] Uncaught exception escaped
com.google.gwt.event.shared.UmbrellaException: One or more exceptions
caught, see full set in UmbrellaException#getCauses
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116)
at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351)

And many more like these.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:56:06+00:00Added an answer on June 12, 2026 at 10:56 am

    com.google.gwt.user.client.Window class provides access to the browser window’s methods, properties, and events. So you can’t use it in Serverside. Better you return String "success" when requirement meets, else return Exception, so that it is caught by onFailure on clientside.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just built my first app in Xcode 4.3.2. I want to test
I have built a small web application in PHP where users must first log
I have built a simple GUI application in QtCreator-2.0.1 i have following files: first.pro
I have built in some Core Data support into my app from the Core
I have built an iPhone app with SDK 4.2 however I know also want
I have built a simple shopping cart. The problem is that the first time
I have build my very first application to Android and I want now to
I am starting to build my first Android app. I have reached the point
I have built so far an application that allows the user to drag and
I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.