geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell E Glaue <>
Subject Extending DeltaManager in GBean - NoClassDefFoundError: javax/servlet/http/HttpSession
Date Fri, 21 Jul 2006 16:37:30 GMT
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: 
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(
         at Method)
... snip ...
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(

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;
                 GBeanInfoBuilder infoBuilder = new 
                 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="">
   <gbean name='hostinfoGBean' class='org.cait.wnode.hostinfoGBean'></gbean>

View raw message