4

Has somebody an idea, why the getName() method of the UserPrincipal sometimes provides an empty String? Most of the time it returns the correct user name but not every time.

This behaviour does occur randomly. I can start the application, run the command and it works. The next time I start the application and run the command (exactly the same way as before!) it does not work.

Any ideas?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Marcus
  • 1,105
  • 2
  • 21
  • 35
  • Are all the locations of your app protected with a role? – Maurice Perry Mar 23 '10 at 14:22
  • Need more details, maybe a little example program. Are you using multi thread? – The Student Mar 23 '10 at 16:48
  • It seems that my problem is a little time-of-action-specific... I was using the request object from somewhere in my java classes (by using a static databean) and had the problem. Now I'm saving the URL direct in my databean at the beginning of a request and can therefore use it anytime I want. It works perfectly this way :) – Marcus Mar 29 '10 at 12:33
  • Could you give more details and code examples for the situation you just described as "using a static databean"? It's possible that that is the key to answering this question. – Dónal Boyle Mar 31 '10 at 17:11

1 Answers1

1

The part where you say, "...start the application and run the command..." is unclear.

What precisely are the steps involved?

HTTP is a text-based protocol. If you capture and observe the requests and responses, I am certain you would observe a difference to which the behavior could be attributed.

My suggestion is to gather more detailed information to point you in the direction of the solution.

shadit
  • 2,536
  • 1
  • 16
  • 21