You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin Grüneberg <ma...@active-group.de> on 2003/10/06 18:42:12 UTC

GlobalNamingResource: Class not found....

Hi together,

I have a problem with the definition of a GlobalNamingResource.
I tried to follow the instructions of the
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html
bur it will not work...

What I want is the following:
I will have a shared Instance of a class which I define in server.xml 

My Enviroment is: win2000SP4 with jsdk1.4.2 tomcat4.1.27/24
Server.xml looks like this....
<GlobalNamingResources>
		<!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
		<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase" description="User database that can
be updated and saved" />
		<ResourceParams name="UserDatabase">
			<parameter>
				<name>factory</name>
	
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
			</parameter>
			<parameter>
				<name>pathname</name>
				<value>conf/tomcat-users.xml</value>
			</parameter>
		</ResourceParams>
		<Resource name="app/accessmanager" auth="Container"
type="accessmanager.core.server.AccessManager" />
		<ResourceParams name="app/accessmanager">
			<parameter>
				<name>factory</name>
	
<value>org.apache.naming.factory.BeanFactory</value>
			</parameter>
			<parameter>
				<name>configPath</name>
	
<value>E:/dev/apache/Tomcat-4.1.24/shared/classes/AccessManager.properties</
value>
			</parameter>
		</ResourceParams>
	</GlobalNamingResources>

in my web.xml I have an entry:
<resource-ref>
  <description>Object factory for MyBean instances.</description>
  <res-ref-name>app/accessmanager</res-ref-name>
  <res-type>accessmanager.core.server.AccessManager</res-type>
  <res-auth>Container</res-auth>
</resource-ref>

The jar file with the classes are in shared/libs (accessmanager.jar).

When I start tomcat I always get the following Exception:

06.10.2003 17:52:37 org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
06.10.2003 17:52:37 org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
06.10.2003 17:52:37 org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
06.10.2003 17:52:38 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 80
06.10.2003 17:52:38 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 443
GlobalResourcesLifecycleListener: Naming exception processing app:
org.apache.naming.NamingContext:org.apache.naming.NamingContext@26d607
javax.naming.NamingException: Class not found:
accessmanager.core.server.AccessManager
Starting service Tomcat-Standalone
Apache Tomcat/4.1.27-LE-jdk14 

what is wrong, why does this happen? shared/lib should be visible to the
server?
  
thanks in advance, 
Martin Grüneberg



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org