You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Roman Krutyakov (JIRA)" <ta...@jakarta.apache.org> on 2005/05/25 08:17:53 UTC

[jira] Created: (TAPESTRY-335) Incorrect object injection

Incorrect object injection
--------------------------

         Key: TAPESTRY-335
         URL: http://issues.apache.org/jira/browse/TAPESTRY-335
     Project: Tapestry
        Type: Bug
  Components: Framework  
    Versions: 4.0    
    Reporter: Roman Krutyakov
 Attachments: stack_trace.txt

During object injection (via <inject> tag) property type defined in code is used only for checking injection correctness (in InjectObjectWorker). During enhancement EnhancementOperationImpl resolves injected object type by invoking its getClass() method and dont use type from property declaration. This behaviour may be cause of exceptions in case when injected object is generated at runtime (with AOP) and its type cant be resolved by classloader.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Assigned: (TAPESTRY-335) Incorrect object injection

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-335?page=all ]

Howard M. Lewis Ship reassigned TAPESTRY-335:
---------------------------------------------

    Assign To: Howard M. Lewis Ship

> Incorrect object injection
> --------------------------
>
>          Key: TAPESTRY-335
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-335
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Roman Krutyakov
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0
>  Attachments: stack_trace.txt
>
> During object injection (via <inject> tag) property type defined in code is used only for checking injection correctness (in InjectObjectWorker). During enhancement EnhancementOperationImpl resolves injected object type by invoking its getClass() method and dont use type from property declaration. This behaviour may be cause of exceptions in case when injected object is generated at runtime (with AOP) and its type cant be resolved by classloader.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-335) Injection uses actual type of injected object, which may not be available (due to AOP, or due to use of JDK Proxies)

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-335?page=all ]

Howard M. Lewis Ship updated TAPESTRY-335:
------------------------------------------

        Summary: Injection uses actual type of injected object, which may not be available (due to AOP, or due to use of JDK Proxies)  (was: Incorrect object injection)
    Fix Version: 4.0
    Environment: 

> Injection uses actual type of injected object, which may not be available (due to AOP, or due to use of JDK Proxies)
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-335
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-335
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Roman Krutyakov
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0
>  Attachments: stack_trace.txt
>
> During object injection (via <inject> tag) property type defined in code is used only for checking injection correctness (in InjectObjectWorker). During enhancement EnhancementOperationImpl resolves injected object type by invoking its getClass() method and dont use type from property declaration. This behaviour may be cause of exceptions in case when injected object is generated at runtime (with AOP) and its type cant be resolved by classloader.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-335) Incorrect object injection

Posted by "Roman Krutyakov (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-335?page=all ]

Roman Krutyakov updated TAPESTRY-335:
-------------------------------------

    Attachment: stack_trace.txt

This is stack trace for this error. Exception was thrown when i tryed to inject Spring bean, created with Spring-AOP

> Incorrect object injection
> --------------------------
>
>          Key: TAPESTRY-335
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-335
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Roman Krutyakov
>  Attachments: stack_trace.txt
>
> During object injection (via <inject> tag) property type defined in code is used only for checking injection correctness (in InjectObjectWorker). During enhancement EnhancementOperationImpl resolves injected object type by invoking its getClass() method and dont use type from property declaration. This behaviour may be cause of exceptions in case when injected object is generated at runtime (with AOP) and its type cant be resolved by classloader.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Closed: (TAPESTRY-335) Injection uses actual type of injected object, which may not be available (due to AOP, or due to use of JDK Proxies)

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-335?page=all ]
     
Howard M. Lewis Ship closed TAPESTRY-335:
-----------------------------------------

    Resolution: Fixed

This should fix the issue you are getting.  Didn't test per-se with Spring AOP, but the general solution (using the property type) should work fine ... that property type will be an interface, or a base class, or java.lang.Object.

> Injection uses actual type of injected object, which may not be available (due to AOP, or due to use of JDK Proxies)
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-335
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-335
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Roman Krutyakov
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0
>  Attachments: stack_trace.txt
>
> During object injection (via <inject> tag) property type defined in code is used only for checking injection correctness (in InjectObjectWorker). During enhancement EnhancementOperationImpl resolves injected object type by invoking its getClass() method and dont use type from property declaration. This behaviour may be cause of exceptions in case when injected object is generated at runtime (with AOP) and its type cant be resolved by classloader.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-335) Incorrect object injection

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-335?page=comments#action_12312913 ] 

Howard M. Lewis Ship commented on TAPESTRY-335:
-----------------------------------------------

Fixing injection to use a specific type when defining the field (and the constructor parameter); in this case, it will be the type of the property, or java.lang.Object where the property type isn't defined (i.e., no accessors).

> Incorrect object injection
> --------------------------
>
>          Key: TAPESTRY-335
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-335
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Roman Krutyakov
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0
>  Attachments: stack_trace.txt
>
> During object injection (via <inject> tag) property type defined in code is used only for checking injection correctness (in InjectObjectWorker). During enhancement EnhancementOperationImpl resolves injected object type by invoking its getClass() method and dont use type from property declaration. This behaviour may be cause of exceptions in case when injected object is generated at runtime (with AOP) and its type cant be resolved by classloader.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org