Bugs item #764964, was opened at 2003-07-02 15:24
Message generated for change (Comment added) made by starksm
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=764964&group_id=22866

Category: CatalinaBundle
Group: v3.2
>Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Stefan Reich (sreich)
Assigned to: Scott M Stark (starksm)
Summary: ClassCastExp with Tomcat SSL

Initial Comment:
MacOSX, JDK 1.4.1, JBoss 3.2 TOT.

When I setup an SSL connector following the configuration 
from Scott's DevAdmin Book page 479 I run into a 
ClassCastException:

java.lang.ClassCastException
        at 
org.jboss.web.catalina.security.SSLServerSocketFactory.setS
ecurityDomainName(Unknown Source)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
ccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegating
MethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)

The class cast occurs at this line in SSLServerSocketfactory:

      SecurityDomain securityDomain = (SecurityDomain) 
iniCtx.lookup(jndiName);

When I use the jmx console to look up the type bound to the 
jndi name, it shows up like this:

java:
jaas
javax.naming.Context
RMI+SSL
org.jboss.security.plugins.SecurityDomainContext

Don't know how to get the domain from the 
SecurityDomainSocket, though.


----------------------------------------------------------------------

>Comment By: Scott M Stark (starksm)
Date: 2003-07-07 20:11

Message:
Logged In: YES 
user_id=175228

This is expected although the failure should not be showing
up as a CCE. Its fine to have a shared security domain but
then the web container needs to have a dependency on the
security domain service so that it does not end up creating
an instance of the default security manager. The
SSLServerSocketFactory needs to be validating the type of
the security manager and providing a better failure msg.

----------------------------------------------------------------------

Comment By: Stefan Reich (sreich)
Date: 2003-07-07 20:00

Message:
Logged In: YES 
user_id=429729

With the attachment I was able to find out what went wrong. I had 
the JaasSecurityDomain mbean in a different service.xml, because 
I share this domain between tomcat and RMi/SSL.
I moved the domain to the tomcat service.xml, and it works. If 
you think that it works as expected, just close this bug. Otherwise, 
I'll attach the two files to reproduce the problem.

BTW, I have Java2ClassLoadingCompliance and 
UseJBossWebLoader set to true, if that makes any difference.

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2003-07-03 16:10

Message:
Logged In: YES 
user_id=175228

The page you refer to does not match the current 3.2.1 docs
page. The first SSL config listing is 9.4 on page 489 and is
attached. This works fine for me with the current 3.2 branch
code.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=764964&group_id=22866


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to