Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
91 views
in Technique[技术] by (71.8m points)

java - ClassCircularityError when running Tomcat 6 from Eclipse

I'm using Eclipse 3.5, with my Tomcat runtime set as Tomcat 6.0.26. My Java VM is JDK 1.6.17 (Mac OS X).

When I try to run a web application from an Eclipse Java EE perspective I keep seeing this error in the console:

Caused by: java.lang.ClassCircularityError: java/util/logging/LogRecord
 at com.adsafe.util.SimpleFormatter.format(SimpleFormatter.java:11)
 at java.util.logging.StreamHandler.publish(StreamHandler.java:179)
 at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
 at java.util.logging.Logger.log(Logger.java:458)
 at java.util.logging.Logger.doLog(Logger.java:480)
 at java.util.logging.Logger.logp(Logger.java:596)
 at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:165)
 at org.apache.juli.logging.DirectJDKLog.info(DirectJDKLog.java:115)
 at org.apache.catalina.core.ApplicationContext.log(ApplicationContext.java:644)
 at org.apache.catalina.core.ApplicationContextFacade.log(ApplicationContextFacade.java:251)
 at org.apache.catalina.core.StandardWrapper.unavailable(StandardWrapper.java:1327)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1130)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:519)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
 ... 6 more

java/util/logging/LogRecord implements Serializable, so I am not sure where the circular reference could have creeped in.

Has anyone seen this before and know how to fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I was able to circumvent this problem by moving the <contextListener ...> to the very end of the configuration file (previously, I had it at the beginning of the file). The error remains really weird, though.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...