Jerome Dochez wrote:
> That's going to be difficult..., there are a lot of outbound
> dependencies from this security realm code, I don't see how this can
> easily be refactored.
>
> can I try another solution tomorrow ?
>
I have already done that and it seems to work now, although when test
now my Realm Injection in WebContainer seems to be not working anymore.
Once i have my secure App running back again i will commit the Fix.
regards,
kumar
> jerome
>
> On Mar 17, 2008, at 7:49 PM, Sahoo wrote:
>
>> This is happening because of the following reason:
>>
>> 1. CertificateRealm.class is in core/security.
>> 2. Realm.class, which is part of security/realm is trying to
>> instantiate it, but security/realm does not import core/security
>> module.
>>
>> Now that security/realm has becomes a HK2 module (because of change
>> that Jerome had to make), we get a ClassNotFoundException.
>>
>> The right way to fix is to move CertificateRealm out of core/
>> security to security/realm. I have already discussed this with Kumar
>> from security team.
>>
>> Thanks,
>> Sahoo
>>
>> Shing-Wai.Chan_at_Sun.COM wrote:
>>
>>> Look like, something is wrong.
>>> I see the following after running QL and restart the server:
>>>
>>> WARNING: SEC1000: Caught exception.
>>> com.sun.enterprise.security.auth.realm.BadRealmException:
>>> java.lang.ClassNotFoundException:
>>> com.sun.enterprise.security.auth.realm.certificate.CertificateRealm
>>> at com
>>> .sun.enterprise.security.auth.realm.Realm.doInstantiate(Realm.java:
>>> 239)
>>> at
>>> com.sun.enterprise.security.auth.realm.Realm.instantiate(Realm.java:
>>> 165)
>>> at com
>>> .sun.enterprise.security.RealmConfig.createRealms(RealmConfig.java: 91)
>>> at com
>>> .sun.enterprise.security.RealmConfig.createRealms(RealmConfig.java:
>>> 152)
>>> at com .sun .enterprise
>>> .security.SecurityLifecycle.onInitialization(SecurityLifecycle.java:
>>> 153)
>>> at com .sun .enterprise
>>> .security.SecurityLifecycle.postConstruct(SecurityLifecycle.java:209)
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:
>>> 114)
>>> at com
>>> .sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java: 50)
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:39)
>>> at com
>>> .sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:
>>> 22)
>>> at
>>> com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:71)
>>> at com .sun .hk2
>>> .component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:24)
>>> at com
>>> .sun.enterprise.security.SecuritySniffer.setup(SecuritySniffer.java:
>>> 51)
>>> at com .sun .enterprise
>>> .v3.server.ContainerStarter.startContainer(ContainerStarter.java:103)
>>> at com .sun .enterprise .v3 .server
>>> .ApplicationLifecycle.setupContainer(ApplicationLifecycle.java:710)
>>> at com .sun .enterprise .v3 .server
>>> .ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:
>>> 392)
>>> at com .sun .enterprise
>>> .v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:266)
>>> at com .sun .enterprise .v3 .services .impl
>>> .ApplicationLoaderService
>>> .processApplication(ApplicationLoaderService.java:246)
>>> at com .sun .enterprise .v3 .services .impl
>>> .ApplicationLoaderService
>>> .postConstruct(ApplicationLoaderService.java:126)
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:
>>> 114)
>>> at com
>>> .sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java: 50)
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:39)
>>> at com
>>> .sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:
>>> 22)
>>> at
>>> com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:71)
>>> at com .sun .hk2
>>> .component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:24)
>>> at com.sun.enterprise.v3.server.AppServerStartup
>>> $1.run(AppServerStartup.java:108)
>>> at java.lang.Thread.run(Thread.java:595)
>>> Caused by: java.lang.ClassNotFoundException:
>>> com.sun.enterprise.security.auth.realm.certificate.CertificateRealm
>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>> at com .sun .enterprise
>>> .module.impl.ClassLoaderProxy.findClassDirect(ClassLoaderProxy.java:
>>> 127)
>>> at com .sun .enterprise
>>> .module.impl.ClassLoaderProxy.findClass(ClassLoaderProxy.java:87)
>>> at com .sun .enterprise
>>> .module.impl.ClassLoaderProxy.findClass(ClassLoaderProxy.java:81)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>> at com .sun .enterprise
>>> .module.impl.ModuleClassLoader.loadClass(ModuleClassLoader.java:67)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 319)
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Class.java:164)
>>> at com
>>> .sun.enterprise.security.auth.realm.Realm.doInstantiate(Realm.java:
>>> 229)
>>> ... 26 more
>>>
>>>
>>> Jerome Dochez wrote:
>>>
>>>>
>>>> We have the quick look passing with my latest fix, I think we can
>>>> assume the problem is fixed until further notice. The main
>>>> problems that had to be fixed was the universal (fixed by byron)
>>>> and security realms modules were not hk2 module but plain old jar
>>>> files.
>>>>
>>>> This was especially wrong for realms module as it was itself
>>>> depending on hk2 modules (like glassfish-api) hence bringing all
>>>> the imported module in the class loader of the importing module,
>>>> creating various ClassCastException
>>>>
>>>> So from the conversation thread we had last week, It becomes more
>>>> and more clear that all of our server-side deliverables should be
>>>> hk2-jar files as starting to mix hk2-jars and jars in the import
>>>> list of a jar file that runs in the module subsystem is leading
>>>> to nasty exceptions.
>>>>
>>>> Remember to run QL before each checkin and if quicklook is
>>>> currently failing, please refrain from checking in until the
>>>> failure is resolved.
>>>>
>>>> http://wiki.glassfish.java.net/Wiki.jsp?page=V3BuildTests#ql
>>>>
>>>> Jerome
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>