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

Pete Muir (JIRA) jira-events at lists.jboss.org
Sun Aug 5 12:43:49 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1744?page=all ]

Pete Muir closed JBSEAM-1744.
-----------------------------

    Resolution: Out of Date

This is already fixed in CVS.

> 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.
>         Assigned To: Pete Muir
>            Priority: Trivial
>             Fix For: 2.0.0.CR1
>
>          Time Spent: 2 minutes
>  Remaining Estimate: 5 minutes
>
> <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