geronimo-iia / winstone

Winstone is a servlet container that was written out of a desire to provide servlet functionality without the bloat that full J2EE compliance introduces.
GNU Lesser General Public License v2.1
22 stars 3 forks source link

When using FileRealm, the program throws a ClassCastException #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run servlet with 
--realmClassName=net.winstone.core.authentication.realm.FileRealm on the 
command line
2. Will get an error message that says: "Authentication disabled - couldn't 
load authentication handler: 
net.winstone.core.authentication.BasicAuthenticationHandler or realm: 
net.winstone.core.authentication.realm.FileRealm" along with a stack trace
3. At the bottom of that stack trace you will see: "Caused by: 
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to 
[Ljava.lang.String;
    at net.winstone.core.authentication.realm.FileRealm.<init>(FileRealm.java:97)
    ... 13 more"

The code does seem wrong (line 97 in FileRealm.java)... without telling the 
toArray method what class to use, the return will be Object[] and not String[].

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by sgarbar...@sciforma.com on 21 Mar 2014 at 9:31

GoogleCodeExporter commented 9 years ago
fix comming...

Did you want to commit on this project ?

Original comment by jguibert@gmail.com on 4 Apr 2014 at 3:36

GoogleCodeExporter commented 9 years ago
Commited on trunk.

Original comment by jguibert@gmail.com on 7 Apr 2014 at 8:42