users@glassfish.java.net

Re: isUserInRole not working

From: <glassfish_at_javadesktop.org>
Date: Tue, 10 Mar 2009 23:51:12 PDT

After adding that the mapping dies as such -> I have attached my server log.

Caused by: java.lang.IllegalArgumentException: No mapping available for role reference noone
        at com.sun.ejb.containers.EJBContextImpl.isCallerInRole(EJBContextImpl.java:425)
        at server.ejbws.sayHello(ejbws.java:42)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
        ... 70 more

I have manually tried to add the group noone as below but nothing changes.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Java EE Application 5.0//EN" "http://www.sun.com/software/appserver/dtds/sun-application_5_0-0.dtd">
<sun-application>
  <security-role-mapping>
    <role-name>noone</role-name>
    <group-name>noone</group-name>
  </security-role-mapping>
  <realm>xyz</realm>
</sun-application>
[Message sent by forum member 'waynetg' (waynetg)]

http://forums.java.net/jive/thread.jspa?messageID=336251