Class not found: Deploying on Glassfish

三世轮回 提交于 2019-12-12 23:03:41

问题


Below is the error message:

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

The error occurs while trying to deploy on Glassfish 3.1 from my Oracle Eclipse Pack. I have added all the lucene jar files to classpath. Please suggest.


回答1:


If you added your JARs manually, export your project to WAR file using Eclipse (File->Export->WAR->...) and open it like a folder (it's actually a ZIP file, Linux will do, Windows may need renaming the extension), now check if the JAR file is placed in WEB-INF/lib directory. If so try deploying this WAR to Glassfish manually (using console, or Admin web interface). This will tell you if Eclipse project settings are wrong, or Glassfish is for some reason not seeing your lib directory contents.

One more tip for you, there is directory in your Glassfish installation under glassfish_installdir/domains/domain1/lib/ext, which is accessible to all your apps deployed in domain1. But I don't recommend using this as a solution, just sometimes it can point your debugging to the cause of the problem.




回答2:


If you have separate projects, package it into an EAR so that the server can find classes



来源:https://stackoverflow.com/questions/16782109/class-not-found-deploying-on-glassfish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!