[EJB 3.0 Users] - Losing Credentials After Call to Method
by pcarrollnf
I am using JBoss 5.1.0.
1. I call a method that requires a role which the calling user is a member of. This call succeeds.
2. The next call is to a class that creates a JMS message and publishes the message. This call succeeds.
3. The next call is to the same method as in #1. However this time I receive an exception as in the following:
Caused by: javax.ejb.EJBAccessException: Caller unauthorized
| at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:199)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)
| at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)
| at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
| at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
| at $Proxy361.setDocumentStatus(Unknown Source)
I have narrowed it down to where I call:
TopicConnetion connection = myTopicFactory.createTopicConnection();
It appears that after that call, I lose the user credentials for the next method call. The class that produces the JMS factory, connection and session is a utility class and is not part of a persistent unit. Does that have anything to do with it? Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252410#4252410
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252410
15 years, 3 months
[JBoss Web Services Users] - running 'ant tests' with 3.2.0.GA fails
by karmst
I have installed 3.2.0.GA on top of jBoss 5.1.0.GA, and have bound it to address 192.168.174.144, so not localhost.
However, when I run 'ant tests' as the 2nd part of the install procedure, I get an error in the build:
[junit] Executing command: /opt/jboss/jboss-5.1.0.GA/bin/wsrunclient.sh junit.textui.TestRunner org.jboss.test.ws.jaxws.samples.webmethod.WebMethodTestCase
[junit] Process input stream:
[junit] Process error stream:
[junit] .E.E.E.E
[junit] Time: 0.749
[junit] There were 4 errors:
[junit] 1) testLegalAccess(org.jboss.test.ws.jaxws.samples.webmethod.WebMethodTestCase)org.jboss.ws.metadata.wsdl.WSDLException: Cannot connect to: http://localhost:8080/jaxws-samples-webmethod/TestService?wsdl
The build reports:
org.jboss.test.ws.jaxws.smoke.tools.WSRunClientTestCase FAILED
org.jboss.test.ws.management.recording.MemoryBufferRecorderTestCase FAILED
Any help would be appreciated.
The top of the build looks fine, and I know the variables are set correctly:
init:
[echo] integration.target=jboss510
tests-prepare:
[echo]
[echo] -----------------------------------------------
[echo] jboss.home = /opt/jboss/jboss-5.1.0.GA
[echo] excludesfile = /opt/jboss/jbossws-native-bin-dist/tests/resources/test-excludes-jboss510.txt
[echo] java.home = /usr/java/jdk1.6.0_12/jre
[echo] jboss.bind = 192.168.174.144
[echo] -----------------------------------------------
Thanks, Keith
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252409#4252409
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252409
15 years, 3 months