2013-05-28 29 views
1

下面是错误消息:试图从我的Oracle Eclipse的包在Glassfish 3.1部署时类未发现:部署在Glassfish

SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class test.com.creatop.ateam.facade.TestFacade ] 
SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class com.creatop.ateam.facade.implementation.PropertyFacade ] 
SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class com.creatop.ateam.facade.implementation.ProjectFacade ] 
SEVERE: Class [ Lorg/hibernate/validator/ClassValidator; ] not found. Error while loading [ class importprocess.meridien.ContactImport ] 
SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class com.creatop.ateam.facade.implementation.BuildingManagementFacade ] 
SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class com.creatop.ateam.facade.implementation.DefectFacade ] 
SEVERE: Class [ org/apache/lucene/queryparser/classic/ParseException ] not found. Error while loading [ class com.creatop.ateam.facade.implementation.ClaimFacade ] 
SEVERE: org/apache/lucene/search/FieldComparatorSource 
SEVERE: Exception while deploying the app [eSystem] 
SEVERE: org/apache/lucene/search/FieldComparatorSourceat [email protected] 

错误。我已将所有lucene jar文件添加到classpath中。请建议。

回答

2

如果您手动添加了JAR,使用Eclipse(File-> Export-> WAR - > ...)将项目导出到WAR文件并像打开文件夹一样打开它(它实际上是一个ZIP文件, Windows可能需要重命名扩展名),现在检查JAR文件是否放置在WEB-INF/lib目录中。如果是这样,请尝试手动将此WAR部署到Glassfish(使用控制台或管理Web界面)。这会告诉你Eclipse项目设置是否错误,或Glassfish出于某种原因没有看到你的lib目录内容。

还有一个提示,你的Glassfish安装目录下有glassfish_installdir/domains/domain1/lib/ext,这个目录可以被部署在domain1中的所有应用访问。但我不建议将此作为解决方案,只是有时它可以将您的调试指向问题的原因。

1

如果您有单独的项目,请将其打包到EAR中,以便服务器可以找到类别