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 6874053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:08:49+00:00 2026-05-27T04:08:49+00:00

Im having a weird compile issue using the Google App engine in java using

  • 0

Im having a weird compile issue using the Google App engine in java using eclipse. When I try to GWT Compile my code I get an error that is as follows:

Compiling module beer.SQLBeer
   Validating newly compiled units
      Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   Finding entry point classes
      [ERROR] Errors in 'file:/C:/Users/Mark/workspace/SQLBeer/src/beer/client/SQLBeer.java'
         [ERROR] Line 12: The import com.google.appengine.api.rdbms cannot be resolved
         [ERROR] Line 13: The import com.google.apphosting cannot be resolved
         [ERROR] Line 14: The import com.google.cloud cannot be resolved
         [ERROR] Line 18: ServersServlet cannot be resolved to a type
         [ERROR] Line 22: The method doPost(HttpServletRequest, HttpServletResponse) of type SQLBeer must override or implement a supertype method
         [ERROR] Line 26: Connection cannot be resolved to a type
         [ERROR] Line 28: AppEngineDriver cannot be resolved to a type
         [ERROR] Line 29: Connection cannot be resolved to a type
      [ERROR] Unable to find type 'beer.client.SQLBeer'
         [ERROR] Hint: Previous compiler errors may have made this type unavailable
         [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
Exception in thread "UnitWriteThread" 

I am not sure why it cannot resolve the imports, and this is preventing me from deploying my code onto the Google app engine. I feel because it is not playing nicely with my imports its the same reason im getting the error

[ERROR] Line 22: The method doPost(HttpServletRequest, HttpServletResponse) of type SQLBeer must override or implement a supertype method

I am really new to using GWT and the Google App Engine for Eclipse, but im trying to access a database my team created using Google Cloud SQL. And I feel Like im getting close, if i can over come these errors.

The Project Code

package beer.client;


import java.io.IOException;
import java.io.PrintWriter;
import java.sql.DriverManager;
import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.rdbms.AppEngineDriver;
import com.google.apphosting.utils.servlet.ServersServlet;
import com.google.cloud.sql.jdbc.Connection;


@SuppressWarnings("serial")
public class SQLBeer extends ServersServlet {


    @Override 
    public void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws IOException {

        PrintWriter out = resp.getWriter();
        Connection c = null;
        try {
            DriverManager.registerDriver(new AppEngineDriver());
            c = (Connection) DriverManager
                    .getConnection("jdbc:google:rdbms://asu.edu:cst433team1:team1db/mysql");
            String fname = req.getParameter("fname");
            String content = req.getParameter("content");

            /**
             * This code appears to do the web form fun
             */
//          if (fname == "" || content == "") {
//              out.println("<html><head></head><body>You are missing either a message or a name! Try again! Redirecting in 3 seconds...</body></html>");
//          } else {
//              String statement = "INSERT INTO entries (guestName, content) VALUES( ? , ? )";
//              PreparedStatement stmt = c.prepareStatement(statement);
//              stmt.setString(1, fname);
//              stmt.setString(2, content);
//              int success = 2;
//              success = stmt.executeUpdate();
//              if (success == 1) {
//                  out.println("<html><head></head><body>Success! Redirecting in 3 seconds...</body></html>");
//              } else if (success == 0) {
//                  out.println("<html><head></head><body>Failure! Please try again! Redirecting in 3 seconds...</body></html>");
//              }
//          }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            if (c != null)
                try {
                    c.close();
                } catch (SQLException ignore) {
                }
        }
        //resp.setHeader("Refresh", "3; url=/beer.jsp");
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub

    }

}

Any Suggestion on what I could do to fix these errors? Ive tried different Imports but they all seem to lead to the same issues in the GWT Compiler.

EDIT: I changed the extend to HttpServlet and now the error is a little different

Compiling module beer.SQLBeer
   Validating newly compiled units
      Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   Finding entry point classes
      [ERROR] Errors in 'file:/C:/Users/Mark/workspace/SQLBeer/src/beer/client/SQLBeer.java'
         [ERROR] Line 13: The import com.google.appengine.api.rdbms cannot be resolved
         [ERROR] Line 14: The import com.google.cloud cannot be resolved
         [ERROR] Line 26: Connection cannot be resolved to a type
         [ERROR] Line 28: AppEngineDriver cannot be resolved to a type
         [ERROR] Line 29: Connection cannot be resolved to a type
      [ERROR] Unable to find type 'beer.client.SQLBeer'
         [ERROR] Hint: Previous compiler errors may have made this type unavailable
         [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
Exception in thread "UnitWriteThread" java.lang.RuntimeException: Unable to read from byte cache
  • 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-05-27T04:08:49+00:00Added an answer on May 27, 2026 at 4:08 am

    First, check that this isn’t a classpath issue – meaning you don’t have all the required jars in the lib directory and on the classpath.

    If that fails, make sure that this code isn’t Client side(guessing from your package name), which will gets compiled to javascript. You dont want this to happen for database connection code so you should use this code on the server side.

    See the Documentation on Client side & Server side code.

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

Sidebar

Related Questions

In IntelliJ I get this weird error when I try to compile. Cannot find
Using Visual Studio 10 C++, I'm having weird link error. For some reason references
I'm having two weird errors New error is when i tell java to draw
I'm having weird issue during application relaunch, I get two Navigation Bars when I
I am having a very weird issue in the way strings get stored in
Im having a weird issue here; The following .htaccess works but now (after changing
I'm having a weird error. During user creation, if a username already exists in
I'm having a weird issue with a function I'm trying to call from within
I am having a weird Situation with my DataConext. All My code is in
Having a weird problem with PHPUnit. We're using PHPUnit as part of a continuous

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.