2 Replies Latest reply: Feb 27, 2012 2:56 AM by Brian Hui RSS

Compiler exception - package does not exist?

Brian Hui
Currently Being Moderated

I am new to NWDS and J2EE.  I followed the steps in the tutorial as indicated in the below link:

 

http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/library/netweaver-application-server/_netweaver-application-server/a-c/Creating%20your%20First%20J2EE%20Application.pdf

 

I did everything inside up to the last moment after I deployed my EAR and tried to run from the portal but got Application error.  I checked the defaultTrace log file from the portal server and notice these errors:

 

#

#1.5 #001A6431E0FE0020000000750000155C0004B9B284863A19#1330076285575#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#sap.com/CalculatorEar#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#Guest#0##40C36AF65ECB11E18721000000978DDA#40c36af65ecb11e18721000000978dda-0#40c36af65ecb11e18721000000978dda#SAPEngine_Application_Thread[impl:3]_21##0#0#Error#1#/System/Server/WebRequests#Plain###application [Calculator] Processing HTTP request to servlet [jsp] finished with error.

The error is: com.sap.engine.services.servlets_jsp.server.jsp.exceptions.CompilingException: Error while executing the compilation process: [G:/usr/sap/EPD/JC00/j2ee/cluster/server0/apps/sap.com/CalculatorEar/servlet_jsp/Calculator/work/jsp_Calculator1330076284538.java:41: package com.sap.examples.calculator.beans does not exist

          com.sap.examples.calculator.beans.CalcProxy calc = null;

                                                 ^

G:/usr/sap/EPD/JC00/j2ee/cluster/server0/apps/sap.com/CalculatorEar/servlet_jsp/Calculator/work/jsp_Calculator1330076284538.java:42: package com.sap.examples.calculator.beans does not exist

               calc = (com.sap.examples.calculator.beans.CalcProxy)pageContext.getAttribute("calc", PageContext.SESSION_SCOPE);

                                                                 ^

G:/usr/sap/EPD/JC00/j2ee/cluster/server0/apps/sap.com/CalculatorEar/servlet_jsp/Calculator/work/jsp_Calculator1330076284538.java:48: package com.sap.examples.calculator.beans does not exist

                    calc = (com.sap.examples.calculator.beans.CalcProxy) Beans.instantiate(getClass().getClassLoader(), "com.sap.examples.calculator.beans.CalcProxy");

                                                                         ^

3 errors

 

The thing I don't understand is the "comp.sap.examples.calculator.beans" class has already been included inside the EAR (I used my zip tool to check the EAR file and confirmed it's there), why did the compiler still complain that the package does not exist?  Any great guys & gals out there can help this poor newbie who spent the past 5 hours searching for Google for answers but couldn't find any??

 

Thank you.

 

Brian

Actions