My best guess is that you haven't added J2EE libraries to the classpath/build-path or whatever it is called in NetBeans. e.g. if you are using weblogic, those are found in weblogic.jar
PS: I guess this topic could be more appropriate for IDE forums.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.