Good day,

While trying to get a Tomcat instance started up, I keep getting the
stacktrace listed below.  Note that this error only occurs when attempting
to start the server in $CATALINA_BASE.  If I set CATALINA_BASE =
CATALINA_HOME, the server starts up fine.

Further, the tomcat-users (see below) is identical (copies, not links)
between CATALINA_HOME/conf/tomcat-users.xml &
CATALINA_BASE/conf/tomcat-users.

I can see nothing wrong in either of my server.xml's or my tomcat-user file.


Any help would be appreciated in this matter.. Its quite frustratring.

Thank you!
Regards,
Lorin

Error:
/opt/tomcat5/bin/catalina.sh run &
$ Sep 16, 2007 8:31:32 AM
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans
SEVERE: Exception creating UserDatabase MBeans for UserDatabase
javax.management.MBeanException: Cannot instantiate ModelMBean of class
org.apache.catalina.mbeans.MemoryUserDatabaseMBean
        at org.apache.commons.modeler.ManagedBean.createMBean(
ManagedBean.java:384)
        at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:682)

        at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(
GlobalResourcesLifecycleListener.java:179)
        at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(
GlobalResourcesLifecycleListener.java :147)
        at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(
GlobalResourcesLifecycleListener.java:109)
        at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent (
GlobalResourcesLifecycleListener.java:81)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
LifecycleSupport.java:120)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:693)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java :39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.NullPointerException
        at javax.management.MBeanAttributeInfo.hashCode(
MBeanAttributeInfo.java :217)
        at javax.management.modelmbean.ModelMBeanAttributeInfo.trace(
ModelMBeanAttributeInfo.java:499)
        at javax.management.modelmbean.ModelMBeanAttributeInfo.trace(
ModelMBeanAttributeInfo.java:505)
        at
javax.management.modelmbean.ModelMBeanAttributeInfo.createDefaultDescriptor(
ModelMBeanAttributeInfo.java:435)
        at javax.management.modelmbean.ModelMBeanAttributeInfo.<init>(
ModelMBeanAttributeInfo.java :140)
        at org.apache.commons.modeler.AttributeInfo.createAttributeInfo(
AttributeInfo.java:236)
        at org.apache.commons.modeler.ManagedBean.createMBeanInfo(
ManagedBean.java:418)
        at org.apache.commons.modeler.ManagedBean.createMBean (
ManagedBean.java:378)
        ... 14 more
Sep 16, 2007 8:31:33 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 16, 2007 8:31:33 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/pages] startup failed due to previous errors
Sep 16, 2007 8:31:34 AM org.apache.catalina.core.StandardContext start

/opt/tomcat5/bin/version.sh:
Using CATALINA_BASE:   /data/servers/admin/
Using CATALINA_HOME:   /opt/tomcat5
Using CATALINA_TMPDIR: /data/servers/admin//temp
Using JRE_HOME:       /usr/java/jdk1.5.0_12/
Server version: Apache Tomcat/5.5.23
Server built:   Mar 5 2007 08:25:04
Server number:  5.5.23.0
OS Name:        Linux
OS Version:     2.6.22.4-45.fc6
Architecture:   i386
JVM Version:    1.5.0_12-b04
JVM Vendor:     Sun Microsystems Inc.

$JAVA_HOME/bin/java -version:
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)

cat ${CATALINA_HOME}/conf/server.xml (Currently linked to server-minimal.
Same results for either this or default server.xml):
<Server port="8005" shutdown="SHUTDOWN">

  <GlobalNamingResources>
    <!-- Used by Manager webapp -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="8080" />

    <!-- This is here for compatibility only, not required -->
    <Connector port="8009" protocol="AJP/1.3" />

    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase" />
      <Host name="localhost" appBase="webapps" />
    </Engine>

  </Service>
</Server>

cat ${CATALINA_BASE}/conf/server.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Server>
  <Listener className="
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <Listener className="
org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
  <GlobalNamingResources>
    <Environment description="Identifies the environment type"
name="environmentName" type=" java.lang.String" value="dev"/>
    <Resource auth="Container" description="User database that can be
updated and saved" factory="
org.apache.catalina.users.MemoryUserDatabaseFactory " name="UserDatabase"
pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector URIEncoding="utf-8" connectionTimeout="20000"
maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150"
minSpareThreads="25" port="8084" redirectPort="8443" uRIEncoding="utf-8">
    </Connector>
    <Connector URIEncoding="utf-8" acceptCount="100" address="localhost"
debug="0" maxProcessors="100" minProcessors="5" port="30025"
protocol="AJP/1.3" secure="true">
    </Connector>
    <Connector URIEncoding="utf-8" acceptCount="100" address="localhost"
debug="0" maxProcessors="100" minProcessors="5" port="30026"
protocol="AJP/1.3" secure="true">
    </Connector>
    <Connector URIEncoding="utf-8" acceptCount="100" address="localhost"
debug="0" maxProcessors="100" minProcessors="5" port="30027"
protocol="AJP/1.3" secure="true">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
      <Host name="localhost">

      </Host>
    </Engine>
  </Service>
</Server>

cat ${CATALINA_HOME}/conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
  <user username="admin" password="admin" roles="manager,admin"/>

Reply via email to