This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I've installed j2ee 1.5 sdk , glassfish v3 and set up classpath as C:\Sun\SDK\lib\j2ee.jar and j2ee_home as C:\Sun\SDK
But the error is still showing up for import javax.ejb.*; statement in Eclipse.
Is there anything I need to do in the Eclipse properties ?
First of all, I very much doubt that you need the J2EE 1.5 SDK and the classpath setup.
Install GlassFish 3 and create a server for it in Eclipse.
When you create a web project or an EJB project, you select the server to be GlassFish v3.
If you need the GlassFish libraries in some other kind of project, then you can select Server Runtime when adding a JAR.
I installed GF3 and created a server for it in Eclipse but didn't change my j2ee setting and classpath.
I tried to run a sample program, it got compiled but shows '" Publishing to Glassfish v3 Java EE 6 at localhost (java.lang.NullPointerException)"
It is a code error, so it looks like my setup is right.
Thanks a lot for your advice.
Joined: Oct 04, 2006
Post the code and the stacktrace if you want help with the code!
Please also include information about what kind of project you use and any non-default configuration.