Grant
Grant

Reputation: 33

Glassfish 2.x EJB library missing

I have a web-app running smoothly on GlassFish 3.1.2 which is on my local machine. However I get to put this app on an actual server which runs GF2.1.

When I tried to import the netbeans project into the netbeans (which is a lower version) and compiled it, few of my import library get "class not found“ error.

Below are those imports:

import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

Just wondering how could I possibly solve this?

Is there any chance that I can add some more library manually onto Glassfish 2.1?

Or is there any alternatives approach that I can go for?

Thanks in advance!

Upvotes: 0

Views: 181

Answers (1)

EdH
EdH

Reputation: 5003

It looks like you are using items defined in EJB 3 (javax.ejb.Startup, for example). EJB 3 is not supported by Glassfish 2.

You've written your application against the JavaEE 6 specifications (which is supported by Glassfish 3). So the best bet is to run it in a container which supports it. Glassfish 2.x supports JavaEE 5, not 6. I don't think you'll be able to run it as is in Glassfish 2

Upvotes: 1

Related Questions