tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Woon <morph...@helix.stanford.edu>
Subject Re: Exception in RealmBase
Date Fri, 09 Jan 2004 01:13:19 GMT
Amy Roh wrote:

> Mark Woon wrote:
>
> > I've taken a look at the source, and as far as I can tell, it's because
> > the container is null.  What is responsible for providing the Realm the
> > container it's in?  Is there some new bit of configuration I need to do
> > in Tomcat 5?  I'm also surprised that there's this bit of code in
> > RealmBase.init():
> >
> > if( container== null ) {
> > // do some stuff, and don't set container or oname
> > }
> > if( oname==null ) {
> > try {
> >   ContainerBase cb=(ContainerBase)container;
> >   // >>> NPE HAPPENS HERE  <<<
> >   oname=new ObjectName(cb.getDomain()+":type=Realm" +
> > cb.getContainerSuffix());
> >   // some other stuff
> > } catch (Throwable e) {
> >   log.error( "Can't register " + oname, e);
> > }
> > }
>
> How are you adding your realm?  It seems the code under container==null
> should be executed when the realm is added via JMX using full object
> name only.  It's using its own object name to figure out its container
> and calls setRealm to its container.  
>

I'm not sure what you mean by "adding your realm" exactly, but I just 
defined it in server.xml.  I've tried putting the <Realm> element as a 
child of <Engine>, <Host>  and <Context>, and all have produced the same

exception.

> When oname==null, the realm should
> already have its container...


Exactly.  What is responsible for providing the container to the Realm?

-Mark


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message