This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178028 - compilation error on newly created webapplication
Summary: compilation error on newly created webapplication
Status: RESOLVED WORKSFORME
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: _ tboudreau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-02 15:11 UTC by lichunzhan
Modified: 2009-12-04 11:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lichunzhan 2009-12-02 15:11:32 UTC
Create a javacard web app. Got errors on build/compile:

init-platform-properties:
Using JavaCard Platform Definition at C:\Documents and Settings\user\.netbeans\dev\config\Services\Platforms\org-netbeans-api-java-Platform\javacard_default.jcplatform
Java Card Home is C:\JCDK3.0.2_ConnectedEdition (Java Card Platform)
init-ri-properties:
init-device-properties:
Platform device property name is jcplatform.javacard_default.devicespath
Computed device folder path is C:\Documents and Settings\user\.netbeans\dev\config\org-netbeans-modules-javacard\servers\javacard_default
Platform device file path property name is C:\Documents and Settings\user\.netbeans\dev\config\org-netbeans-modules-javacard\servers\javacard_default\Default Device.jcard
Deploying to device Default Device http port 8019
init-keystore:
Keystore is C:\JCDK3.0.2_ConnectedEdition/samples/keystore/a.keystore
compile:
Compiling 1 source file to C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\build\WEB-INF\classes
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\src\webapplication2\WebApplication2.java:9: package javax.servlet.http does not exist
import javax.servlet.http.HttpServlet;
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\src\webapplication2\WebApplication2.java:10: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\src\webapplication2\WebApplication2.java:11: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletResponse;
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\src\webapplication2\WebApplication2.java:16: cannot find symbol
symbol: class HttpServlet
public class WebApplication2 extends HttpServlet {
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\src\webapplication2\WebApplication2.java:19: cannot find symbol
symbol  : class HttpServletRequest
location: class webapplication2.WebApplication2
    public void doGet(HttpServletRequest request, HttpServletResponse response)
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\src\webapplication2\WebApplication2.java:19: cannot find symbol
symbol  : class HttpServletResponse
location: class webapplication2.WebApplication2
    public void doGet(HttpServletRequest request, HttpServletResponse response)
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\src\webapplication2\WebApplication2.java:18: method does not override or implement a method from a supertype
    @Override
7 errors
C:\Documents and Settings\user\My Documents\NetBeansProjects\WebApplication2\nbproject\build-impl.xml:276: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
Comment 1 _ tboudreau 2009-12-02 18:21:05 UTC
Works fine for me.

Is your platform set up correctly?  (you can open Window | Properties and actually see its classpath if you select it in the Services window).

"package javax.servlet.http does not exist" suggests that there is nothing or almost nothing on your compile classpath.  Do you see errors in the IDE, or only errors when compiling?

Could you do the following:
 - Reproduce this with a cleanly set up platform
 - Verify that the classpath for that platform is correct in the Properties window
 - In Tools | Options | Ant, set the verbosity level to Debug, and provide the output when building with those settings

I suspect a problem with your configuration (or maybe your RI build's JARs?) - never seen anything like this locally, and I was testing web projects this afternoon on the latest bits.
Comment 2 _ tboudreau 2009-12-03 15:04:52 UTC
Closing.  If you can provide steps to reproduce, reopen.
Comment 3 lichunzhan 2009-12-04 11:42:15 UTC
Thanks Tim. It happens only at the compilation time. After I add the api_connected.jar to the project->properties->Dependencies, the problem is gone. 
The window->Properties is still empty, no classpath shown.
I did not do this extra step before.
Comment 4 _ tboudreau 2009-12-04 11:56:51 UTC
Okay, though you should not need to add the SDK as a runtime dependency.  I'm guessing your platform install just got screwed up somehow, though.