• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javax.ejb error

 
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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 ?

Please advise.

--
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
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.
Best wishes!
 
pramod talekar
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan,

Thanks for the reply.

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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
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.
Best wishes!
 
pramod talekar
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan,

I just noticed that while creating a Dynamic web project in Eclipse (platform 3.5), the option 'Dynamic web module version I can set up is 2.5 and I need 3.0

Does this affect the project in any way ?

Thanks.


 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
The dynamic web module version depends on the target runtime you configure for Eclipse projects.
I can configure version 3.0 with GlassFish v3.0.1. If you want a web container only, try Tomcat 7.

Oh, yes - it may also be related to the version of Eclipse you use. Try Helios (Eclipse 3.6).
Best wishes!
 
pramod talekar
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan,

I had an old version of Eclipse.
Upgrading it now...
will let you know.

Thanks a lot..
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic