atom feed6 messages in org.apache.geronimo.userExtending DeltaManager in GBean - NoC...
FromSent OnAttachments
Russell E GlaueJul 21, 2006 9:37 am 
Jason DillonJul 21, 2006 12:04 pm 
Russell E GlaueJul 21, 2006 12:43 pm 
Aaron MulderJul 21, 2006 12:51 pm 
Russell E GlaueJul 21, 2006 1:22 pm 
Aaron MulderJul 21, 2006 1:41 pm 
Subject:Extending DeltaManager in GBean - NoClassDefFoundError: javax/servlet/http/HttpSession
From:Russell E Glaue (
Date:Jul 21, 2006 9:37:30 am

Okay. Thanks to Jason, I got the hostinfoGBean deployed successfully.

now the next error... I also want to report in the hostinfoGBean how many sessions are on a node in the cluster. So I edited my hostinfoGBean class to extend DeltaManager and then added a function getSessionCount.

It compiles successfully. And it deploys in Geronimo 1.1, although with an error on deployment: deploy target/wnode-1.0.jar wnode-plan.xml - Exception in thread "Thread-4" java.lang.NoClassDefFoundError: javax/servlet/http/HttpSession at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass( at at
org.apache.geronimo.kernel.classloader.JarFileClassLoader.access$200( at
org.apache.geronimo.kernel.classloader.JarFileClassLoader$ at Method) ... snip ... at sun.rmi.transport.tcp.TCPTransport.handleMessages( at sun.rmi.transport.tcp.TCPTransport$ at -

When deploying a similar GBean that extends DeltaManager in Geronimo 1.0, I did not get this error. Do I have to add another dependency in the deployment plan? I could not find the artifact in the geronimo 1.1 repository that contains the javax HttpSession class (Did I not look hard enough?). Do I have to deploy a new artifact to Geronimo 1.1?

Here is my updated code, the deployment plan has not changed.

java file: org/cait/wnode/ - package org.cait.wnode;

import java.util.HashMap; import org.apache.commons.logging.*;

import org.apache.catalina.cluster.session.DeltaManager; import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle;

public class hostinfoGBean extends DeltaManager implements GBeanLifecycle {

public static final GBeanInfo GBEAN_INFO;

private static final Log glog = LogFactory.getLog(hostinfoGBean.class);

public static GBeanInfo getGBeanInfo(){ return GBEAN_INFO; } static{ GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("hostinfoGBean",hostinfoGBean.class); infoBuilder.addInterface(hostinfoGBean.class); GBEAN_INFO = infoBuilder.getBeanInfo(); }

public void doFail() {"Service failed"); // TODO Auto-generated method stub }

public void doStart() throws Exception {"Service started"); // TODO Auto-generated method stub }

public void doStop() throws Exception {"Service stopped"); // TODO Auto-generated method stub }

public String getName() { return ""; } public String getPort() { return "80"; } public int getSessionCount() { HashMap SessionHashMap = this.sessions; int NumberOfSessions = 0; NumberOfSessions = SessionHashMap.size(); return NumberOfSessions; }

} -

deployment plan: wnode-plan.xml - <?xml version="1.0" encoding="UTF-8"?> <module xmlns=""> <environment> <moduleId> <groupId>wnode</groupId> <artifactId>wnode</artifactId> <version>1.0</version> <type>jar</type> </moduleId> <dependencies> <dependency> <groupId>tomcat</groupId> <artifactId>catalina-cluster</artifactId> <version>5.5.15</version> <type>jar</type> </dependency> <dependency> <groupId>tomcat</groupId> <artifactId>catalina</artifactId> <version>5.5.15</version> <type>jar</type> </dependency> </dependencies> </environment> <gbean name='hostinfoGBean' class='org.cait.wnode.hostinfoGBean'></gbean> </module> -