[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1744) s:convertEntity fails with an java.lang.IllegalArgumentException: Unknown entity: my.Entity_$$_javassist_3

Matthias M. (JIRA) jira-events at lists.jboss.org
Tue Jul 31 08:37:49 EDT 2007


s:convertEntity fails with an java.lang.IllegalArgumentException: Unknown entity: my.Entity_$$_javassist_3
----------------------------------------------------------------------------------------------------------

                 Key: JBSEAM-1744
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1744
             Project: JBoss Seam
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.0.BETA1
         Environment: EJB3, Seam 2.0.0.BETA1, Hibernate
            Reporter: Matthias M.


<s:convertEntity/> fails on 'getAsObject' with an IllegalArgumentException

The code which is responsible for this bug is identified : The method forClass(...) returns a new Entity with the given parameter set - should be the correctly resolved 'entityClass'.

<code>
public class Entity extends Model { 

..........

public static Entity forClass(Class clazz)
   {
      if ( !Contexts.isApplicationContextActive() )
      {
         throw new IllegalStateException("No application context active");
      }
      
      Class entityClass = Seam.getEntityClass(clazz);
      
      if (entityClass==null)
      {
         throw new IllegalArgumentException("Not an entity class: " + clazz.getName());
      }
      
      String name = getModelName(entityClass);
      Model model = (Model) Contexts.getApplicationContext().get(name);
      if ( model==null || !(model instanceof Entity) )
      {
         Entity entity = new Entity(clazz);
         Contexts.getApplicationContext().set(name, entity);
         return entity;
      }
      else
      {
         return (Entity) model;
      }
   }

.............
</code>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list