[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
14 years
[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
14 years
[Hibernate-JIRA] Created: (HHH-5770) Memory leak when using hibernate 3.6 and jboss-4.0.3SP1
by ran haim (JIRA)
Memory leak when using hibernate 3.6 and jboss-4.0.3SP1
--------------------------------------------------------
Key: HHH-5770
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5770
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.0
Environment: hibernate 3.6, mysql server 5.0 and jboss-4.0.3SP1
Reporter: ran haim
When hibernate runs hql statements for some reason it tries to load a class for every where statement token, and that class gets into jboss class loader black list and resource black list(that has no limit for some reason).
Example:
int userId = 4;
String hql = "select from user where user.id = " + userId + " and user.type = 'admin'";
When hibernate will run this hql, it will try to load these classes and will fail (it is caught internally and handled, happens in WhereParser.doToken(line 412)) "4.class", "'admin'.class" and "and.class".
This will lead for jboss to black list these classes (in a HashSet).
This process leads over time to a big memory leak.
I also think this still happens in newer jboss versions.
--
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
14 years
[Hibernate-JIRA] Created: (BVTCK-12) The TCK goes against the spec on Node and nested Path: section 4.2
by Emmanuel Bernard (JIRA)
The TCK goes against the spec on Node and nested Path: section 4.2
------------------------------------------------------------------
Key: BVTCK-12
URL: http://opensource.atlassian.com/projects/hibernate/browse/BVTCK-12
Project: Bean Validation TCK
Issue Type: Bug
Affects Versions: 1.0.4.GA
Reporter: Emmanuel Bernard
Assignee: Emmanuel Bernard
Priority: Minor
In section 4.2 "Constraint Violation", Table 4.1, "propertyPath examples", the structure of a set of Path.Nodes is described. Examining the examples in this section:
Row 4 shows that a path describing the fourth author (i.e. "authors3") should be represented by a not-in-iterable "authors" node followed by a nameless node with index 3. However, in this example the TCK would expect a single "authors" node with index 3.
Likewise, row 6 shows that a path describing the first author's company property ("authors0.company") should be represented by a not-in-iterable "authors" node followed by a "company" node with index 0. In this example the TCK would instead expect an "authors" node with index 3, followed by a not-in-iterable "company" node.
--
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
14 years