geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <djen...@gluecode.com>
Subject Re: Deploying GBean Problem
Date Mon, 20 Dec 2004 18:27:37 GMT
>     public static GBeanInfo getBeanInfo() {

should be
>     public static GBeanInfo getGBeanInfo() {

Note that some tools and naming conventions would prefer getGbeanInfo 
which will not work.

thanks
david jencks

On Dec 20, 2004, at 8:12 AM, L. Yeung wrote:

> Hi! I'm following the steps found in
> wiki.apache.geronimo/GBeans on deploying a gbean and
> I'm using geronimo-1.0-M3. I copied my mygbean-1.0.jar
> to ${geronimo.home}/repository.
>
> My configuration:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <configuration
> xmlns="http://geronimo.apache.org/xml/ns/deployment"
> configId="example1/MyGBean">
>   <dependency>
>     <uri>mygbean-1.0.jar</uri>
>   </dependency>
>   <gbean name="geronimo.examples:name=My first simple
> GBean" class="example1.MyGBean"/>
> </configuration>
>
> My source file:
> package example1;
>
> import org.apache.geronimo.gbean.GBeanInfo;
> import org.apache.geronimo.gbean.GBeanInfoBuilder;
>
> /**
>  * Hello world!
>  *
>  *
>  * @geronimo.config config-id="example1/MyGBean"
>  * @geronimo.config-dependency uri="mygbean-1.0.jar"
>  * @geronimo.config-gbean
> name="geronimo.examples:name=My first simple GBean"
>  */
> public class MyGBean {
>     public static final GBeanInfo GBEAN_INFO;
>
>     static {
>         GBeanInfoBuilder infoFactory = new
> GBeanInfoBuilder(
>             "MyGBean", MyGBean.class);
>         GBEAN_INFO = infoFactory.getBeanInfo();
>     }
>
>     public static GBeanInfo getBeanInfo() {
>         return GBEAN_INFO;
>     }
> }
>
>
> When I tried deploying it geronimo dumps this:
>
> D:\home\ming\geronimo-1.0-M3>java -jar
> bin/deployer.jar deploy \home\ming\geroni
> mo-apps\target\xdoclet\hibernatedoclet\example1\MyGBean.xml
> Username: system
> Password: manager
> Deployment failed
>   Server reports: Unable to create GBean from class
> example1.MyGBean
> org.apache.geronimo.deployment.DeploymentException:
> Unable to create GBean from
> class example1.MyGBean
>         at
> org.apache.geronimo.deployment.service.GBeanBuilder.<init>(GBeanBuild
> er.java:54)
>         at
> org.apache.geronimo.deployment.service.GBeanHelper.addGbean(GBeanHelp
> er.java:31)
>         at
> org.apache.geronimo.deployment.service.ServiceConfigBuilder.buildConf
> iguration(ServiceConfigBuilder.java:116)
>         at
> org.apache.geronimo.deployment.service.ServiceConfigBuilder$$FastClas
> sByCGLIB$$9f173be6.invoke(<generated>)
>         at
> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
>         at
> org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvo
> ker.java:38)
>         at
> org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp
> eration.java:142)
>         at
> org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:823)
>         at
> org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
>         at
> org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperation
> Invoker.java:34)
>         at
> org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibM
> ethodInterceptor.java:112)
>         at
> org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$
> $7a1ca0ae.buildConfiguration(<generated>)
>         at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:174)
>         at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:60)
>         at
> org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.i
> nvoke(<generated>)
>         at
> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
>         at
> org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvo
> ker.java:38)
>         at
> org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp
> eration.java:142)
>         at
> org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:844)
>         at
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown
> Source)
>         at
> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown
> Source)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
> Source)
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown
> Source)
>         at
> org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:288)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
>         at java.lang.reflect.Method.invoke(Unknown
> Source)
>         at
> com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(Unknown
> Source)
>         at
> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown
> Source)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
> Source)
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown
> Source)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown
> Sou
> rce)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown
> Sour
> ce)
>         at
> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run
> (Unknown Source)
>         at
> java.security.AccessController.doPrivileged(Native
> Method)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(U
> nknown Source)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown
> Source)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
>         at java.lang.reflect.Method.invoke(Unknown
> Source)
>         at
> sun.rmi.server.UnicastServerRef.dispatch(Unknown
> Source)
>         at sun.rmi.transport.Transport$1.run(Unknown
> Source)
>         at
> java.security.AccessController.doPrivileged(Native
> Method)
>         at
> sun.rmi.transport.Transport.serviceCall(Unknown
> Source)
>         at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
> Source)
>         at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
> Sour
> ce)
>         at java.lang.Thread.run(Unknown Source)
> Caused by:
> org.apache.geronimo.gbean.InvalidConfigurationException:
> Class does n
> ot have a getGBeanInfo() method: example1.MyGBean
>         at
> org.apache.geronimo.gbean.GBeanInfo.getGBeanInfo(GBeanInfo.java:57)
>         at
> org.apache.geronimo.deployment.service.GBeanBuilder.<init>(GBeanBuild
> er.java:52)
>         ... 48 more
>
> BTW, I'm trying to deploy the gbean found in wiki page
> in order to test my @geronimo tags (currently
> implemented <configuration> only). It is written using
> XDoclet2.
>
> Thanks.
>
> -len
>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
>


Mime
View raw message