Bug in bundled Application Server prohibits Acegi security integration

I am using JSC 2, Update 1 and have run into a problem trying to integrate Acegi security into my Web app. After some hours of frustration I have found that the problem apparently stems from a bug in the bundled Sun Application Server (version 8.2). If I deploy my application to Tomcat 5.5, the problem disappears.

The exception that occurs on the bundled Sun Application Server is:

java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken

For information about the appserver bug that causes this exception look at:

http://forums.java.net/jive/thread.jspa?threadID=13150&messageID=83666

The last three entries in the above thread discuss the problem and also link to other places where the problem is discussed. See in particular these links:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=221

and

http://www.jroller.com/page/agrebnev?entry=acegi_does_not_work_at

The Glassfish bug database indicates that the bug was fixed in the b38 version of Glassfish. However, the fix apparently hasn't made it into the bundled Sun Appserver 8.2.

I hope this information will spare someone else the frustration of hunting down the source of this problem. Since Acegi is becoming a very popular option for adding security to Java webapps, I probably won't be the only person to run into this little gotcha.

Also, I'd appreciate any info the Creator team can provide about when the bundled appserver might be fixed.

Thanks,

Charlie

[1558 byte] By [cht] at [2007-11-26 11:40:31]
# 1

Could someone on the Creator team please comment on this issue? Is there any plan to upgrade the bundled Sun Application Server to version 9.0? (I'm assuming this bug is fixed in 9.0 -- although I haven't been able to verify that. Actually, I'm not very clear on the relationship between the various Glassfish versions and the various Sun Application Server versions.) Or is there a plan to support Glassfish and/or Tomcat as development servers (rather than just deployment servers).

It seems like my only other possible alternative is to use Netbeans 5.5 with the Visual Web pack. But since the Visual Web pack is a pre-beta release I'm leery about using it for developing a production Web app.

Thanks in advance for your help.

Charlie

cht at 2007-7-7 11:41:59 > top of Java-index,Development Tools,Java Tools...
# 2

Hi!

GlassFish is supported in next version of product, which is pack for Netbeans and which is called Visual Web Pack. You can read about it here:

http://www.netbeans.org/products/visualweb/index.html

But You also can try to export WAR and deploy it to GlassFish.

Thanks,

Roman.

Grif at 2007-7-7 11:41:59 > top of Java-index,Development Tools,Java Tools...