• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Glassfish @Runas exception

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm getting an exception trying to run my code with @runAs. I"ve got a remote client which calls RunAsSecurityBeanImpl bean. In RunAsSecurityBeanImpl bean i've injected PrintRoleBean with @EJB just to see which princple is used. My glassfish contains the roles needed which is manager.I've googled the exception but I haven't found an answer to why an exception is raised. Running my remote client I get the following exception:


This is the code for the remote client:


The remote interface for RunAsSecurityBeanImpl:




The injected bean in RunAsSecurityBeanImpl:


I've added the roles in glassfish-web.xml:


 
Creator of Enthuware JWS+ V6
Posts: 3412
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Josip

The error doesn't really ring a bell to me other than that you are using a file realm to store your Principals and Principal Groups and it seems your appserver has a problem reading that file.

Did you try everything without security enabled? Did you try using a Servlet and a login-form?

Why did you add the Principal mapping in the glassfish-web.xml instead of sun-ejb-jar.xml in the META-INF directory of your EJB project?

Regards,
Frits
reply
    Bookmark Topic Watch Topic
  • New Topic