Java 未找到类:在Glassfish上部署

Java 未找到类:在Glassfish上部署,java,jakarta-ee,lucene,glassfish-3,Java,Jakarta Ee,Lucene,Glassfish 3,以下是错误消息: 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

以下是错误消息:

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 org.glassfish.apf.AnnotationInfo@6bf2c7

尝试从我的Oracle Eclipse包在Glassfish 3.1上部署时出错。我已将所有lucene jar文件添加到类路径。请建议。

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


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

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


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

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

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