当我在tomcat中重新部署我的应用程序时,我遇到以下问题:
The web application [] created a ThreadLocal with key of type
[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@10d16b])
and a value of type [com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty]
(value [com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty@1a183d2]) but
failed to remove it when the web application was stopped.
This is very likely to create a memory leak.
Run Code Online (Sandbox Code Playgroud)
另外,我在我的应用程序中使用ehcache.这似乎也导致以下异常.
SEVERE: The web application [] created a ThreadLocal with key of type [null]
(value [com.sun.xml.bind.v2.ClassFactory$1@24cdc7]) and a value of type [java
.util.WeakHashMap...
Run Code Online (Sandbox Code Playgroud)
ehcache似乎创建了一个弱哈希映射,我得到的消息是,这很可能会造成内存泄漏.
我在网上搜索并发现了这个, http://jira.pentaho.com/browse/PRD-3616但是我没有这样的服务器访问权限.
如果这些警告有任何功能影响或是否可以忽略,请告诉我?我在tomcat管理器中使用了"查找内存泄漏"选项,它说"没有发现内存泄漏"
我在Tomcat 7中有一个Web应用程序.
当我关闭Tomcat时,我看到了这些警告(但并非总是如此)
SEVERE: The web application [/MyApplication] created a ThreadLocal
with key of type
[org.apache.xml.security.algorithms.MessageDigestAlgorithm$1] (value
[org.apache.xml.security.algorithms.MessageDigestAlgorithm$1@2e2c2e2c])
and a value of type [java.util.HashMap] (value
[{http://www.w3.org/2000/09/xmldsig#sha1=MESSAGE DIGEST SHA-1}]) but
failed to remove it when the web application was stopped. Threads are
going to be renewed over time to try and avoid a probable memory leak.
Apr 3, 2012 1:56:19 PM org.apache.catalina.loader.WebappClassLoader
checkThreadLocalMapForLeaks SEVERE: The web application
[/MyApplication] created a ThreadLocal with key of type
[com.sun.xml.bind.v2.ClassFactory$1] (value
[com.sun.xml.bind.v2.ClassFactory$1@25442544]) and a value …Run Code Online (Sandbox Code Playgroud) 我在stackoverflow上看到了类似的问题,但我无法弄清楚如何解决我的问题.将Spring Security添加到我的Spring MVC项目后,我遇到以下异常:
Jul 20, 2014 3:18:04 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Run Code Online (Sandbox Code Playgroud)
这是我在pom.xml中的 mysql-connecter
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.31</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
这是我添加的课程:
@Component
@Transactional
public class UserDetailsServiceImpl implements UserDetailsService{
@Autowired
private UserDAO userDAO;
@Autowired
private UserAssembler userAssembler;
private static final Logger logger = LoggerFactory.getLogger(UserDetailsServiceImpl.class);
@Transactional(readOnly = true)
public UserDetails loadUserByUsername(String …Run Code Online (Sandbox Code Playgroud)