glassfish PWC6351: In TLD scanning 系统找不到指定的文件问题解决
[2017-04-25T21:26:09.391+0800] [glassfish 4.1] [WARNING] [] [org.apache.jasper.runtime.TldScanner] [tid: _ThreadID=52 _ThreadName=admin-listener(4)] [timeMillis: 1493126769391] [levelValue: 900] [[
PWC6351: In TLD scanning, the supplied resource file:/F:/server/glassfish-4.1.2/glassfish/domains/domain1/applications/javaee-api-6.0.jar does not exist
java.io.FileNotFoundException: F:\server\glassfish-4.1.2\glassfish\domains\domain1\applications\javaee-api-6.0.jar (系统找不到指定的文件。)
google以上问题,大多说是以上问题是警告,可以忽略。原因:It would be helpful if the warnings tell you which jars that has bad manifest class-path
日志的路径确实不对,然后又知道了原因出自has bad manifest class-path,于是打开war包下的META-INF/MANIFEST.MF,发现Class-Path的所有jar包都没有带路径,
于是手动加上试试,果真没有以上错误了。
然而不能每次去改这个路径,于是找到解决办法:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>/${build.finalName}/WEB-INF/lib/</classpathPrefix> </manifest> </archive> </configuration> </plugin>
加上
<classpathPrefix>/${build.finalName}/WEB-INF/lib/</classpathPrefix>
MANIFEST.MF就都加上了这个前缀,问题就解决了。