2
我在重新部署時遇到了一些問題。 首次部署,確定。但是它會拋出這個異常。我必須重新啓動GlassFish。爲什麼有必要?java.lang.IllegalStateException:使用Glassfish時的類不變違例
SEVERE: log4j:ERROR log4j called after unloading, see http://logging.apache.org/log4j/1.2/faq.html#unload.
SEVERE: java.lang.IllegalStateException: Class invariant violation
at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:199)
at org.apache.log4j.LogManager.getLogger(LogManager.java:228)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
at com.icesoft.faces.component.portlet.Portlet.<clinit>(Portlet.java:38)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:140)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:949)
at java.lang.reflect.Field.getFieldAccessor(Field.java:930)
at java.lang.reflect.Field.set(Field.java:680)
at
...
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'bundle://184.0:1/com/sun/faces/jsf-ri-runtime.xml': DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
謝謝。但我不知道,該怎麼做 - 我應該編輯GlassFish的某個配置文件還是可以將此指令寫入IDE的某個對話框(我使用NetBeans)。 – 2013-03-10 18:49:35
看看這個,http://www.gerardsetho.net/2011/02/add-jvm-options-to-glassfish.html – 2013-03-10 19:13:27
我已經這樣做了,但我得到了同樣的錯誤 - -Djava.endorsed.dirs = $ {com.sun.aas.installRoot}/modules/endorsed $ {path.separator} $ {com.sun.aas.installRoot}/lib/endorsed jvm-options> -Djava.endorsed.dirs =/myapp /lib/xerces.jar jvm-options> ... java-config> –
2013-03-13 20:33:02