简体   繁体   English

Glassfish 2.x EJB库丢失

[英]Glassfish 2.x EJB library missing

I have a web-app running smoothly on GlassFish 3.1.2 which is on my local machine. 我有一个在本地计算机上的GlassFish 3.1.2上流畅运行的Web应用程序。 However I get to put this app on an actual server which runs GF2.1. 但是,我将此应用程序放置在运行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. 当我尝试将netbeans项目导入到netbeans(较低版本)中并对其进行编译时,很少有导入库出现“找不到类”错误。

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? 是否有可能我可以在Glassfish 2.1上手动添加更多库?

Or is there any alternatives approach that I can go for? 还是我可以选择其他替代方法?

Thanks in advance! 提前致谢!

It looks like you are using items defined in EJB 3 (javax.ejb.Startup, for example). 看起来您正在使用EJB 3中定义的项目(例如,javax.ejb.Startup)。 EJB 3 is not supported by Glassfish 2. Glassfish 2不支持EJB 3。

You've written your application against the JavaEE 6 specifications (which is supported by Glassfish 3). 您已经按照JavaEE 6规范(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 Glassfish 2.x支持JavaEE 5,而不支持6。我认为您无法像Glassfish 2一样运行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM