geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@planet57.com>
Subject Re: Unknown start exception when extending DeltaManager in G1.1 - Special attribute objectName must have the type java.lang.String
Date Fri, 21 Jul 2006 20:37:20 GMT
Does DeltaManager define an attribute named objectName that is of  
type javax.management.ObjectName?

Do you need to extend DeltaManager?  Maybe you want to delegate to it  
instead of extend from it.

--jason


On Jul 21, 2006, at 1:31 PM, Russell E Glaue wrote:

> My hostinfoGBean gbean deploys but will not startup.
>
> This is my gbean which I am trying to upgrade to Geronimo 1.1. It  
> compiled, deployed and started in Geronimo 1.0.
> If I take out the implementation to the DeltaManager and deploy the  
> GBean, It deploys and starts up without errors. (code for gbean is  
> below)
>
> Deployment message after taking DeltaManager implementation out of  
> the GBean:
> -
>     Deployed wnode/wnode/1.0/jar
> -
>
>
> When deploying my hostinfoGBean that extends DeltaManager, I get  
> this configuration error:
> -
>         Special attribute objectName must have the type  
> java.lang.String,
>     but is javax.management.ObjectName:
>     targetClass=org.cait.wnode.hostinfoGBean
> -
>
> If I extend DeltaManager in my GBean for Geronimo 1.1, do I now  
> have to do something different?
>
> When deploying a GBean, which extends DeltaManager, in Geronimo 1.0  
> I do not get a startup configuration error.
>
>
> Error message after deployment:
> -
> org.apache.geronimo.kernel.config.LifecycleException: start of  
> wnode/wnode/1.0/jar failed
>         at  
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
> iguration(SimpleConfigurationManager.java:529)
>         at  
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
> iguration(SimpleConfigurationManager.java:493)
>         at  
> org.apache.geronimo.kernel.config.SimpleConfigurationManager$ 
> $FastClassByCGLIB$$ce77a924.invoke(<generated>)
> ... snip ...
>         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 
> (TCPTransport.java:707)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by:  
> org.apache.geronimo.kernel.config.InvalidConfigException: Unknown  
> start exception
>         at  
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration 
> GBeans(ConfigurationUtil.java:440)
>         at  
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start 
> (KernelConfigurationManager.java:187)
>         at  
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
> iguration(SimpleConfigurationManager.java:512)
>         ... 36 more
> Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:  
> Special attribute objectName must have the type java.lang.String,  
> but is javax.management.ObjectName:  
> targetClass=org.cait.wnode.hostinfoGBean
>         at org.apache.geronimo.gbean.runtime.GBeanAttribute.<init> 
> (GBeanAttribute.java:85)
>         at  
> org.apache.geronimo.gbean.runtime.GBeanAttribute.createSpecialAttribut 
> e(GBeanAttribute.java:68)
>         at  
> org.apache.geronimo.gbean.runtime.GBeanInstance.addManagedObjectAttrib 
> utes(GBeanInstance.java:1194)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.<init> 
> (GBeanInstance.java:245)
>         at org.apache.geronimo.kernel.basic.BasicKernel.loadGBean 
> (BasicKernel.java:354)
>         at  
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration 
> GBeans(ConfigurationUtil.java:362)
>         ... 38 more
>     Error: Operation failed: start of wnode/wnode/1.0/jar failed
>
>         Unknown start exception
>
>         Special attribute objectName must have the type  
> java.lang.String,
>     but is javax.management.ObjectName:
>     targetClass=org.cait.wnode.hostinfoGBean
>
>
> Here is my deployment plan for hostinfoGBean:
> -
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
>   <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>
>       <dependency>
>         <groupId>org.apache.geronimo.specs</groupId>
>         <artifactId>geronimo-j2ee_1.4_spec</artifactId>
>         <version>1.1</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>org.apache.geronimo.specs</groupId>
>         <artifactId>geronimo-servlet_2.4_spec</artifactId>
>         <version>1.0.1</version>
>         <type>jar</type>
>       </dependency>
>     </dependencies>
>   </environment>
>   <gbean name='hostinfoGBean'  
> class='org.cait.wnode.hostinfoGBean'></gbean>
> </module>
> -
>
>
> Here is my hostinfoGBean class:
> org/cait/wnode/hostinfoGBean.java
> -
> 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 hostinfoGBean(String[] hostport) {}
>
>         public void doFail() {
>                 glog.info("Service failed");
>         }
>
>         public void doStart() throws Exception {
>                 glog.info("Service started");
>         }
>
>         public void doStop() throws Exception {
>                 glog.info("Service stopped");
>         }
>
>         public String getName() {
>                 return "node1.domain-noc1.test.com";
>         }
>         public String getPort() {
>                 return "80";
>         }
>         public int getSessionCount() {
>                 HashMap SessionHashMap = this.sessions;
>                 int NumberOfSessions = 0;
>                 NumberOfSessions = SessionHashMap.size();
>                 return NumberOfSessions;
>         }
>
> }
> -
>


Mime
View raw message