Bug 1017436 - ejb-security-plus quickstart deploys, but the 'mvn exec:exec' fails with CNFE
ejb-security-plus quickstart deploys, but the 'mvn exec:exec' fails with CNFE
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Quickstarts (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity medium
: ER6
: EAP 6.2.0
Assigned To: sgilda
Vladimir Rastseluev
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 17:15 EDT by sgilda
Modified: 2014-01-12 19:22 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-15 11:48:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description sgilda 2013-10-09 17:15:22 EDT
Description of problem:


The ejb-security-plus quickstart deploys successfully. However, the 'mvn exec:exec' fails.

In the master branch it fails with: 

java.lang.ClassNotFoundException:
org.jboss.as.controller.security.SubjectUserInfo from [Module "deployment.jboss-ejb-security-plus.jar:main" from Service Module Loader]

In the 6.2.x branch it fails with:

java.lang.ClassNotFoundException:
org.jboss.as.core.security.SubjectUserInfo from [Module "deployment.jboss-ejb-security-plus.jar:main" from Service Module Loader]

There must be packange name differences.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 sgilda 2013-10-09 19:15:16 EDT
I applied Rafael's fixes from this pull to get past the ClassNotFoundException:

https://github.com/sgilda/jboss-as-quickstart/pull/1/files

* Updated the POM to use <version.jboss.as>7.3.0.Final-redhat-8</version.jboss.as>
* Modified the jboss-deployment-structure.xml to add this dependency: <module name="org.jboss.as.core-security" />


However, now I get this error:

Exception in thread "main" javax.ejb.EJBAccessException: JBAS014502: Invocation on method: public abstract java.lang.String org.jboss.as.quickstarts.ejb_security_plus.SecuredEJBRemote.getPrincipalInformation() of bean: SecuredEJB is not allowed
	at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:114)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:81)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)
	at org.jboss.as.quickstarts.ejb_security_plus.ServerSecurityInterceptor.aroundInvoke(ServerSecurityInterceptor.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.as.ejb3.component.ContainerInterceptorMethodInterceptorFactory$ContainerInterceptorMethodInterceptor.processInvocation(ContainerInterceptorMethodInterceptorFactory.java:91)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
	at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:329)
	at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70)
	at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
	at org.jboss.threads.JBossThread.run(JBossThread.java:122)
	at ...asynchronous invocation...(Unknown Source)
	at org.jboss.ejb.client.remoting.InvocationExceptionResponseHandler$MethodInvocationExceptionResultProducer.getResult(InvocationExceptionResponseHandler.java:99)
	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:272)
	at org.jboss.as.quickstarts.ejb_security_plus.ClientSecurityInterceptor.handleInvocationResult(ClientSecurityInterceptor.java:44)
	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:274)
	at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocationResult(EJBObjectInterceptor.java:64)
	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:274)
	at org.jboss.ejb.client.EJBHomeInterceptor.handleInvocationResult(EJBHomeInterceptor.java:88)
	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:274)
	at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:46)
	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:274)
	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:129)
	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:262)
	at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:437)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:202)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)
	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)
	at $Proxy0.getPrincipalInformation(Unknown Source)
	at org.jboss.as.quickstarts.ejb_security_plus.RemoteClient.main(RemoteClient.java:43)
Comment 2 sgilda 2013-10-09 19:52:32 EDT
Turns out there was a typo in the user password in the readme. I used copy/paste, so of course it didn't work.

This is fixed in this pull: https://github.com/jboss-developer/jboss-eap-quickstarts/pull/662
Comment 3 Vladimir Rastseluev 2013-10-10 07:51:03 EDT
Checked on EAP 6.2.0 ER5.1. Bug remains.
Comment 4 sgilda 2013-10-10 16:40:30 EDT
This fix is for ER6.
Comment 5 Vladimir Rastseluev 2013-10-18 06:41:36 EDT
Verified on EAP 6.2.0 ER6. There is no ejb-security=plus quickstart example anymore.

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