[jira] [Created] (OWB-1220) URL-encoding issue in AbstractMetaDataDiscovery

2017-11-20 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-1220:


 Summary: URL-encoding issue in AbstractMetaDataDiscovery
 Key: OWB-1220
 URL: https://issues.apache.org/jira/browse/OWB-1220
 Project: OpenWebBeans
  Issue Type: Bug
Affects Versions: 2.0.2, 1.7.4
Reporter: Harald Wellmann


h3. Scenario

I have a certain integration test using OWB and DeltaSpike which fails when the 
working directory contains a '+' character and passes otherwise.

What's worse, the failure only occurs when running the test under Maven 
Surefire, it does not occur when running the test from my IDE.

h3. Analysis

Maven Surefire by default builds a manifest-only JAR defining a classpath as as 
list of URLs, e.g.

{noformat}
Class-Path: ... file:/home/hwellmann/work/ops4j/org.ops4j.pax.e
 xam2/itest/cdi/src/it/regression%2bdeltaspike/target/test-classes/ ...
{noformat}

The following snippet from {{AbstractMetaDataDiscovery.registerBeanArchives()}}

{code}
Iterator cpIt = classPathUrls.iterator(); 
while (cpIt.hasNext())
{
URL cpUrl = cpIt.next();
if (beansXml.startsWith(stripProtocol(cpUrl.toExternalForm(
{
cpIt.remove();
addDeploymentUrl(beansXml, cpUrl);
break;
}
}
{code}

does not behave as expected as can be seen from the following log output:

{noformat}
11:48:21.234 [main] INFO  o.a.w.c.s.AbstractMetaDataDiscovery - added beans 
archive URL: 
file:/home/hwellmann/work/ops4j/org.ops4j.pax.exam2/itest/cdi/src/it/regression%2bdeltaspike/target/test-classes/META-INF/beans.xml
11:48:21.252 [main] INFO  o.a.w.c.s.AbstractMetaDataDiscovery - added beans 
archive URL: 
file:/home/hwellmann/work/ops4j/org.ops4j.pax.exam2/itest/cdi/src/it/regression+deltaspike/target/test-classes
{noformat}

A classpath element containing a {{beans.xml}} is *not* removed from the 
classpath, since the path prefix does not match due to varying encoding (i.e. 
{{regression%2bdeltaspike}} vs. {{regression-deltaspike}}).

By the way, the log message "added beans archive URL" seems to be left 
unchanged since CDI 1.0. It would be helpful if the message indicated the 
difference between explicit and implicit bean archives. This is only mentioned 
in the inline comments in the source code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1061) Surplus and missing @Initialized and @Destroyed events

2015-05-25 Thread Harald Wellmann (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558485#comment-14558485
 ] 

Harald Wellmann commented on OWB-1061:
--

Hmmm... Retested with rev 1681576: Now {{@Initialized}} is observed once and 
{{@Destroyed}} is observed three times.

> Surplus and missing @Initialized and @Destroyed events
> --
>
> Key: OWB-1061
> URL: https://issues.apache.org/jira/browse/OWB-1061
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Lifecycle
>Affects Versions: 1.5.0
>Reporter: Harald Wellmann
>Assignee: Reinhard Sandtner
> Fix For: 1.6.0
>
> Attachments: lifecycle-event.zip
>
>
> h3. Scenario
> There is a bean with two observer methods observing 
> {{@Initialized(ApplicationScoped.class)}} and 
> {{@Destroyed(ApplicationScoped.class)}} in a stand-alone CDI container 
> launched via {{deltaspike-cdictrl-owb}}, for lack of a native OWB API.
> The container is started and stopped as follows:
> {code}
> CdiContainer container = CdiContainerLoader.getCdiContainer();
> container.boot();
> container.getContextControl().startContexts();
> container.getContextControl().stopContexts();
> container.shutdown();
> {code}
> h3. Expected behaviour
> The {{@Initialized}} and {{@Destroyed}} events are observed once each, in 
> this order.
> (Weld 2.2.11.Final does behave as expected, both via 
> {{deltaspike-cdictrl-weld}}, and using the native Weld SE API.)
> h3. Actual behaviour
> The {{@Initialized}} event is observed three times, twice on startup, once on 
> shutdown. The {{@Destroyed}} event is not observed at all.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OWB-1065) Incorrect matching of parameterized events

2015-05-25 Thread Harald Wellmann (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558482#comment-14558482
 ] 

Harald Wellmann commented on OWB-1065:
--

Yes - test passed! (rev 1681576)

> Incorrect matching of parameterized events
> --
>
> Key: OWB-1065
> URL: https://issues.apache.org/jira/browse/OWB-1065
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Events
>Affects Versions: 1.5.0
>Reporter: Harald Wellmann
>Assignee: Mark Struberg
> Fix For: 1.6.0
>
> Attachments: OWB-1065.zip
>
>
> h3. Scenario
> An event fired by
> {code}
> @Inject
> private Event> event;
> {code}
> is observed by
> {code}
> void observeWildcardNumberList(@Observes List numbers);
> void observeNumberList(@Observes List numbers);
> void observeIntegerList(@Observes List numbers);
> {code}
> h3. Expected behaviour
> {{observeWildcardNumberList()}} and {{observeIntegerList()}} get triggered, 
> {{observeNumberList()}} does not get triggered.
> h3. Actual behaviour
> All three observer methods get triggered.
> This looks like a missing test case for the TCK.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OWB-1066) Stack overflow on firing parameterized event

2015-05-25 Thread Harald Wellmann (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558477#comment-14558477
 ] 

Harald Wellmann commented on OWB-1066:
--

Looks good now! (rev 1681576)

> Stack overflow on firing parameterized event
> 
>
> Key: OWB-1066
> URL: https://issues.apache.org/jira/browse/OWB-1066
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Events
>Affects Versions: 1.5.0
>Reporter: Harald Wellmann
>Assignee: Mark Struberg
> Fix For: 1.6.0
>
>
> Firing {{Arrays.asList(1, 4, 9, 16)}} as an event of type {{List}} 
> results in a stack overflow:
> {noformat}
> javax.enterprise.event.ObserverException: Caught Exception while handling 
> event object with type : java.lang.Object
>   at 
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:641)
>   at 
> org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:481)
>   at 
> org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:466)
>   at 
> org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:456)
>   at 
> org.apache.webbeans.lifecycle.StandaloneLifeCycle.afterStartApplication(StandaloneLifeCycle.java:62)
>   at 
> org.apache.webbeans.lifecycle.AbstractLifeCycle.bootstrapApplication(AbstractLifeCycle.java:141)
>   at 
> org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:104)
>   at 
> org.apache.deltaspike.cdise.owb.OpenWebBeansContainerControl.boot(OpenWebBeansContainerControl.java:68)
>   at 
> demo.LifecycleEventTest.shouldNotFireInitializedTwice(LifecycleEventTest.java:34)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:497)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>   at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: org.apache.webbeans.exception.WebBeansException: 
> java.lang.reflect.InvocationTargetException
>   at 
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:314)
>   at 
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:610)
>   ... 31 more
> Caused by: java.lang.reflect.InvocationTargetException
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:497)
>   at 
> org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:343)
>   at 
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:308)
>   ... 32 more
> Caused by: java.lang.StackOverflowError
>   at java.lang.Class.getInterfaces(Class.java:845)
>   at 
> org.apache.webbeans.util.GenericsUtil.getDirectSubclass(Gen

[jira] [Created] (OWB-1066) Stack overflow on firing parameterized event

2015-05-04 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-1066:


 Summary: Stack overflow on firing parameterized event
 Key: OWB-1066
 URL: https://issues.apache.org/jira/browse/OWB-1066
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Events
Affects Versions: 1.5.0
Reporter: Harald Wellmann


Firing {{Arrays.asList(1, 4, 9, 16)}} as an event of type {{List}} 
results in a stack overflow:

{noformat}
javax.enterprise.event.ObserverException: Caught Exception while handling event 
object with type : java.lang.Object
at 
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:641)
at 
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:481)
at 
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:466)
at 
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:456)
at 
org.apache.webbeans.lifecycle.StandaloneLifeCycle.afterStartApplication(StandaloneLifeCycle.java:62)
at 
org.apache.webbeans.lifecycle.AbstractLifeCycle.bootstrapApplication(AbstractLifeCycle.java:141)
at 
org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:104)
at 
org.apache.deltaspike.cdise.owb.OpenWebBeansContainerControl.boot(OpenWebBeansContainerControl.java:68)
at 
demo.LifecycleEventTest.shouldNotFireInitializedTwice(LifecycleEventTest.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.apache.webbeans.exception.WebBeansException: 
java.lang.reflect.InvocationTargetException
at 
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:314)
at 
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:610)
... 31 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:343)
at 
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:308)
... 32 more
Caused by: java.lang.StackOverflowError
at java.lang.Class.getInterfaces(Class.java:845)
at 
org.apache.webbeans.util.GenericsUtil.getDirectSubclass(GenericsUtil.java:1000)
at 
org.apache.webbeans.util.GenericsUtil.getDirectSubclass(GenericsUtil.java:1011)
at 
org.apache.webbeans.util.GenericsUtil.getDirectSubclass(GenericsUtil.java:1011)
at 
org.apache.webbeans.util.GenericsUtil.getDirectSubclass(GenericsUtil.java:1011)
at 
org.apache.webbeans.util.GenericsUtil.getDirectSubclass(GenericsUtil.java:1011)
{no

[jira] [Updated] (OWB-1065) Incorrect matching of parameterized events

2015-05-04 Thread Harald Wellmann (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Harald Wellmann updated OWB-1065:
-
Attachment: OWB-1065.zip

Attached testcase.

> Incorrect matching of parameterized events
> --
>
> Key: OWB-1065
> URL: https://issues.apache.org/jira/browse/OWB-1065
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Events
>Affects Versions: 1.5.0
>Reporter: Harald Wellmann
> Attachments: OWB-1065.zip
>
>
> h3. Scenario
> An event fired by
> {code}
> @Inject
> private Event> event;
> {code}
> is observed by
> {code}
> void observeWildcardNumberList(@Observes List numbers);
> void observeNumberList(@Observes List numbers);
> void observeIntegerList(@Observes List numbers);
> {code}
> h3. Expected behaviour
> {{observeWildcardNumberList()}} and {{observeIntegerList()}} get triggered, 
> {{observeNumberList()}} does not get triggered.
> h3. Actual behaviour
> All three observer methods get triggered.
> This looks like a missing test case for the TCK.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OWB-1065) Incorrect matching of parameterized events

2015-05-04 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-1065:


 Summary: Incorrect matching of parameterized events
 Key: OWB-1065
 URL: https://issues.apache.org/jira/browse/OWB-1065
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Events
Affects Versions: 1.5.0
Reporter: Harald Wellmann


h3. Scenario

An event fired by

{code}
@Inject
private Event> event;
{code}

is observed by

{code}
void observeWildcardNumberList(@Observes List numbers);

void observeNumberList(@Observes List numbers);

void observeIntegerList(@Observes List numbers);
{code}

h3. Expected behaviour

{{observeWildcardNumberList()}} and {{observeIntegerList()}} get triggered, 
{{observeNumberList()}} does not get triggered.

h3. Actual behaviour

All three observer methods get triggered.

This looks like a missing test case for the TCK.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (OWB-1061) Surplus and missing @Initialized and @Destroyed events

2015-04-27 Thread Harald Wellmann (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Harald Wellmann updated OWB-1061:
-
Attachment: lifecycle-event.zip

Ok, so here's a small sample.

> Surplus and missing @Initialized and @Destroyed events
> --
>
> Key: OWB-1061
> URL: https://issues.apache.org/jira/browse/OWB-1061
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Lifecycle
>Affects Versions: 1.5.0
>Reporter: Harald Wellmann
> Attachments: lifecycle-event.zip
>
>
> h3. Scenario
> There is a bean with two observer methods observing 
> {{@Initialized(ApplicationScoped.class)}} and 
> {{@Destroyed(ApplicationScoped.class)}} in a stand-alone CDI container 
> launched via {{deltaspike-cdictrl-owb}}, for lack of a native OWB API.
> The container is started and stopped as follows:
> {code}
> CdiContainer container = CdiContainerLoader.getCdiContainer();
> container.boot();
> container.getContextControl().startContexts();
> container.getContextControl().stopContexts();
> container.shutdown();
> {code}
> h3. Expected behaviour
> The {{@Initialized}} and {{@Destroyed}} events are observed once each, in 
> this order.
> (Weld 2.2.11.Final does behave as expected, both via 
> {{deltaspike-cdictrl-weld}}, and using the native Weld SE API.)
> h3. Actual behaviour
> The {{@Initialized}} event is observed three times, twice on startup, once on 
> shutdown. The {{@Destroyed}} event is not observed at all.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OWB-1061) Surplus and missing @Initialized and @Destroyed events

2015-04-27 Thread Harald Wellmann (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514559#comment-14514559
 ] 

Harald Wellmann commented on OWB-1061:
--

I was going to attach a test case, but I don't have permissions to do so - is 
that intentional?

> Surplus and missing @Initialized and @Destroyed events
> --
>
> Key: OWB-1061
> URL: https://issues.apache.org/jira/browse/OWB-1061
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Lifecycle
>Affects Versions: 1.5.0
>Reporter: Harald Wellmann
>
> h3. Scenario
> There is a bean with two observer methods observing 
> {{@Initialized(ApplicationScoped.class)}} and 
> {{@Destroyed(ApplicationScoped.class)}} in a stand-alone CDI container 
> launched via {{deltaspike-cdictrl-owb}}, for lack of a native OWB API.
> The container is started and stopped as follows:
> {code}
> CdiContainer container = CdiContainerLoader.getCdiContainer();
> container.boot();
> container.getContextControl().startContexts();
> container.getContextControl().stopContexts();
> container.shutdown();
> {code}
> h3. Expected behaviour
> The {{@Initialized}} and {{@Destroyed}} events are observed once each, in 
> this order.
> (Weld 2.2.11.Final does behave as expected, both via 
> {{deltaspike-cdictrl-weld}}, and using the native Weld SE API.)
> h3. Actual behaviour
> The {{@Initialized}} event is observed three times, twice on startup, once on 
> shutdown. The {{@Destroyed}} event is not observed at all.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OWB-1061) Surplus and missing @Initialized and @Destroyed events

2015-04-27 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-1061:


 Summary: Surplus and missing @Initialized and @Destroyed events
 Key: OWB-1061
 URL: https://issues.apache.org/jira/browse/OWB-1061
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Lifecycle
Affects Versions: 1.5.0
Reporter: Harald Wellmann


h3. Scenario

There is a bean with two observer methods observing 
{{@Initialized(ApplicationScoped.class)}} and 
{{@Destroyed(ApplicationScoped.class)}} in a stand-alone CDI container launched 
via {{deltaspike-cdictrl-owb}}, for lack of a native OWB API.

The container is started and stopped as follows:

{code}
CdiContainer container = CdiContainerLoader.getCdiContainer();
container.boot();
container.getContextControl().startContexts();
container.getContextControl().stopContexts();
container.shutdown();
{code}

h3. Expected behaviour

The {{@Initialized}} and {{@Destroyed}} events are observed once each, in this 
order.

(Weld 2.2.11.Final does behave as expected, both via 
{{deltaspike-cdictrl-weld}}, and using the native Weld SE API.)

h3. Actual behaviour

The {{@Initialized}} event is observed three times, twice on startup, once on 
shutdown. The {{@Destroyed}} event is not observed at all.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OWB-897) Interceptors do not work on processed injection targets

2013-09-08 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-897:
---

 Summary: Interceptors do not work on processed injection targets
 Key: OWB-897
 URL: https://issues.apache.org/jira/browse/OWB-897
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Interceptor and Decorators
Affects Versions: 1.2.0
Reporter: Harald Wellmann


I have a portable extension which processes injection targets and replaces them 
with a custom implementation of javax.enterprise.inject.spi.InjectionTarget.

This breaks interceptors on beans injected into beans which are processed 
injection targets. The injected contextual references are missing the expected 
proxy.

The following code snippets look suspicious:

org.apache.webbeans.component.InjectionTargetBean.defineBeanInterceptorStack():

if (this instanceof InterceptedMarker && getInjectionTarget() 
instanceof InjectionTargetImpl) { ... }
.
This means that interceptors only get processed if the injection target is an 
instance of InjectionTargetImpl, which does not cover the case of a custom 
injection target provided by a portable extension.

org.apache.webbeans.container.InjectionTargetFactoryImpl.createInjectionTarget(Bean):

This method directly returns the injection target processed by the extension. 
This target should probably be wrapped by OWB's own implementation to make 
interceptors work.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (OWB-860) Type variable not bound in generic bean type

2013-05-12 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-860:
---

 Summary: Type variable not bound in generic bean type
 Key: OWB-860
 URL: https://issues.apache.org/jira/browse/OWB-860
 Project: OpenWebBeans
  Issue Type: Bug
Affects Versions: 1.2.0
Reporter: Harald Wellmann


The following test fails with OWB 1.2.0:

https://github.com/jboss/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/ManagedBeanTypesTest.java

The GriffonVulture bean reports a bean type of Animal instead of 
Animal.

NOTE: The test is from the CDI 1.1 TCK, but I don't see why it shouldn't run on 
CDI 1.0. I'm running the test in an OSGi environment with Pax CDI, so the 
problem might be caused by my non-standard OWB setup, but I think this is 
unlikely, seeing that the other 4 bean types are correct.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (OWB-719) @Named qualifier is not adhering to CDI spec default naming conventions

2012-11-12 Thread Harald Wellmann (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Harald Wellmann updated OWB-719:


Affects Version/s: 1.1.6

> @Named qualifier is not adhering to CDI spec default naming conventions
> ---
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.1.3, 1.1.6
>Reporter: John D. Ament
>Assignee: Arne Limburg
>
> Using the following test case and producer methods, OWB cannot resolve this 
> bean until the third producer method.  All three work correctly in Weld.  As 
> noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
>   @Deployment
>   public static Archive createTestArchive() {
>   return 
> ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
>   .addAsManifestResource(EmptyAsset.INSTANCE, 
> "beans.xml");
>   }
>   
>   @Inject @Named("foo")
>   private String foo;
>   
>   @Test
>   public void testFoo() {
>   Assert.assertEquals("bobo", foo);
>   }
> }
> I tried the following producers, only the last worked (OWB not using method 
> name or JavaBeans naming conventions)
> @Produces @Named
>   public String getFoo() {
>   return "bobo";
>   }
>   @Produces @Named
>   public String foo() {
>   return "bobo";
>   }
>   @Produces @Named("foo")
>   public String foo() {
>   return "bobo";
>   }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (OWB-695) Cause missing in AnnotationDB$CrossReferenceException

2012-08-21 Thread Harald Wellmann (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Harald Wellmann updated OWB-695:


Attachment: AnnotationDB.patch

Simple patch that lists the unresolved annotation classes in the exception 
message.

{noformat}
Caused by: 
org.apache.webbeans.corespi.scanner.AnnotationDB$CrossReferenceException: 
cannot resolve annotations [org.jboss.test.audit.annotations.SpecVersion, 
org.jboss.test.audit.annotations.SpecAssertion]
{noformat}


> Cause missing in AnnotationDB$CrossReferenceException 
> --
>
> Key: OWB-695
> URL: https://issues.apache.org/jira/browse/OWB-695
> Project: OpenWebBeans
>  Issue Type: Improvement
>Affects Versions: 1.1.5
>Reporter: Harald Wellmann
>Priority: Minor
> Attachments: AnnotationDB.patch
>
>
> While trying to run a web profile TCK test on Tomcat 7, I had the following 
> stack trace in my Tomcat log:
> {noformat}
> Caused by: 
> org.apache.webbeans.corespi.scanner.AnnotationDB$CrossReferenceException: 
>   at 
> org.apache.webbeans.corespi.scanner.AnnotationDB.crossReferenceMetaAnnotations(AnnotationDB.java:177)
>   at 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery.crossReferenceBeans(AbstractMetaDataDiscovery.java:251)
> {noformat}
> This is not very helpful, as it does not mention the cause of the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (OWB-695) Cause missing in AnnotationDB$CrossReferenceException

2012-08-21 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-695:
---

 Summary: Cause missing in AnnotationDB$CrossReferenceException 
 Key: OWB-695
 URL: https://issues.apache.org/jira/browse/OWB-695
 Project: OpenWebBeans
  Issue Type: Improvement
Affects Versions: 1.1.5
Reporter: Harald Wellmann
Priority: Minor


While trying to run a web profile TCK test on Tomcat 7, I had the following 
stack trace in my Tomcat log:

{noformat}
Caused by: 
org.apache.webbeans.corespi.scanner.AnnotationDB$CrossReferenceException: 
at 
org.apache.webbeans.corespi.scanner.AnnotationDB.crossReferenceMetaAnnotations(AnnotationDB.java:177)
at 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery.crossReferenceBeans(AbstractMetaDataDiscovery.java:251)
{noformat}

This is not very helpful, as it does not mention the cause of the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (OWB-694) Misleading exception message "Wrong termination object"

2012-08-17 Thread Harald Wellmann (JIRA)
Harald Wellmann created OWB-694:
---

 Summary: Misleading exception message "Wrong termination object"
 Key: OWB-694
 URL: https://issues.apache.org/jira/browse/OWB-694
 Project: OpenWebBeans
  Issue Type: Bug
Affects Versions: 1.1.5
Reporter: Harald Wellmann
Priority: Trivial


While creating a customized {{WebBeansContext}} using a custom 
{{SingletonService}}, I hit the following exception:

{noformat}
Caused by: org.apache.webbeans.exception.WebBeansException: Wrong termination 
object.
at 
org.apache.webbeans.web.lifecycle.WebContainerLifecycle.getServletContext(WebContainerLifecycle.java:225)
 ~[openwebbeans-web-1.1.5.jar:1.1.5]
at 
org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:89)
 ~[openwebbeans-web-1.1.5.jar:1.1.5]
at 
org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer$1.call(OpenWebBeansCdiContainer.java:128)
 ~[classes/:na]
{noformat}

I believe this is trying to tell me that the argument to 
{{lifecycle.startApplication(obj)}} should be a ServletContext (it is currently 
null in my case).

But what is a "termination object" in {{startApplication()}} - maybe this 
exception string belongs to {{stopApplication()}}?

In any case, a message like "expected an instance of Foo" would be more helpful 
than "wrong object".


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (OWB-668) A dynamically specified ProcessInjectionTarget is never invoked

2012-07-21 Thread Harald Wellmann (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419862#comment-13419862
 ] 

Harald Wellmann commented on OWB-668:
-

Just ran into the same problem - this is currently a blocker for Pax CDI.

The issue seems to be fixed on trunk, a snapshot build of OpenWebBeans works 
for me. Will this fix be part of 1.1.5?

> A dynamically specified  ProcessInjectionTarget is never invoked
> 
>
> Key: OWB-668
> URL: https://issues.apache.org/jira/browse/OWB-668
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Injection and Lookup
>Reporter: Phil Oser
>Assignee: Gurkan Erdogdu
>
> If one replaces an injection target on the ProcessInjectionTarget event, the 
> replaced injection target is never called. This causes the Solder XML 
> configuration to fail.
> A test case that illustrates this is attached to 
> https://issues.apache.org/jira/browse/OWB-667 
> (testInvocationOfProcessInjectionTarget() ). It works with weld, but not in 
> Open Web Beans.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira