Issue Details (XML | Word | Printable)

Key: GLASSFISH-20312
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: phil.zampino
Reporter: saradak
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
glassfish

com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/* cts tests are failing when running imq.xml target in CTS.

Created: 15/Apr/13 06:35 PM   Updated: 25/Apr/13 07:56 PM   Resolved: 19/Apr/13 08:28 PM
Component/s: cdi
Affects Version/s: 4.0_b84_RC1
Fix Version/s: 4.0

Time Tracking:
Not Specified

Tags:
Participants: arjavdesai, David Zhao, jjsnyder83, marina vatkina, phil.zampino, saradak and shreedhar_ganapathy


 Description  « Hide

com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/ CTS tests are failing when run imq.xml target in CTS.

steps to reproduce the problem:

1. Download CTS bundle & internal bundle.
2. Follow the CTS instructions to set the variables.
3. cd $TS_HOME/bin
4. Run ant -f imq.xml smoke (this target runs all jms related tests across the CTS bundle).

Tests results are not consistent.
com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/ tests are failing in the test run. Test prints "Fail: we didnt get the expected msg back!" error.



marina vatkina added a comment - 15/Apr/13 06:51 PM

Let's start with the jms container. The MDB container just reacts to the invocations


David Zhao added a comment - 16/Apr/13 07:42 AM - edited

Marina,

This doesn't seem to be JMS issue. The message sending/receiving is fine.

When debugging the failed CTS cases, I observed something interesting with the interceptor. If putting breakpoint in @AroundInvoke InterceptorMDB1.intercept1(InvocationContext ctx), I can see InvocationContext ctx is org.jboss.weld.interceptor.proxy.InterceptorInvocationContext@76cad8,

ctx.parameters is [EjbInvocation componentId=mdb_interceptor_listener_annotated_mdb_interceptor_listener_annotated_ejb.jar_AroundInvokeBean_MDB_QUEUE89528542497144832,isLocal=false,isRemote=false,isBusinessInterface=false,isWebService=false,isMessageDriven=true,isHome=false,clientInterface=null,method=public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message),ejb=com.sun.ts.tests.ejb30.bb.mdb.interceptor.listener.annotated.AroundInvokeBean@7dc937,exception=null,exceptionFromBeanMethod=null,invId=0,wasCancelCalled=false,yetToSubmitStatus=true]

ctx.method is protected void com.sun.ts.tests.ejb30.common.interceptor.AroundInvokeTestMDBImpl.getMethodTest(javax.interceptor.InvocationContext)

But ctx.method is expected to be onMessage and ctx.parameters is expected to javax.jms.Message because the interceptor is on MDB (Refer to http://docs.oracle.com/javaee/6/api/javax/interceptor/InvocationContext.html).

ctx.target and ctx.contextData might have the same problem too.

Let's firstly make the InvocationContext carrying correct values then check the CTS cases again.


saradak added a comment - 16/Apr/13 02:40 PM

These failures can be easily produced by just running ejb30/bb/mdb tests.

cd $TS_HOME/bin/
$TS_HOME/tools/ant/bin/ant config.vi.javadb
cd $TS_HOME/src/com/sun/ts/tests/ejb30/bb/mdb

$TS_HOME/tools/ant/bin/ant runclient


saradak added a comment - 16/Apr/13 05:26 PM

I have run the same tests with b84-04_10_2013 build & b85-04_15_2013 nightly build.
Few observations when running with both the builds.

b84-04_10_2013
----------------

1. Following tests failed when run the tests as it is:

FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/fullpath/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/jarwar/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/onejar/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/optional/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/optional2/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#orderTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#sameInvocationContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#orderTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#sameInvocationContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#sameSecContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#sameSecContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/listenerintf/implementing/externalizable/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/listenerintf/implementing/serializable/Client.java#test1

2. All tests passed after I put com/sun/ts/tests/ejb30/bb/mdb/customlistener/Client.java#isPostConstructCalledTest
in the CTS exclude list.

b85-04_15_2013
----------------
1. Following tests failed when run the tests as it is:

FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/fullpath/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/jarwar/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/onejar/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/optional/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/optional2/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#orderTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#sameInvocationContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#orderTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#sameInvocationContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#sameSecContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/annotated/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#sameSecContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/method/descriptor/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/listenerintf/implementing/externalizable/Client.java#test1

2. Following tests failed after putting the test com/sun/ts/tests/ejb30/bb/mdb/customlistener/Client.java#isPostConstructCalledTest in exclude list.

FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#orderTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#sameInvocationContextTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#setParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getBeanTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getContextDataTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#orderTest


marina vatkina added a comment - 16/Apr/13 06:20 PM

Does the test pass if you disable CDI scanning?


saradak added a comment - 16/Apr/13 07:41 PM


I have been using default glassfish settings. What should I set to disable CDI scanning?


marina vatkina added a comment - 16/Apr/13 10:00 PM

asadmin create-module-config cdi-service
asadmin set configs.config.server-config.cdi-service.enable-implicit-cdi=false


marina vatkina added a comment - 17/Apr/13 06:43 PM

the MDB was always receiving five messages, and those mesages arrived at the queue at right time, so the QueueReceiver.recieveNoWait() call consumed those messages, now with latest builds the messages arrive late and hence we see this problem.


saradak added a comment - 17/Apr/13 10:40 PM

I ran the ejb30/bb/mdb tests after CTS test fixes but still seeing 6 test failures. we should address the issue that David mentioned in the bug report regarding interceptor failures.

FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/fullpath/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/dest/jarwar/Client.java#test1
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/annotated/Client.java#getParametersTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getMethodTest
FAILED........com/sun/ts/tests/ejb30/bb/mdb/interceptor/listener/descriptor/Client.java#getParametersTest


marina vatkina added a comment - 17/Apr/13 10:46 PM

Assigning to CDI team to investigate wrong invocation types from Weld


jjsnyder83 added a comment - 18/Apr/13 01:20 AM

Phil is already looking into this.


phil.zampino added a comment - 19/Apr/13 04:20 AM

I've raised this issue with Weld, since it appears that they are not propagating InvocationContext parameters correctly.


shreedhar_ganapathy added a comment - 19/Apr/13 03:29 PM

Any chance of getting the fix before next promoted build ? i.e wed 24th?
RC testing is beginning and we need fixes to go in before that.


arjavdesai added a comment - 19/Apr/13 08:28 PM

Most of the issues reported at the start are fixed in latest glassfish build. The reminder of issues are being tracked by http://java.net/jira/browse/GLASSFISH-20359 so resolving this one.