未找到类:在Glassfish上部署

时间:2013-05-28 00:15:03

标签: java java-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 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 Pack部署Glassfish 3.1时发生错误。我已将所有lucene jar文件添加到classpath中。请建议。

2 个答案:

答案 0 :(得分:3)

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

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

答案 1 :(得分:1)

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