<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Principal: USERNAME and security context post-mapping roles=null
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/sebbay">Sebastian Bayerlein</a> in <i>JBoss Web Development</i> - <a href="http://community.jboss.org/message/547271#547271">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hey,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/>When calling an secured EJB from a servlet I get the following error. Has somebody an idea, what's the error? The servlet and the ejb are deployed in the same EAR.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/><span style="font-size: 8pt; font-family: courier new,courier; ">08:12:16,910 ERROR [SecurityInterceptor] Error in Security Interceptor<br/>java.lang.SecurityException: Denied: caller with subject=Betreff:<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Principal: USERNAME<br/> and security context post-mapping roles=null: ejbMethod=public abstract com.test.DBCheckRemote com.test.DBCheckHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityContext(SecurityInterceptor.java:368)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:243)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:205)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:187)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.TxInterceptorBMT.invokeHome(TxInterceptorBMT.java:71)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:148)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:136)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invokeHome(PreSecurityInterceptor.java:88)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:639)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.Container.invoke(Container.java:1046)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.run(LocalInvoker.java:158)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.security.AccessController.doPrivileged(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:177)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at $Proxy2660.create(Unknown Source)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.finec.b3.springbridge.service.impl.BapiServiceImpl.testSpring(BapiServiceImpl.java:424)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at $Proxy2659.testSpring(Unknown Source)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:181)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:112)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:117)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:47)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:275)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.security.AccessController.doPrivileged(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:307)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:167)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.security.AccessController.doPrivileged(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:275)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Best regards,</p><p>sebbay</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/547271#547271">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2112">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>