Bug 1017436 - ejb-security-plus quickstart deploys, but the 'mvn exec:exec' fails with CNFE
Summary: ejb-security-plus quickstart deploys, but the 'mvn exec:exec' fails with CNFE
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
medium
Target Milestone: ER6
: EAP 6.2.0
Assignee: sgilda
QA Contact: Vladimir Rastseluev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 21:15 UTC by sgilda
Modified: 2017-10-10 00:08 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:48:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description sgilda 2013-10-09 21:15:22 UTC
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 23:15:16 UTC
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 23:52:32 UTC
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 11:51:03 UTC
Checked on EAP 6.2.0 ER5.1. Bug remains.

Comment 4 sgilda 2013-10-10 20:40:30 UTC
This fix is for ER6.

Comment 5 Vladimir Rastseluev 2013-10-18 10:41:36 UTC
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.