Home > Mobile >  Error while deploying App Engine standard project from command line
Error while deploying App Engine standard project from command line

Time:03-17

We have a App Engine standard Java8 project, where JSP files were used for views and each of those jsp file will be using a util class, so we've used the page directive provided by jsp to import the required util class. The code looks like below

<%@page import="util.AssetUtils"%>.

We don't have any error in any of those JSPs' and even the deployment was fine when done with Google Cloud Tools for Eclipse plugin.

But when we tried deployment with command line. We are getting the below error for some of the jsp files.

INFO: Built File: /includes/social-ad-template.jsp
Mar 02, 2022 2:59:38 PM org.apache.jasper.JspC execute
INFO: Generation completed with [0] errors in [926] milliseconds
warning: [options] bootstrap class path not set in conjunction with -source 8
/var/folders/nn/_v6wc4tn02x45jp9f_5ysrch0000gp/T/1646213377265-0/org/apache/jsp/includes/scripts_002dto_002dinject_002din_002dhead_jsp.java:15: error: package util does not exist
import util.AssetsUtil;
           ^
/var/folders/nn/_v6wc4tn02x45jp9f_5ysrch0000gp/T/1646213377265-0/org/apache/jsp/includes/scripts_002dto_002dinject_002din_002dbody_jsp.java:14: error: package util does not exist
import util.ModeUtil;

Gcloud version

Google Cloud SDK 375.0.0
app-engine-java 1.9.95
app-engine-python 1.9.99
bq 2.0.74
cloud-datastore-emulator 2.1.0
core 2022.02.25
gsutil 5.6

Can someone please help with this ?

Thanks!

CodePudding user response:

I think there is no error while running this in Google Cloud Tools for Eclipse plugin because it downloads required dependencies for you. To run it in CLI using the javac command, you need to specify CLASSPATH. It is important to be inside of the /home/user directory.

OP confirmed that he followed the above suggestion and changed the output path location in the classpath to point a dir inside his WebContent folder. So now the class files are available during the deployment and it is working fine.

  • Related