[Hibernate-JIRA] Created: (HSEARCH-517) ThreadLocal in ContextHolder causes memory leak when deployed in a web container
by Vojtěch Krása (JIRA)
ThreadLocal in ContextHolder causes memory leak when deployed in a web container
--------------------------------------------------------------------------------
Key: HSEARCH-517
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-517
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.2.0.CR1, 3.2.0.Beta1, 3.1.1.GA, 3.1.0.GA, 3.1.0.CR1, 3.1.0.Beta2, 3.1.0.Beta1, 3.0.1.GA, 3.0.0.GA
Environment: Hibernate 3.4.0.GA/3.5.1-Final, Tomcat 6.0.26, Spring 2.5.6/3.0.1, Sun JDK 1.6; Hibernate 3.3.1.GA Tomcat 6.0.18 Spring 2.5.6 Java OpenJDK 1.6
Reporter: Vojtěch Krása
Priority: Critical
Attachments: dump.zip, testCase.zip
The SearchFactory has a static ThreadLocal variables which holds a reference to the SearchFactoryImpl. The ThreadLocal is not cleared when the application is undeployed, causing a memory leak.
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-314
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[Hibernate-JIRA] Created: (METAGEN-44) getting Runtime error message "o.h.e.m.MetadataContext - Unable to locate static metamodel field"
by Young Lee (JIRA)
getting Runtime error message "o.h.e.m.MetadataContext - Unable to locate static metamodel field"
-------------------------------------------------------------------------------------------------
Key: METAGEN-44
URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-44
Project: Hibernate Metamodel Generator
Issue Type: Bug
Affects Versions: 1.1.0.CR1
Reporter: Young Lee
Assignee: Hardy Ferentschik
Attachments: test.jar
I have a @MappedSuperClass declared as
@MappedSuperClass
public abstract class IdentifiableComponent<T extends EmbeddableId> extends RecordTimestamp2 implements Serializable
and my Entity class declared as
@Entity
public class AppRegistration extends IdentifiableComponent<AppRegistrationId>
and the Composite Id class declared as
@Embeddable
public class AppRegistrationId implements EmbeddableId
The metamodel is generated properly, but at runtime I get the following error message
o.h.e.m.MetadataContext - Unable to locate static metamodel field : com.playspan.lookup.model.AppRegistration_#id
I've tried adding @IdClass(AppRegistrationId) annotation to the AppRegistration Entity class, but still
I get the same error message.
Please tell me what I am doing wrong. Thanx in advance.
Attached is a complete sample buildable maven project with the above classes
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[Hibernate-JIRA] Created: (METAGEN-49) JPAMetaModelEntityProcessor.createMetaModelClasses calls remove within foreach loop (causing a ConcurrentModificationException)
by Robin Sander (JIRA)
JPAMetaModelEntityProcessor.createMetaModelClasses calls remove within foreach loop (causing a ConcurrentModificationException)
-------------------------------------------------------------------------------------------------------------------------------
Key: METAGEN-49
URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-49
Project: Hibernate Metamodel Generator
Issue Type: Bug
Components: processor
Affects Versions: 1.1.0.Final
Environment: Hibernate 3.6.0, Java 6 (1.6.0_22), Mac OS X 10.6.5
Reporter: Robin Sander
Assignee: Hardy Ferentschik
Running the annotation processor causes a ConcurrentModificationException.
I'm using Maven and the maven-processor-plugin 1.3.7 but from looking into the sources I guess this bug occurs in any environment.
JPAMetaModelEntityProcessor.createMetaModelClasses iterates of a Collection<MetaEntity> using a foreach loop and calls remove
on the same collection which causes a ConcurrentModificationException.
Obviously an iterator should be used instead.
Here are the lines concerned:
{code:java}
Collection<MetaEntity> toProcessEntities = context.getMetaEmbeddables();
while ( !toProcessEntities.isEmpty() ) {
Set<MetaEntity> processedEntities = new HashSet<MetaEntity>();
int toProcessCountBeforeLoop = toProcessEntities.size();
for ( MetaEntity entity : toProcessEntities ) {
// see METAGEN-36
if ( generatedModelClasses.contains( entity.getQualifiedName() ) ) {
toProcessEntities.remove( entity ); // XXX this causes a ConcurrentModificationException
continue;
}
...
{code}
Here is the stacktrace:
{code}
...
[INFO] diagnostic Note: Hibernate JPA 2 Static-Metamodel Generator 1.1.0.Final
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.createMetaModelClasses(JPAMetaModelEntityProcessor.java:153)
at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.process(JPAMetaModelEntityProcessor.java:133)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:625)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:554)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:699)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:115)
at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:261)
at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:129)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months