Bug 1028986 - shopping-cart qiuckstart not working
Summary: shopping-cart qiuckstart not working
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Quickstarts
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: CR2
: EAP 6.2.0
Assignee: sgilda
QA Contact: Nikoleta Hlavickova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-11 12:24 UTC by Nikoleta Hlavickova
Modified: 2017-10-10 00:16 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:22:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nikoleta Hlavickova 2013-11-11 12:24:42 UTC
Build and deployment of the QS work fine.

When trying to run the client application with command "mvn exec:java -f client/pom.xml" this error is logged in server console:

13:01:29,643 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 7) JBAS014134: EJB Invocation failed on component ShoppingCartBean for method public abstract java.util.HashMap org.jboss.as.quickstarts.sfsb.ShoppingCart.getCartContents(): javax.ejb.NoSuchEJBException: JBAS014300: Could not find EJB with id {[-16, -4, -74, 38, 73, -112, 68, -23, -82, -1, -58, 117, -118, 122, -90, 55]}
	at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:63) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:272) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:339) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:329) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203) [jboss-as-ejb3-7.3.0.Final-redhat-10.jar:7.3.0.Final-redhat-10]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_26]
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_26]
	at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_26]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122)


Client console output is different from the one in README too. Expected result can be found in README, actual output is:

Nov 11, 2013 1:01:29 PM org.jboss.ejb.client.EJBClient <clinit>
INFO: JBoss EJB Client version 1.0.23.Final-redhat-1
Nov 11, 2013 1:01:29 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA-redhat-1
Nov 11, 2013 1:01:29 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA-redhat-1
Nov 11, 2013 1:01:29 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.17.GA-redhat-1
Nov 11, 2013 1:01:29 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: EJBCLIENT000017: Received server version 2 and marshalling strategies [river]
Nov 11, 2013 1:01:29 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@7dbd9d76, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@4f549ceb,channel=jboss.ejb,nodename=d02-0105a]} on channel Channel ID e5f0c447 (outbound) of Remoting connection 2e39d325 to localhost/127.0.0.1:4447

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Obtained the remote interface to the shopping cart
Buying a "JBoss Enterprise Application Platform 6"
Buying another "JBoss Enterprise Application Platform 6"
Buying a "JBoss SOA Platform 6"

Print cart:
1     JBoss SOA Platform 6
2     JBoss Enterprise Application Platform 6

Checkout
ERROR: Cannot access cart after Checkout!
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Comment 1 sgilda 2013-11-11 14:34:35 UTC
It appears this didn't work in EAP 6.1.1 GA either. I need to investigate further.

Comment 2 sgilda 2013-11-11 14:43:49 UTC
EAP 6.1.0 GA didn't work either.

Comment 3 sgilda 2013-11-11 14:49:57 UTC
Adding Serge Pagop to the bug since he's the owner and may know what is wrong.

Comment 4 Nikoleta Hlavickova 2013-11-11 15:30:49 UTC
Please fix also this inconsistency:

README says:
The client sends a remote method invocation to the stateful session bean to buy two Memory sticks and one MacBook Air Laptop

Log (also in README) says:
Buying a "JBoss Enterprise Application Platform 6"
Buying another "JBoss Enterprise Application Platform 6"
Buying a "JBoss SOA Platform 6"

Print cart:
1     JBoss SOA Platform 6
2     JBoss Enterprise Application Platform 6

Comment 5 John Doyle 2013-11-11 17:19:10 UTC
Did we ship with 6.1 or did we hold this QS back from that release?

Comment 6 sgilda 2013-11-11 17:57:22 UTC
John, we shipped this one with every release. I don't believe the bug was discovered until now. 

Wolf is looking at it now for me. If he doesn't have time to figure it out, Rafael volunteered to look at this one.

Comment 7 wfink 2013-11-11 18:16:59 UTC
The behaviour is correct so far, the messages might changed due to the different releases.
I've changed the logging output of the client demo and replace the ERROR message with a message that this Exception is expected.
Also add comments to the README.

See PR https://github.com/wfink/jboss-eap-quickstarts/pull/1

Comment 8 sgilda 2013-11-11 19:35:17 UTC
This quickstart was confusing. The the checkout() method in the session bean is annotated with @Remove, so the bean is removed by the container after checkout. 

The console displayed "ERROR: Cannot access cart after Checkout!", when actually the cart was successully removed, as expected. The 'NoSuchEJBException' in the server log verified that the EJB was removed, again an expected result.

Wolf changed the messaging and updated the instructions to make it cleared. I did a few minor edits to make the cart contents consistent and to make the results a bit more obvious as well. 

Fix is in this commit:
https://github.com/jboss-developer/jboss-eap-quickstarts/commit/00b3b9167d560af0cf12e893c5b8dc7712991964

Comment 9 Pete Muir 2013-11-11 20:30:14 UTC
I would propose this is not a blocker as this was a case of the user not correctly understanding the instructions :-) The quickstart instructions clearly state you should expect to see an exception.

Setting blocker flag to empty (let's see if that works).

However, as exceptions, even those that are intended, can frighten people, I do think making it doubly clear it's expected will help. But I would suggest no need to apply this to EAP 6.2.0.GA, if we are close to a deadline.

Comment 10 sgilda 2013-11-11 20:33:39 UTC
I checked with Paul and these changes will make the CR1 build. :-)

Comment 11 sgilda 2013-11-11 22:57:32 UTC
Brian Stansberry checked in a few updates with this commit: 

https://github.com/jboss-developer/jboss-eap-quickstarts/commit/ce414a153d629b1e7c7df7d02359ca2c1a183b95

Comment 12 sgilda 2013-11-11 23:00:21 UTC
Ignore the above comment. It's for another bug.

Comment 13 Nikoleta Hlavickova 2013-11-15 10:50:35 UTC
(In reply to sgilda from comment #8)
> I did a few minor edits to make the cart contents consistent 

The new sentence is a bit weird:
The client sends a remote method invocation to the stateful session bean to buy two copies of “JBoss Enterprise Application Platform 6” and one copy of “JBoss SOA Platform 6”.

I suggest replacing "copy/copies" by "subscription/subscriptions" if we want to leave this example with buying JBoss EAP and SOA Platform. Maybe some different kind of good would be better in next release but this is the easiest fix at the moment.

I am lowering the severity as the main issue is fixed and this is only a minor one.

Comment 14 sgilda 2013-11-15 19:57:50 UTC
Changed it to read: The client sends a remote method invocation to the stateful session bean to buy two "JBoss Enterprise Application Platform 6" subscriptions and one "JBoss SOA Platform 6" subscription.

Fixed in this commit: https://github.com/jboss-developer/jboss-eap-quickstarts/commit/37c46e4e8dbfc4ec8041161fa0b3d8f1a8db6695

Comment 15 Nikoleta Hlavickova 2013-11-20 13:47:30 UTC
Verified for EAP 6.2.0 CR2


Note You need to log in before you can comment on or make changes to this bug.