You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Eric Covener (JIRA)" <ji...@apache.org> on 2010/01/15 02:58:54 UTC

[jira] Created: (OWB-231) exception using abstract decorators

exception using abstract decorators
-----------------------------------

                 Key: OWB-231
                 URL: https://issues.apache.org/jira/browse/OWB-231
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Interceptor and Decorators
    Affects Versions: M3
            Reporter: Eric Covener
            Assignee: Gurkan Erdogdu
             Fix For: M4


After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:

Caused by: java.lang.InstantiationException
	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
	... 33 more


If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (OWB-231) exception using abstract decorators

Posted by Gurkan Erdogdu <cg...@gmail.com>.
Spec. says that if Decorator class not @Dependent, unportable behavior
occurs. Also it says that @Dependent scoped beans does not require to define
default constructor.

But what occurs if Decorator is an abstract class? It must define default
parameter otherwise it can not be subclassed and instantiated?

Any comments?

Thanks;

--Gurkan

2010/1/15 Gurkan Erdogdu <cg...@gmail.com>

> I think that this is related with Decorator class has not a default
> constructor.
>
> What is your Decorator bean you are talking about? Does it contain default
> no param constructor?
>
> Thanks;
>
> --Gurkan
>
> 2010/1/15 Eric Covener (JIRA) <ji...@apache.org>
>
> exception using abstract decorators
>> -----------------------------------
>>
>>                 Key: OWB-231
>>                 URL: https://issues.apache.org/jira/browse/OWB-231
>>             Project: OpenWebBeans
>>          Issue Type: Bug
>>          Components: Interceptor and Decorators
>>    Affects Versions: M3
>>            Reporter: Eric Covener
>>            Assignee: Gurkan Erdogdu
>>             Fix For: M4
>>
>>
>> After r897450, abstract decorator classes are passed to
>> Constructor.newInstance() and cause an exception:
>>
>> Caused by: java.lang.InstantiationException
>>        at
>> sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
>>        at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
>>        at
>> org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
>>        at
>> org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
>>        at
>> org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
>>        at
>> org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
>>        at
>> org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
>>        at
>> org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
>>        at
>> org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
>>        at
>> org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
>>        at
>> org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
>>        ... 33 more
>>
>>
>> If you take Joe Bergmark's testcase from OWB-151, and make the bean
>> @RequestScoped and the decorator abstract, you can generate the same
>> backtrace.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
>



-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Re: [jira] Created: (OWB-231) exception using abstract decorators

Posted by Eric Covener <co...@gmail.com>.
On Fri, Jan 15, 2010 at 2:05 AM, Gurkan Erdogdu
<cg...@gmail.com> wrote:
> I think that this is related with Decorator class has not a default
> constructor.
>
> What is your Decorator bean you are talking about? Does it contain default
> no param constructor?

Adding the default no-param constructor did not change the symptom.
The decorator is the one from Joe's OWB-151 patch with some mods:

package org.apache.webbeans.newtests.decorators.dependent;

import javax.decorator.Decorator;
import javax.decorator.Delegate;
import javax.inject.Inject;

@Decorator
public abstract class NumberDecorator implements NumberProvider {
	
	public static boolean called = false;

	@Inject @Delegate NumberProvider np;
	
	public NumberDecorator() {
		super();
	}
	public int getANumber() {
		called = true;
		return np.getANumber();
	}
}

(constructor added, class changed to abstract, bean it decorates
changed to non-dependent for simplicity)

-- 
Eric Covener
covener@gmail.com

Re: [jira] Created: (OWB-231) exception using abstract decorators

Posted by Gurkan Erdogdu <cg...@gmail.com>.
I think that this is related with Decorator class has not a default
constructor.

What is your Decorator bean you are talking about? Does it contain default
no param constructor?

Thanks;

--Gurkan

2010/1/15 Eric Covener (JIRA) <ji...@apache.org>

> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Gurkan Erdogdu
>             Fix For: M4
>
>
> After r897450, abstract decorator classes are passed to
> Constructor.newInstance() and cause an exception:
>
> Caused by: java.lang.InstantiationException
>        at
> sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
>        at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
>        at
> org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
>        at
> org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
>        at
> org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
>        at
> org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
>        at
> org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
>        at
> org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
>        at
> org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
>        at
> org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
>        at
> org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
>        ... 33 more
>
>
> If you take Joe Bergmark's testcase from OWB-151, and make the bean
> @RequestScoped and the decorator abstract, you can generate the same
> backtrace.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

[jira] Updated: (OWB-231) exception using abstract decorators

Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gurkan Erdogdu updated OWB-231:
-------------------------------

    Fix Version/s:     (was: M4)
                   1.0.0

> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.0.0
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:
> Caused by: java.lang.InstantiationException
> 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
> 	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
> 	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
> 	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
> 	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	... 33 more
> If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OWB-231) exception using abstract decorators

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868681#action_12868681 ] 

Joe Bergmark commented on OWB-231:
----------------------------------

Unfortunately this turns out to be a bit more complicated than I had originally hoped.

WebBeansDecorator.createInstance calls down into Context.get to create an instance of the Decorator.  Eventually that bubbles down into ManagedBean.createComponentInstance().  From inside ManagedBean we don't know that this bean we are trying to create is a Decorator.

It does appear that we can query the the "returnType" from the super class (AbstractOwbBean) and determine that the class is abstract (returnType.getModifiers()).

I'm just not sure where the right place is to create the proxy.  Is there anything (other than supporting Abstract) that differentiates Decorators from normal ManagedBeans?  Would it make sense to add a new type?

> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Joe Bergmark
>             Fix For: 1.0.0
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:
> Caused by: java.lang.InstantiationException
> 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
> 	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
> 	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
> 	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
> 	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	... 33 more
> If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OWB-231) exception using abstract decorators

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866737#action_12866737 ] 

Joe Bergmark commented on OWB-231:
----------------------------------

I was taking a look at this again and noticed an interesting side affect.

If the Decorator itself is normal scoped (which is non-portable behavior, and not recommended), then this doesn't blow up.  I believe that is because when we create the instance of the Decorator we actually get back a proxy which fully implements the interface (and isn't abstract).  Later in DelegateHandler.invoke, if the method exists in the abstract class it gets called on the proxy and works.

If I'm right, then perhaps a simple solution would be to create a proxy class during the call to WebBeansDecorator.createInstance() if the Decorator is Abstract.  I'll give this a shot in the next couple of days and see if it solves the problem.


> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.0.0
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:
> Caused by: java.lang.InstantiationException
> 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
> 	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
> 	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
> 	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
> 	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	... 33 more
> If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OWB-231) exception using abstract decorators

Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867144#action_12867144 ] 

Gurkan Erdogdu commented on OWB-231:
------------------------------------

Good solution!

> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Joe Bergmark
>             Fix For: 1.0.0
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:
> Caused by: java.lang.InstantiationException
> 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
> 	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
> 	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
> 	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
> 	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	... 33 more
> If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OWB-231) exception using abstract decorators

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark updated OWB-231:
-----------------------------

    Attachment: AbstractDecorator.patch

Attached is a patch that is working in my environment for a very simple Abstract Decorator testcase.

I was a little out of my comfort zone in the WebBeansAnnotatedUtil changes, so thought it might be worth having someone else take a look.

In the meantime I'll get some better unit tests knocked out, and plan on committing in the next day or two if there aren't any concerns.

> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Joe Bergmark
>             Fix For: 1.0.0
>
>         Attachments: AbstractDecorator.patch
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:
> Caused by: java.lang.InstantiationException
> 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
> 	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
> 	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
> 	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
> 	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	... 33 more
> If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OWB-231) exception using abstract decorators

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark reassigned OWB-231:
--------------------------------

    Assignee: Joe Bergmark  (was: Gurkan Erdogdu)

> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Joe Bergmark
>             Fix For: 1.0.0
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:
> Caused by: java.lang.InstantiationException
> 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
> 	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
> 	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
> 	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
> 	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	... 33 more
> If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OWB-231) exception using abstract decorators

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark resolved OWB-231.
------------------------------

    Resolution: Fixed

> exception using abstract decorators
> -----------------------------------
>
>                 Key: OWB-231
>                 URL: https://issues.apache.org/jira/browse/OWB-231
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: M3
>            Reporter: Eric Covener
>            Assignee: Joe Bergmark
>             Fix For: 1.0.0
>
>         Attachments: AbstractDecorator.patch
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> After r897450, abstract decorator classes are passed to Constructor.newInstance() and cause an exception:
> Caused by: java.lang.InstantiationException
> 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
> 	at org.apache.webbeans.inject.InjectableConstructor.doInjection(InjectableConstructor.java:87)
> 	at org.apache.webbeans.component.ManagedBean.createComponentInstance(ManagedBean.java:61)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:128)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:112)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:66)
> 	at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:150)
> 	at org.apache.webbeans.decorator.WebBeansDecorator.createInstance(WebBeansDecorator.java:244)
> 	at org.apache.webbeans.component.AbstractBean.create(AbstractBean.java:159)
> 	... 33 more
> If you take Joe Bergmark's testcase from OWB-151, and make the bean @RequestScoped and the decorator abstract, you can generate the same backtrace.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.