Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/universal/i18n/LocalStringsImpl
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/universal/i18n/LocalStringsImpl
当我使用 asadmin 取消部署 war 文件 (glassfish) 并且当我尝试重新启动 glassfish 时它抛出错误,可能的问题可能是 jar 文件或缺少某些东西。
/opt/glassfishv3/glassfish/bin/asadmin undeploy war-name
/opt/glassfishv3/glassfish/bin/asadmin deploy war-name.war
./etc/init.d/glassfish restart
Starting Glassfish ...
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/universal/i18n/LocalStringsImpl
at com.sun.enterprise.admin.cli.AsadminMain.<clinit>(AsadminMain.java:94)
Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.universal.i18n.LocalStringsImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
问题是由于缺少 common-util.jar More about common util jar files 的 jar 文件引起的
丢失的文件在上面提到的 jar 文件下
jar -tvf common-util.jar
--o/p set of files inside the jar as below
com.sun.enterprise.universal.i18n.LocalStringsImpl.class
当我使用 asadmin 取消部署 war 文件 (glassfish) 并且当我尝试重新启动 glassfish 时它抛出错误,可能的问题可能是 jar 文件或缺少某些东西。
/opt/glassfishv3/glassfish/bin/asadmin undeploy war-name
/opt/glassfishv3/glassfish/bin/asadmin deploy war-name.war
./etc/init.d/glassfish restart
Starting Glassfish ...
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/universal/i18n/LocalStringsImpl
at com.sun.enterprise.admin.cli.AsadminMain.<clinit>(AsadminMain.java:94)
Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.universal.i18n.LocalStringsImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
问题是由于缺少 common-util.jar More about common util jar files 的 jar 文件引起的 丢失的文件在上面提到的 jar 文件下
jar -tvf common-util.jar
--o/p set of files inside the jar as below
com.sun.enterprise.universal.i18n.LocalStringsImpl.class